exam questions

Exam SY0-701 All Questions

View all questions & answers for the SY0-701 exam

Exam SY0-701 topic 1 question 358 discussion

Actual exam question from CompTIA's SY0-701
Question #: 358
Topic #: 1
[All SY0-701 Questions]

A security analyst is reviewing logs and discovers the following:



Which of the following should be used to best mitigate this type of attack?

  • A. Input sanitization
  • B. Secure cookies
  • C. Static code analysis
  • D. Sandboxing
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
chasingsummer
Highly Voted 5 months, 1 week ago
The log entry in the image suggests that the system is potentially under attack, as the User-Agent header contains what looks like a shell command: ${/bin/sh/id}. This type of activity may indicate an attempted command injection attack, where an attacker is trying to execute shell commands via a vulnerable web application.
upvoted 5 times
...
9149f41
Most Recent 2 months, 3 weeks ago
Selected Answer: A
Input Sanitization would be for the code as below: Remove/escape special characters: Shell metacharacters ($, ;, |, `, etc.) Command separators Path traversal characters Sanitized Code in bash ( in question, it is a shell command): sanitized_ua=$(printf '%q' "$(echo "$user_agent" | tr -d '$;|`')")
upvoted 1 times
...
chasingsummer
5 months ago
Selected Answer: A
Input sanitization
upvoted 1 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