Dark Mode
Capec-126 Detail
Path Traversal
Standard Software Likelihood: High Typical Severity: Very High
Parents: 153
Children: 76 139 597
Threats: T62 T290 T291
Tools: 18
Not present
| External ID | Source | Link | Description |
|---|---|---|---|
| CAPEC-126 | capec | https://capec.mitre.org/data/definitions/126.html | |
| CWE-22 | cwe | http://cwe.mitre.org/data/definitions/22.html | |
| 33 | WASC | http://projects.webappsec.org/Path-Traversal | Path Traversal |
| OWASP Attacks | https://owasp.org/www-community/attacks/Path_Traversal | Path Traversal | |
| REF-1 | reference_from_CAPEC | G. Hoglund, G. McGraw, Exploiting Software: How to Break Code, 2004--02, Addison-Wesley | |
| REF-9 | reference_from_CAPEC | https://www.owasp.org/index.php/Testing_for_Path_Traversal_(OWASP-AZ-001) | OWASP Testing Guide (v4), 2010, The Open Web Application Security Project (OWASP) |
| REF-10 | reference_from_CAPEC | http://projects.webappsec.org/w/page/13246952/Path-Traversal | WASC Threat Classification 2.0, 2010, The Web Application Security Consortium (WASC) |
Explore
-
Fingerprinting of the operating system: In order to perform a valid path traversal, the attacker needs to know what the underlying OS is so that the proper file seperator is used.
-
Survey the Application to Identify User-controllable Inputs: The attacker surveys the target application to identify all user-controllable file inputs
| Techniques |
|---|
| Port mapping. Identify ports that the system is listening on, and attempt to identify inputs and protocol types on those ports. |
| TCP/IP Fingerprinting. The attacker uses various software to make connections or partial connections and observe idiosyncratic responses from the operating system. Using those responses, they attempt to guess the actual operating system. |
| Induce errors to find informative error messages |
Experiment
-
Vary inputs, looking for malicious results: Depending on whether the application being exploited is a remote or local one, the attacker crafts the appropriate malicious input containing the path of the targeted file or other file system control syntax to be passed to the application
Exploit
-
Manipulate files accessible by the application: The attacker may steal information or directly manipulate files (delete, copy, flush, etc.)
- The attacker must be able to control the path that is requested of the target.
- The target must fail to adequately sanitize incoming paths
- The ability to manually manipulate path information either directly through a client application relative to the service or application or via a proxy application.
| Low | Medium |
|---|---|
| Simple command line attacks or to inject the malicious payload in a web page. | |
| Customizing attacks to bypass non trivial filters in the application. |
| Integrity | Availability | Confidentiality |
|---|---|---|
| Execute Unauthorized Commands (The attacker may be able to create or overwrite critical files that are used to execute code, such as programs or libraries.) | Execute Unauthorized Commands (The attacker may be able to create or overwrite critical files that are used to execute code, such as programs or libraries.) | Execute Unauthorized Commands (The attacker may be able to create or overwrite critical files that are used to execute code, such as programs or libraries.) |
| Modify Data (The attacker may be able to overwrite or create critical files, such as programs, libraries, or important data. If the targeted file is used for a security mechanism, then the attacker may be able to bypass that mechanism. For example, appending a new account at the end of a password file may allow an attacker to bypass authentication.) | Unreliable Execution (The attacker may be able to overwrite, delete, or corrupt unexpected critical files such as programs, libraries, or important data. This may prevent the software from working at all and in the case of a protection mechanisms such as authentication, it has the potential to lockout every user of the software.) | Read Data (The attacker may be able read the contents of unexpected files and expose sensitive data. If the targeted file is used for a security mechanism, then the attacker may be able to bypass that mechanism. For example, by reading a password file, the attacker could conduct brute force password guessing attacks in order to break into an account on the system.) |
- An example of using path traversal to attack some set of resources on a web server is to use a standard HTTP request http://example/../../../../../etc/passwd From an attacker point of view, this may be sufficient to gain access to the password file on a poorly protected system. If the attacker can list directories of critical resources then read only access is not sufficient to protect the system.