CAPEC-41 - Using Meta-characters in E-mail Headers to Inject Malicious Payloads

This type of attack involves an attacker leveraging meta-characters in email headers to inject improper behavior into email programs.

Email software has become increasingly sophisticated and feature-rich. In addition, email applications are ubiquitous and connected directly to the Web making them ideal targets to launch and propagate attacks. As the user demand for new functionality in email applications grows, they become more like browsers with complex rendering and plug in routines. As more email functionality is included and abstracted from the user, this creates opportunities for attackers. Virtually all email applications do not list email header information by default, however the email header contains valuable attacker vectors for the attacker to exploit particularly if the behavior of the email client application is known. Meta-characters are hidden from the user, but can contain scripts, enumerations, probes, and other attacks against the user's system.

Severity

Likelihood

Confidentiality

Integrity

Availability

  • Attack Methods 2
  • Injection
  • API Abuse
  • Purposes 1
  • Penetration
  • Scopes 1
  • Execute unauthorized code or commands
  • Availability
  • Integrity
  • Confidentiality

Low level: To distribute email

This attack targets most widely deployed feature rich email applications, including web based email programs.

Step 1 - Identify and characterize metacharacter-processing vulnerabilities in email headers

An attacker creates emails with headers containing various metacharacter-based malicious payloads in order to determine whether the target application processes the malicious content and in what manner it does so..

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

Use an automated tool (fuzzer) to create malicious emails headers containing metacharacter-based payloads.

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

Manually tampering email headers to inject malicious metacharacter-based payload content in them.

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

Type: Positive

The email client processes metacharacters in email headers.

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

Type: Negative

The email client does not process metacharacters in email headers.

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

Type: Negative

The email server will strip the headers that contain metacharacters

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

Type: Inconclusive

The email server lets the malicious metacharacters in the email headers.


Security Control ID: 1

Type: Detective

Monitor email headers for malicious content in metacharacters.


Outcome ID: 1

Type: Success

The email client executes the malicious payload.

Outcome ID: 2

Type: Failure

No malicious content is being delivered in the email by the server.



Step 1 -

An attacker leverages vulnerabilities identified during the Experiment Phase to inject malicious email headers and cause the targeted email application to exhibit behavior outside of its expected constraints..

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

Send emails with specifically-constructed, metacharacter-based malicious payloads in the email headers to targeted systems running email processing applications identified as vulnerable during the Experiment Phase.

Security Control ID: 1

Type: Preventative

Filtering email headers for malicious content.


Outcome ID: 1

Type: Success

The payload executes on the target user's system.



Design: Perform validation on email header data

Implementation: Implement email filtering solutions on mail server or on MTA, relay server.

Implementation: Mail servers that perform strict validation may catch these attacks, because metacharacters are not allowed in many header variables such as dns names