Attacks and Exploits

A diagnostic page builds the OS command "ping -c 4" followed by the host value and returns only the word "Done". Which host value BEST confirms the tester can run extra commands?

Show the answer

Correct answerC. 127.0.0.1; sleep 10

AWhy not this: This is a traversal sequence that only affects file paths and does not make the shell run another command.

BWhy not this: This is a SQL time-based payload; the page builds an OS command, not a database query, so no delay occurs.

CWhy this is right: The semicolon ends the ping command and sleep runs in the shell; a 10-second delay confirms execution without output.

DWhy not this: This is a template expression; a shell treats it as plain text and it proves nothing about command execution.

A shell separator followed by sleep 10 makes the server pause if the input reaches the shell, so the delay confirms command injection even with no output. The SQL SLEEP payload targets a database query, which this page does not build.