GPEN · Question #383
You enter the following URL on your Web browser: af../windows/system32/cmd.exe?/c+dir+c:\ What task do you want to perform?
The correct answer is C. View the directory list of c drive.. The URL exploits a directory traversal vulnerability on a Windows web server to execute cmd.exe with the 'dir c:\' command, returning a listing of the C drive root directory.
Question
You enter the following URL on your Web browser:
af../windows/system32/cmd.exe?/c+dir+c:\ What task do you want to perform?
Options
- APerform buffer overflow attack.
- BPerform DDoS attack.
- CView the directory list of c drive.
- DPerform DoS attack.
How the community answered
(32 responses)- A9% (3)
- B16% (5)
- C72% (23)
- D3% (1)
Why each option
The URL exploits a directory traversal vulnerability on a Windows web server to execute cmd.exe with the 'dir c:\' command, returning a listing of the C drive root directory.
A buffer overflow attack involves sending excess data to overflow a memory buffer and overwrite adjacent memory - it is not triggered by a crafted URL containing a dir command.
A DDoS (Distributed Denial of Service) attack overwhelms a target with traffic from multiple sources and cannot be performed by a single URL request issuing a dir command.
The URL uses '../' sequences to traverse up the directory tree and reach 'windows/system32/cmd.exe', then passes '/c dir c:\' as query parameters - which translates to the cmd.exe flag '/c' (run command and exit) followed by 'dir c:\' to list the C drive contents. This is a classic IIS Unicode/directory traversal command execution technique used to enumerate the file system.
A DoS (Denial of Service) attack aims to make a service unavailable by exhausting resources - executing 'dir c:\' retrieves data rather than disrupting availability.
Concept tested: Directory traversal and command execution via web URL
Source: https://owasp.org/www-community/attacks/Path_Traversal
Topics
Community Discussion
No community discussion yet for this question.