CAPEC

Common Attack Pattern Enumeration and Classification
Common Attack Pattern Enumeration and Classification

A Community Knowledge Resource for Building Secure Software

Home > CAPEC List > Individual CAPEC Dictionary Definition (Release 1.1)   View the CAPEC List

Individual CAPEC Dictionary Definition (Release 1.1)
Individual CAPEC Dictionary Definition (Release 1.1)

Using Meta-characters in E-mail Headers to Inject Malicious Payloads
Attack Pattern ID
Pattern Abstraction: Detailed

41

Typical Severity

High

Description

Summary


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 containt scripts, enumerations, probes, and other attacks against the user's system.

Attack Prerequisites

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

Typical Likelihood of Exploit

High

Methods of Attack
  • Injection
  • API Abuse
Examples-Instances

Description



To: <someone@example.com>
From: <badguy@example.com>
Header<SCRIPT>payme</SCRIPT>def: whatever

Description

Meta-characters are among the most valuable tools attackers have to deceive users into taking some action on their behalf. E-mail is perhaps the most efficient and cost effective attack distribution tool available, this has led to the phishing pandemic.

Meta-characters like \w \s \d ^ can allow the attacker to escape out of the expected behavior to execute additional commands. Escaping out the process (such as email client) lets the attacker run arbitrary code in the user's process.

Attacker Skill or Knowledge Required

Low → to distribute email

Solutions and Mitigations

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

Attack Motivation-Consequences
  • Run Arbitrary Code
Context Description


“Attack Pattern: Meta-Characters in E-mail Header
Meta-characters can be supplied in an e-mail header and may be consumed by the client software to interesting effect."

[Hoglund and McGraw 04]

Injection Vector

Email

Payload

Metacharacters

Activation Zone

Email processing routines of Email program

Payload Activation Impact

Enables attacker to execute server side code with any commands that the program owner has privileges to.

Related Weaknesses
CWE-IDWeakness NameWeakness Relationship Type
150Failure to Sanitize Escape, Meta, or Control SequencesTargeted
88Argument Injection or ModificationTargeted
Purpose

Penetration

CIA Impact
Confidentiality ImpactIntegrity ImpactAvailability Impact
HighHighHigh
Technical Context
Architectural ParadigmFrameworkPlatformLanguage
AllAllAllAll
References

G. Hoglund and G. McGraw. Exploiting Software: How to Break Code. Addison-Wesley, February 2004.

Source
Submission(s)
SubmitterOrganizationDateComment
G. Hoglund and G. McGraw. Exploiting Software: How to Break Code. Addison-Wesley, February 2004.Cigital, Inc2007-01-01
Modification(s)
ModifierOrganizationDateComment
Gunnar PetersonCigital, Inc2007-02-28Fleshed out content to CAPEC schema from the original descriptions in "Exploiting Software"
Sean BarnumCigital, Inc2007-03-09Review and revise
Richard StruseVOXEM, Inc2007-03-26Review and feedback leading to changes in Name, Description and Examples
Sean BarnumCigital, Inc2007-04-13Modified pattern content according to review and feedback
 
Page Last Updated: April 18, 2008