exam questions

Exam CS0-003 All Questions

View all questions & answers for the CS0-003 exam

Exam CS0-003 topic 1 question 112 discussion

Actual exam question from CompTIA's CS0-003
Question #: 112
Topic #: 1
[All CS0-003 Questions]

A security analyst is validating a particular finding that was reported in a web application vulnerability scan to make sure it is not a false positive. The security analyst uses the snippet below:



Which of the following vulnerability types is the security analyst validating?

  • A. Directory traversal
  • B. XSS
  • C. XXE
  • D. SSRF
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
kmordalv
Highly Voted 1 year, 7 months ago
Selected Answer: C
XML external entity injection (also known as XXE) is a web security vulnerability that allows an attacker to interfere with an application's processing of XML data. It often allows an attacker to view files on the application server filesystem, and to interact with any back-end or external systems that the application itself can access. In some situations, an attacker can escalate an XXE attack to compromise the underlying server or other back-end infrastructure, by leveraging the XXE vulnerability to perform server-side request forgery (SSRF) attacks.
upvoted 15 times
kmordalv
1 year, 7 months ago
References: https://portswigger.net/web-security/xxe https://portswigger.net/web-security/xxe/xml-entities https://owasp.org/www-community/vulnerabilities/XML_External_Entity_(XXE)_Processing
upvoted 2 times
...
...
dido80
Highly Voted 1 year, 4 months ago
Selected Answer: C
The presence of XML entities (<!ENTITY>) is commonly associated with XXE vulnerabilities. So answer is C.
upvoted 6 times
...
iliecomptia
Most Recent 2 weeks, 4 days ago
Selected Answer: C
From study guide: There are also other types of attack that target the way a server parses an XML file submitted for upload or XML data submitted as a URL: XML External Entity (XXE)—This type of attack embeds a request for a local resource, such as the server’s password file. This is exactly what happens here.
upvoted 1 times
...
cy_analyst
6 months, 1 week ago
Selected Answer: C
The attacker references /etc/shadow using the &ent; entity in the XML code. The XML parser replaces &ent; with the contents of /etc/shadow during the parsing process. The password hashes from /etc/shadow are displayed where the <lastName> value would normally appear. If the vulnerable application returns this data in a response (like a web page or an API), the attacker can see and retrieve the hashes.
upvoted 1 times
...
Wole_excel
8 months, 1 week ago
The security analyst is validating for XML External Entity (XXE) Injection vulnerability. In this scenario, the XML snippet includes an external entity (<!ENTITY ent SYSTEM "file:///etc/shadow">) that references a file on the server. If the web application improperly processes XML input, it could potentially resolve this entity and include the contents of the /etc/shadow file in the XML response, which could expose sensitive information. XXE vulnerabilities can lead to various attacks, including data exfiltration, denial of service, and server-side request forgery (SSRF).
upvoted 2 times
...
VVV4WIN
1 year, 4 months ago
I am quite possibly wrong, with my response below after doing even further research. Apologies everyone.
upvoted 3 times
...
VVV4WIN
1 year, 4 months ago
Selected Answer: A
Directory Traversal... Directory Traversal- An app attack that allows access to commands, files, and directories that may or may not be connected to the web document root directory. E.g. "../../../../etc/shadow" is used in a URL to get to the shadow file. Directory traversals can be used to access any file on s system with the right permissions. Percent encoding can be used to hide directory traversal.
upvoted 1 times
dido80
1 year, 4 months ago
Look again the snippet. "../../../../etc/shadow correct for A, but the log in the question is "////etc/shadow. The presence of XML entities (<!ENTITY>) is commonly associated with XXE vulnerabilities. So answer is C.
upvoted 3 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago