nerdexam
CompTIA

SY0-501 · Question #112

An administrator discovers the following log entry on a server: Nov 12 2013 00:23:45 httpd[2342]: GET /app2/prod/proc/process.php?input=change;cd%20../../../etc;cat%20shadow Which of the following…

The correct answer is A. Command injection. Command Injection Attack Explained Option A is correct because the log entry shows an attacker appending shell commands (;cd%20../../../etc;cat%20shadow) to an HTTP request parameter, attempting to break out of the web application's context and execute OS-level commands…

Submitted by jordan8· Mar 4, 2026Threats, vulnerabilities, and mitigations

Question

An administrator discovers the following log entry on a server:

Nov 12 2013 00:23:45 httpd[2342]: GET /app2/prod/proc/process.php?input=change;cd%20../../../etc;cat%20shadow Which of the following attacks is being attempted?

Options

  • ACommand injection
  • BPassword attack
  • CBuffer overflow
  • DCross-site scripting

How the community answered

(25 responses)
  • A
    76% (19)
  • B
    4% (1)
  • C
    12% (3)
  • D
    8% (2)

Explanation

Command Injection Attack Explained

Option A is correct because the log entry shows an attacker appending shell commands (;cd%20../../../etc;cat%20shadow) to an HTTP request parameter, attempting to break out of the web application's context and execute OS-level commands - specifically navigating to the /etc directory and reading the shadow password file. This is the classic hallmark of command injection: malicious commands are injected into input fields to be executed by the underlying operating system.

Option B (Password attack) is incorrect because, while the shadow file contains passwords, the method used here is command injection, not a brute force, dictionary, or credential-stuffing attack. Option C (Buffer overflow) is wrong because no attempt is being made to overflow a memory buffer with excessive input data. Option D (Cross-site scripting) is incorrect because XSS involves injecting client-side scripts (like JavaScript) to target users' browsers, not server-side OS commands.

Memory Tip: Look for semicolons and chained OS commands (like cd, cat, ls) inside URL parameters - if it looks like a terminal command hiding in a web request, think Command Injection.

Topics

#Command injection#Web application security#Vulnerability#Log analysis

Community Discussion

No community discussion yet for this question.

Full SY0-501 Practice