exam questions

Exam CAS-004 All Questions

View all questions & answers for the CAS-004 exam

Exam CAS-004 topic 1 question 556 discussion

Actual exam question from CompTIA's CAS-004
Question #: 556
Topic #: 1
[All CAS-004 Questions]

A security engineer tests an internal website used to check IP addresses in the network for connectivity by invoking the following URL:

http://l92.168.1.43/pingIP.php?IP=10.1.1.1||whoami

The engineer obtains the following output:



Which of the following improvements should the security engineer recommend?

  • A. Increasing network throughput
  • B. SQLi blocking
  • C. Transport Layer Security
  • D. Input sanitization
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
grelaman
6 months, 3 weeks ago
Selected Answer: D
The application is vulnerable to command injection due to improper handling of user-supplied input. By appending ||whoami to the IP parameter, the engineer was able to execute an additional shell command. || is a shell logical operator that executes the command following it if the preceding command fails. However, depending on how the input is handled, it may simply concatenate commands, leading to unintended execution. This indicates that the application directly incorporates user input into a system command without proper validation or sanitization. Proper input sanitization eliminates the possibility of injecting unintended commands.roper input sanitization eliminates the possibility of injecting unintended commands.
upvoted 3 times
...
Bright07
7 months, 1 week ago
Ans. D. Input sanitization This recommendation is necessary to prevent command injection vulnerabilities, as demonstrated by the ability to invoke whoami through the URL. Proper input sanitization would help ensure that only valid IP addresses are accepted and prevent unauthorized command execution.
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