nerdexam
GIAC

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.

Web Application Penetration Testing

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)
  • A
    9% (3)
  • B
    16% (5)
  • C
    72% (23)
  • D
    3% (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.

APerform buffer overflow attack.

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.

BPerform DDoS attack.

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.

CView the directory list of c drive.Correct

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.

DPerform DoS attack.

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

#directory traversal#command injection#URL manipulation#web exploitation

Community Discussion

No community discussion yet for this question.

Full GPEN Practice