Dark Mode
Capec-24 Detail
Filter Failure through Buffer Overflow
Detailed Software Likelihood: High Typical Severity: High
Parents: 100
Threats: T62
In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
Not present
| External ID | Source | Link | Description |
|---|---|---|---|
| CAPEC-24 | capec | https://capec.mitre.org/data/definitions/24.html | |
| CWE-120 | cwe | http://cwe.mitre.org/data/definitions/120.html | |
| CWE-119 | cwe | http://cwe.mitre.org/data/definitions/119.html | |
| CWE-118 | cwe | http://cwe.mitre.org/data/definitions/118.html | |
| CWE-74 | cwe | http://cwe.mitre.org/data/definitions/74.html | |
| CWE-20 | cwe | http://cwe.mitre.org/data/definitions/20.html | |
| CWE-680 | cwe | http://cwe.mitre.org/data/definitions/680.html | |
| CWE-733 | cwe | http://cwe.mitre.org/data/definitions/733.html | |
| CWE-697 | cwe | http://cwe.mitre.org/data/definitions/697.html | |
| REF-1 | reference_from_CAPEC | G. Hoglund, G. McGraw, Exploiting Software: How to Break Code, 2004--02, Addison-Wesley |
Explore
-
Survey: The attacker surveys the target application, possibly as a valid and authenticated user
| Techniques |
|---|
| Spidering web sites for inputs that involve potential filtering |
| Brute force guessing of filtered inputs |
Experiment
-
Attempt injections: Try to feed overly long data to the system. This can be done manually or a dynamic tool (black box) can be used to automate this. An attacker can also use a custom script for that purpose.
-
Monitor responses: Watch for any indication of failure occurring. Carefully watch to see what happened when filter failure occurred. Did the data get in?
| Techniques |
|---|
| Brute force attack through black box penetration test tool. |
| Fuzzing of communications protocols |
| Manual testing of possible inputs with attack data. |
| Techniques |
|---|
| Boron tagging. Choose clear attack inputs that are easy to notice in output. In binary this is often 0xa5a5a5a5 (alternating 1s and 0s). Another obvious tag value is all zeroes, but it is not always obvious what goes wrong if the null values get into the data. |
| Check Log files. An attacker with access to log files can look at the outcome of bad input. |
Exploit
-
Abuse the system through filter failure: An attacker writes a script to consistently induce the filter failure.
| Techniques |
|---|
| DoS through filter failure. The attacker causes the system to crash or stay down because of its failure to filter properly. |
| Malicious code execution. An attacker introduces a malicious payload and executes arbitrary code on the target system. |
| An attacker can use the filter failure to introduce malicious data into the system and leverage a subsequent SQL injection, Cross Site Scripting, Command Injection or similar weakness if it exists. |
- Ability to control the length of data passed to an active filter.
Not present
| Low | High |
|---|---|
| An attacker can simply overflow a buffer by inserting a long string into an attacker-modifiable injection vector. The result can be a DoS. | |
| Exploiting a buffer overflow to inject malicious code into the stack of a software system or even the heap can require a higher skill level. |
| Integrity | Availability | Authorization | Access Control | Confidentiality |
|---|---|---|---|---|
| Modify Data | Execute Unauthorized Commands (Run Arbitrary Code) | Bypass Protection Mechanism | Bypass Protection Mechanism | Execute Unauthorized Commands (Run Arbitrary Code) |
| Execute Unauthorized Commands (Run Arbitrary Code) | Unreliable Execution | Bypass Protection Mechanism |
- Sending in arguments that are too long to cause the filter to fail open is one instantiation of the filter failure attack. The Taylor UUCP daemon is designed to remove hostile arguments before they can be executed. If the arguments are too long, however, the daemon fails to remove them. This leaves the door open for attack.
- A filter is used by a web application to filter out characters that may allow the input to jump from the data plane to the control plane when data is used in a SQL statement (chaining this attack with the SQL injection attack). Leveraging a buffer overflow the attacker makes the filter fail insecurely and the tainted data is permitted to enter unfiltered into the system, subsequently causing a SQL injection.
- Audit Truncation and Filters with Buffer Overflow. Sometimes very large transactions can be used to destroy a log file or cause partial logging failures. In this kind of attack, log processing code might be examining a transaction in real-time processing, but the oversized transaction causes a logic branch or an exception of some kind that is trapped. In other words, the transaction is still executed, but the logging or filtering mechanism still fails. This has two consequences, the first being that you can run transactions that are not logged in any way (or perhaps the log entry is completely corrupted). The second consequence is that you might slip through an active filter that otherwise would stop your attack.