CAPEC-43
Exploiting Multiple Input Interpretation Layers
An attacker supplies the target software with input data that contains sequences of special characters designed to bypass input validation logic. This exploit relies on the target making multiples passes over the input data and processing a "layer" of special characters with each pass. In this manner, the attacker can disguise input that would otherwise be rejected as invalid by concealing it with layers of special/escape characters that are stripped off by subsequent processing steps. The goal is to first discover cases where the input validation layer executes before one or more parsing layers. That is, user input may go through the following logic in an application: <parser1> --> <input validator> --> <parser2>. In such cases, the attacker will need to provide input that will pass through the input validator, but after passing through parser2, will be converted into something that the input validator was supposed to stop.
Soyutlama
Detailed
Tipik ciddiyet
High
Saldırı ihtimali
Medium
Saldırıyı anla
Bu saldırı kalıbı nedir?
Uygulama akışı
Saldırı adım adım nasıl ilerler?
Explore
Determine application/system inputs where bypassing input validation is desired
Kullanılan teknikler
- While using an application/system, the attacker discovers an input where validation is stopping them from performing some malicious or unauthorized actions.
Experiment
Determine which character encodings are accepted by the application/system
Kullanılan teknikler
- Determine which escape characters are accepted by the application/system. A common escape character is the backslash character, '\'
- Determine whether URL encoding is accepted by the application/system.
- Determine whether UTF-8 encoding is accepted by the application/system.
- Determine whether UTF-16 encoding is accepted by the application/system.
- Determine if any other encodings are accepted by the application/system.
Combine multiple encodings accepted by the application.
Kullanılan teknikler
- Combine same encoding multiple times and observe its effects. For example, if special characters are encoded with a leading backslash, then the following encoding may be accepted by the application/system: "\\\.". With two parsing layers, this may get converted to "\." after the first parsing layer, and then, to "." after the second. If the input validation layer is between the two parsing layers, then "\\\.\\\." might pass a test for ".." but still get converted to ".." afterwards. This may enable directory traversal attacks.
- Combine multiple encodings and observe the effects. For example, the attacker might encode "." as "\.", and then, encode "\." as "\.", and then, encode that using URL encoding to "%26%2392%3B%26%2346%3B"
Exploit
Leverage ability to bypass input validation
Kullanılan teknikler
- Gain access to sensitive files.
- Perform command injection.
- Perform SQL injection.
- Perform XSS attacks.
Gereksinimler
Saldırının gerçekleşmesi için ne gerekir?
Ön koşullar
- User input is used to construct a command to be executed on the target system or as part of the file name.
- Multiple parser passes are performed on the data supplied by the user.
Gerekli beceri
- Medium: Knowledge of various escaping schemes, such as URL escape encoding and XML escape characters.
Gerekli kaynak
MITRE kaydında belirtilmemiş.
Tespit
Saldırının göstergeleri nelerdir?
Etki
Başarılı saldırı neye yol açar?
Etkilenen alanlar: Integrity
Etkilenen alanlar: Confidentiality, Access Control, Authorization
Etkilenen alanlar: Confidentiality
Savunma
Nasıl önlenir ve etkisi azaltılır?
Gerçek dünya