Threats, Vulnerabilities, and Attacks
A diagnostic page pings a user-supplied hostname. The web log shows the input "8.8.8.8; cat /etc/passwd", and the response lists the server's user accounts. Which attack does this indicate?
Show the answer
Correct answerC. Command injection
AWhy not this: Reaching /etc/passwd suggests it, but there are no ../ path sequences; a command is chained instead.
BWhy not this: No oversized input or memory corruption is shown; the input is short and well formed.
CWhy this is right: The semicolon appends a shell command to the expected input, and the server runs it.
DWhy not this: No account gains higher rights; the output comes from a command run by the web service.
The semicolon chains a second operating system command onto the ping input, which the server executes. That is command injection. Directory traversal also reaches /etc/passwd, but it uses ../ path sequences to read files and does not run commands.