nerdexam
GIAC

GPEN · Question #45

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 D. Directory traversal. The URL uses dot-dot-slash sequences to navigate outside the web root and execute a system command, which is the defining characteristic of a directory traversal attack.

Web Application Penetration Testing

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

  • ASession hijacking
  • BReplay
  • CURL obfuscating
  • DDirectory traversal

How the community answered

(22 responses)
  • A
    14% (3)
  • B
    5% (1)
  • C
    5% (1)
  • D
    77% (17)

Why each option

The URL uses dot-dot-slash sequences to navigate outside the web root and execute a system command, which is the defining characteristic of a directory traversal attack.

ASession hijacking

Session hijacking involves stealing or forging a valid session token to impersonate an authenticated user, which is unrelated to the file path manipulation shown.

BReplay

A replay attack captures and retransmits legitimate network packets to authenticate or trigger actions, not to navigate file system paths.

CURL obfuscating

URL obfuscation involves disguising a URL to hide its true destination (e.g., using hex encoding or misleading domains), not traversing the server file system.

DDirectory traversalCorrect

A directory traversal attack (also called path traversal) uses sequences like '../' to move up the directory hierarchy beyond the intended web root, accessing restricted files or executables. The URL shown navigates to cmd.exe on the Windows system path and appends a command via the query string (?/c+dir+c:\), demonstrating classic traversal exploitation to execute arbitrary OS commands.

Concept tested: Directory traversal attack via URL path manipulation

Source: https://owasp.org/www-community/attacks/Path_Traversal

Topics

#directory traversal#path traversal#URL manipulation#web attacks

Community Discussion

No community discussion yet for this question.

Full GPEN Practice