Multiple choice technology security

An intruder manipulates the URL which causes the web server to either execute a file or reveal the contents of a file which could be lying anywhere in the file system even out side the document root directory. What type of attack is this?

  1. Cross-Site Scripting

  2. SQL injection

  3. Command injection

  4. Directory traversal

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Directory traversal (also called path traversal) attacks manipulate file paths using sequences like '../' to access files and directories outside the web document root. This can reveal source code, configuration files, or execute arbitrary files.

AI explanation

Directory traversal (path traversal) attacks manipulate file paths in a URL — often using sequences like ../ — to make the server access files outside the intended document root, either executing them or leaking their contents. This is distinct from SQL injection (targets database queries) and command injection (targets OS commands), which don't involve navigating the file system hierarchy via path segments.