GCIH · Question #141
You enter the following URL on your Web browser: af../windows/system32/cmd.exe?/c+dir+c:\ What kind of attack are you performing?
The correct answer is A. Directory traversal. The URL uses '../' sequences to navigate outside the web root and access cmd.exe on the server, which is the defining characteristic of a directory traversal attack.
Question
You enter the following URL on your Web browser:
af../windows/system32/cmd.exe?/c+dir+c:\ What kind of attack are you performing?
Options
- ADirectory traversal
- BReplay
- CSession hijacking
- DURL obfuscating
How the community answered
(61 responses)- A90% (55)
- B2% (1)
- C5% (3)
- D3% (2)
Why each option
The URL uses '../' sequences to navigate outside the web root and access cmd.exe on the server, which is the defining characteristic of a directory traversal attack.
Directory traversal (path traversal) exploits insufficient input validation by using '../' sequences in URLs to move up the directory tree beyond the web root. The URL shown navigates to windows/system32/cmd.exe and appends a command via the query string, allowing execution of arbitrary system commands - the textbook definition of this attack.
A replay attack involves capturing a valid authentication token or data packet and retransmitting it to gain unauthorized access, which has no relevance to directory path manipulation in a URL.
Session hijacking involves stealing or forging an authenticated session token to impersonate a logged-in user, not navigating the server file system via crafted URL paths.
URL obfuscation is a technique to disguise malicious URLs using encoding schemes like hex or unicode to evade filters, not a method of traversing server directories to access restricted files.
Concept tested: Directory traversal attack via URL path sequences
Source: https://owasp.org/www-community/attacks/Path_Traversal
Topics
Community Discussion
No community discussion yet for this question.