Threats, Vulnerabilities, and Mitigations

Which input in a file-name parameter is a typical directory traversal attempt?

Show the answer

Correct answerC. ../../../etc/shadow

AWhy not this: Oversized input is a buffer overflow attempt, not a path manipulation.

BWhy not this: This alters a database query's logic, so it is SQL injection.

CWhy this is right: The ../ sequences move up the directory tree to reach a file outside the web root.

DWhy not this: This injects script into a page, a different injection attack.

Repeated ../ sequences climb out of the intended directory to reach files elsewhere on the server, which is directory traversal. The quote-based string is tempting, but it is SQL injection aimed at a database query.