exam questions

Exam CS0-002 All Questions

View all questions & answers for the CS0-002 exam

Exam CS0-002 topic 1 question 74 discussion

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

After a remote command execution incident occurred on a web server, a security analyst found the following piece of code in an XML file:

Which of the following is the BEST solution to mitigate this type of attack?

  • A. Implement a better level of user input filters and content sanitization.
  • B. Properly configure XML handlers so they do not process &ent parameters coming from user inputs.
  • C. Use parameterized queries to avoid user inputs from being processed by the server.
  • D. Escape user inputs using character encoding conjoined with whitelisting.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
2Fish
Highly Voted 2 years, 3 months ago
Selected Answer: B
B. Agree with everyone here. Credit to absabs for the link: https://portswigger.net/web-security/xxe
upvoted 5 times
...
skibby16
Most Recent 1 year, 7 months ago
Selected Answer: A
The piece of code in the XML file is an example of a command injection attack, which is a type of attack that exploits insufficient input validation or output encoding to execute arbitrary commands on a server or system2 The attacker can inject malicious commands into an XML element that is processed by an XML handler on the server, and cause the server to execute those commands. The best solution to mitigate this type of attack is to implement a better level of user input filters and content sanitization, which means checking and validating any user input before processing it, and removing or encoding any potentially harmful characters or commands.
upvoted 2 times
...
buchhe
1 year, 10 months ago
Selected Answer: A
To prevent XML vulnerabilities from being exploited, we need to use proper Input validation. Hence A is the right answer.
upvoted 2 times
...
mraval
2 years, 4 months ago
Selected Answer: B
B is the correct Answer
upvoted 1 times
...
absabs
2 years, 4 months ago
Selected Answer: B
It is XEE vulnerability. You can research below link; https://portswigger.net/web-security/xxe
upvoted 4 times
...
Average_Joe
2 years, 8 months ago
Selected Answer: B
parameterized queries is to mitigate SQLi
upvoted 2 times
...
david124
2 years, 8 months ago
Selected Answer: B
B it is
upvoted 1 times
...
Adrian831
2 years, 9 months ago
Selected Answer: B
B it's correct.
upvoted 1 times
...
rv438360
2 years, 9 months ago
B is the right answer
upvoted 1 times
...
R00ted
2 years, 9 months ago
B is the answer
upvoted 3 times
...
Ushouldkno
2 years, 9 months ago
Isnt this B?
upvoted 4 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 ...