CAPEC-215 - Fuzzing and observing application log data/errors for application mapping

An attacker sends random, malformed, or otherwise unexpected messages to a target application and observes the application's log or error messages returned. Fuzzing techniques involve sending random or malformed messages to a target and monitoring the target's response. The attacker does not initially know how a target will respond to individual messages but by attempting a large number of message variants they may find a variant that trigger's desired behavior. In this attack, the purpose of the fuzzing is to observe the application's log and error messages, although fuzzing a target can also sometimes cause the target to enter an unstable state, causing a crash. By observing logs and error messages, the attacker can learn details about the configuration of the target application and might be able to cause the target to disclose sensitive information.

Severity

Likelihood

Confidentiality

Integrity

Availability

  • Attack Methods 3
  • Analysis
  • Injection
  • Brute Force
  • Purposes 1
  • Exploitation
  • Scopes 1
  • "Varies by context"
  • Confidentiality

Medium level: Although fuzzing parameters is not difficult, and often possible with automated fuzzing tools, interpreting the error conditions and modifying the parameters so as to move further in the process of mapping the application requires detailed knowledge of target platform, the languages and packages used as well as software design.

The target application must fail to sanitize incoming messages adequately before processing.

Fuzzing tools, which automatically generate and send message variants, are necessary for this attack. The attacker must have sufficient access to send messages to the target. The attacker must also have the ability to observe the target application's log and/or error messages in order to collect information about the target.

Step 1 - Probing

The attacker uses fuzzing tools to send random malformed messages to web server and observes for server's log or error message..

Tecnique ID: 1 - Environment(s) env-Web

The attacker uses fuzzing tools to send random malformed messages to web server and observes for server's log or error message.

Indicator ID: 1 - Environment(s) env-Web

Type: Positive

The application's log or error messages contain sensitive information.

Indicator ID: 2 - Environment(s) env-Web

Type: Inconclusive

There is no desired error message returned. This does not mean the application will not disclose sensitive information through error messages.


Security Control ID: 1

Type: Detective

The web server may detect a large amount of HTTP requests from the same host in a short period.

Security Control ID: 2

Type: Preventative

Construct a 'code book' for error messages and /or clean the error messages.


Outcome ID: 1

Type: Success

The application log or error messages contain sensitive information about the application.



Step 1 - Modify the parameters to get the desired information from the error messages.

Attacker usually needs to modify the fuzzing parameters according to the observed error messages to get the desired sensitive information for the application. To defeat correlation, the attacker may try changing the origin IP addresses or client browser identification strings or start a new session from where he left off in obfuscating the attack..

Tecnique ID: 1 - Environment(s) env-Web

Modify the parameters in the fuzzing tool according to the observed error messages. Repeat with enough parameters until the application has been sufficiently mapped.

Tecnique ID: 2 - Environment(s) env-Web

If the application rejects the large amount of fuzzing messages from the same host machine, the attacker needs to hide the attacks by changing the IP addresses or other credentials.

Indicator ID: 1 - Environment(s) env-Web

Type: Positive

The application errors messages/logs contain sensitive information mapping the application.

Indicator ID: 2 - Environment(s) env-Web

Type: Negative

The application errors messages/logs have no sensitive information about the application.


Security Control ID: 1

Type: Detective

The web server may detect a large amount of HTTP requests from the same host in a short period.

Security Control ID: 2

Type: Preventative

Construct a 'code book' for error messages and/or clean the error messages.


Outcome ID: 1

Type: Success

The attacker gets a list of sensitive information mapping the application.



Design: Construct a 'code book' for error messages. When using a code book, application error messages aren't generated in string or stack trace form, but are catalogued and replaced with a unique (often integer-based) value 'coding' for the error. Such a technique will require helpdesk and hosting personnel to use a 'code book' or similar mapping to decode application errors/logs in order to respond to them normally.

Design: wrap application functionality (preferably through the underlying framework) in an output encoding scheme that obscures or cleanses error messages to prevent such attacks. Such a technique is often used in conjunction with the above 'code book' suggestion.

Implementation: Obfuscate server fields of HTTP response.

Implementation: Hide inner ordering of HTTP response header.

Implementation: Customizing HTTP error codes such as 404 or 500.

Implementation: Hide HTTP response header software information filed.

Implementation: Hide cookie's software information filed.

Implementation: Obfuscate database type in Database API's error message.