|
|
| Home > CAPEC List > Individual CAPEC Dictionary Definition (Release 1.1) | View the CAPEC List |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Individual CAPEC Dictionary Definition (Release 1.1)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Using Slashes in Alternate Encoding | |||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Attack Pattern ID | Pattern Abstraction: Detailed 79 | ||||||||||||||||||||||||||||||||||||
| Typical Severity | High | ||||||||||||||||||||||||||||||||||||
| Description | Summary
Attack Execution Flow
| ||||||||||||||||||||||||||||||||||||
| Attack Prerequisites | The application server accepts paths to locate resources. The application server does insufficient input data validation on the resource path requested by the user. The access right to resources are not set properly. | ||||||||||||||||||||||||||||||||||||
| Typical Likelihood of Exploit | High | ||||||||||||||||||||||||||||||||||||
| Methods of Attack |
| ||||||||||||||||||||||||||||||||||||
| Examples-Instances | Description Attack Example: Slashes in Alternate Encodings | ||||||||||||||||||||||||||||||||||||
| Attacker Skill or Knowledge Required | Low: An attacker can try variation of the slashes characters. Medium: An attacker can use more sophisticated tool or script to scan a website and find a path filtering problem. | ||||||||||||||||||||||||||||||||||||
| Probing Techniques | An attacker can try different encoding formats for the slashes characters and see if they produce the same filtering results. Automated tools such as fuzzer can be used to test the URL decoding and filtering. Custom scripts can also be used. For example, a good script for verifying the correct interpretation of UTF-8 encoded characters can be found at http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt | ||||||||||||||||||||||||||||||||||||
| Indicators-Warnings of Attack | If the first path decoding process has left some invalid or blacklisted characters, that may be a sign that the request is malicious. Traffic filtering with IDS (or proxy) can detect request with suspicious URLs. IDS may use signature based identification to reveal such URL based attacks. A attacker can use a fuzzer in order to probe for a UTF-8 encoding vulnerability. The fuzzer should generate suspiscious network activity. | ||||||||||||||||||||||||||||||||||||
| Obfuscation Techniques | Typically the obfuscation here is the use of different alternate encoding format (UTF-8, Unicode, etc,) | ||||||||||||||||||||||||||||||||||||
| Solutions and Mitigations | Any security checks should occur after the data has been decoded and validated as correct data format. Do not repeat decoding process, if bad character are left after decoding process, treat the data as suspicious, and fail the validation process. Refer to the RFCs to safelly decode URL. When client input is required from web-based forms, avoid using the “GET” method to submit data, as the method causes the form data to be appended to the URL and is easily manipulated. Instead, use the “POST method whenever possible. There are tools to scan HTTP requests to the server for valid URL such as URLScan from Microsoft (http://www.microsoft.com/technet/security/tools/urlscan.mspx) Be aware of the threat of alternative method of data encoding and obfuscation technique such as IP address endoding. (See related guideline section) Test your path decoding process against malicious input. In the case of path traversals, use the principle of least privilege when determining access rights to file systems. Do not allow users to access directories/files that they should not access. Assume all input is malicious. Create a white list that defines all valid input to the application based on the requirements specifications. Input that does not match against the white list should not be permitted to enter into the system. | ||||||||||||||||||||||||||||||||||||
| Attack Motivation- |
| ||||||||||||||||||||||||||||||||||||
| Context Description | |||||||||||||||||||||||||||||||||||||
| Injection Vector | The injection vector is a string path such as URL path. | ||||||||||||||||||||||||||||||||||||
| Payload | The injection vector is a string path with malicious slashes characters. Alternate encoding format can also be used to code the slashes characters. | ||||||||||||||||||||||||||||||||||||
| Payload Activation Impact | The impact of the payload is access to unauthorized resources. | ||||||||||||||||||||||||||||||||||||
| Related Weaknesses |
| ||||||||||||||||||||||||||||||||||||
| Related Attack Patterns |
| ||||||||||||||||||||||||||||||||||||
| Related Security Principles |
| ||||||||||||||||||||||||||||||||||||
| Purpose | Penetration Exploitation | ||||||||||||||||||||||||||||||||||||
| CIA Impact |
| ||||||||||||||||||||||||||||||||||||
| Technical Context |
| ||||||||||||||||||||||||||||||||||||
| References | G. Hoglund and G. McGraw. Exploiting Software: How to Break Code. Addison-Wesley, February 2004. UTF-8 and Unicode FAQ for Unix/Linux, by Markus Kuhn - http://www.cl.cam.ac.uk/~mg URL encoded attacks, by Gunter Ollmann - http://www.cgisecurity.com/ | ||||||||||||||||||||||||||||||||||||
| Source |
| ||||||||||||||||||||||||||||||||||||