<?xml version="1.0" encoding="UTF-8"?>

        <Common_Attack_Pattern_Enumeration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://capec.mitre.org/data/xsd/ap_schema_v1.7.xsd">
                <Attack_Pattern CAPEC_ID="3" Name="Using Leading 'Ghost' Character Sequences to Bypass Input Filters" Pattern_Abstraction="Detailed">
		<Description>
			<Summary>
An attacker intentionally introduces leading characters that enable getting the input past the filters.  The API that is being targetted, ignores the leading "ghost" characters, and therefore processes the attacker's input.  This occurs when the targetted API will accept input data in several syntactic forms and interpret it in the equivalent semantic way, while the filter does not take into account the full spectrum of the syntactic forms acceptable to the targetted API.

Some APIs will strip certain leading characters from a string of parameters. Perhaps these characters are considered redundant, and for this reason they are removed. Another possibility is the parser logic at the beginning of analysis is specialized in some way that causes some characters to be removed. The attacker can specify multiple types of alternative encodings at the beginning of a string as a set of probes.

One commonly used possibility involves adding ghost characters—extra characters that don’t affect the validity of the request at the API layer. If the attacker has access to the API libraries being targeted, certain attack ideas can be tested directly in advance. Once alternative ghost encodings emerge through testing, the attacker can move from lab-based API testing to testing real-world service implementations.		
	    </Summary>
			<Attack_Execution_Flow>
				<Attack_Phase Name="">
					<Attack_Step>
						<Attack_Step_Description>
						Determine if the source code is available and if so, examine the filter logic.
					</Attack_Step_Description>
					</Attack_Step>
					<Attack_Step>
						<Attack_Step_Description>
						If the source code is not available, write a small program that loops through various possible inputs to given API call and tries a variety of alternate (but equivalent) encodings of strings with leading ghost characters.  Knowlege of frameworks and libraries used and what filters they apply will help to make this search more structured. 
					</Attack_Step_Description>
					</Attack_Step>
					<Attack_Step>
						<Attack_Step_Description>
						 Observe the effects.  See if the probes are getting past the filters.  Identify a string that is semantically equivalent to that which an attacker wants to pass to the targeted API, but syntactically structured in a way as to get past the input filter.  That encoding will contain certain ghost characters that will help it get past the filters.  These ghost characters will be ignored by the targeted API.			
					</Attack_Step_Description>
					</Attack_Step>
					<Attack_Step>
						<Attack_Step_Description>
						Once the "winning" alternate  encoding using (typically leading) ghost characters is identified, an attacker can launch the attacks against the targetted API (e.g. directory traversal attack, arbitrarary shell command execution, corruption of files)
					</Attack_Step_Description>
					</Attack_Step>
				</Attack_Phase>
			</Attack_Execution_Flow>
		</Description>
		<Attack_Prerequisites>
			<Attack_Prerequisite>
				The targetted API must ignore the leading ghost characters that are used to get past the filters for the semantics to be the same.
			</Attack_Prerequisite>
		</Attack_Prerequisites>
		<Typical_Severity>Medium</Typical_Severity>
		<Typical_Likelihood_of_Exploit>
			<Likelihood>Medium</Likelihood>
		</Typical_Likelihood_of_Exploit>
		<Methods_of_Attack>
			<Method_of_Attack>Injection</Method_of_Attack>
			<Method_of_Attack>API Abuse</Method_of_Attack>
		</Methods_of_Attack>
		<Examples-Instances>
			<Example-Instance>
				<Example-Instance_Description>Alternate Encoding with Ghost Characters in FTP and Web Servers

Some web and FTP servers fail to detect prohibited upward directory traversals if the user-supplied pathname contains extra characters such as an extra leading dot.  For example, a program that will disallow access to the pathname “../test.txt” may erroneously allow access to that file if the pathname is specified as “…/test.txt”.  This attack succeeds because 1) the input validation logic fails to detect the triple-dot as a directory traversal attempt (since it isn’t dot-dot), 2) some part of the input processing decided to strip off the “extra” dot, leaving the dot-dot behind.

Using the file system API as the target, the following strings are all equivalent to many programs:

.../../../test.txt
............/../../test.txt
..?/../../test.txt
..????????/../../test.txt
../test.txt

As you can see, there are many ways to make a semantically equivalent request. All these strings ultimately result in a request for the file ../test.txt.
				</Example-Instance_Description>
				<Example-Instance_Related_Vulnerability/>
			</Example-Instance>
		</Examples-Instances>
		<Attacker_Skill_or_Knowledge_Required>
			Medium
		</Attacker_Skill_or_Knowledge_Required>
		<Resources_Required/>
		<Solutions_and_Mitigations>
			<Solution_or_Mitigation>
				Perform white list rather than black list input validation.   
			</Solution_or_Mitigation>
			<Solution_or_Mitigation>
			 Canonicalize all data prior to validation.
			</Solution_or_Mitigation>
			<Solution_or_Mitigation>
			Take an iterative approach to input validation (defense in depth).
			</Solution_or_Mitigation>
		</Solutions_and_Mitigations>
		<Attack_Motivation-Consequences>
			<Attack_Motivation-Consequence>Privilege Escalation</Attack_Motivation-Consequence>
			<Attack_Motivation-Consequence>Data Modification</Attack_Motivation-Consequence>
		</Attack_Motivation-Consequences>
		<Context_Description>
		
Building “Equivalent” Requests

A large number of commands are subject to parsing or filtering. In many cases a filter only considers one particular way to format a command. The fact is that the same command can usually be encoded in thousands of different ways. In many cases, an alternative encoding for the command will produce exactly the same results as the original command. Thus, two commands that look different from the logical perspective of a filter end up producing the same semantic result. In many cases, an alternatively encoded command can be used to attack a software system, because the alternative command allows an attacker to perform an operation that would otherwise be blocked.

Mapping the API Layer

A good approach to help identify and map possible alternate encodings involves writing a small program that loops through all possible inputs to a given API call. This program can, for example, attempt to encode filenames in a variety of ways. For each iteration of the loop, the “mungified” filename can be passed to the API call and the result noted.

The following code snippet loops through many possible values that can be used as a prefix to the string \test.txt. Results of running a program like this can help us to determine which characters can be used to perform a ../../ (dots and slashes) relative traversal attack.

int main(int argc, char* argv[])
{
   for(unsigned long c=0x01010101;c != -1;c++)
   {
        char _filepath[255];
        sprintf(_filepath, "%c%c%c%c\\test.txt", c &gt;&gt; 24, c &gt;&gt; 16, c &gt;&gt; 8, c&amp;0x000000FF );

        try
       {
       FILE *in_file = fopen(_filepath, "r");

       if(in_file)
      {
             printf("checking path %s\n", _filepath);
             puts("file opened!");
             getchar();
             fclose(in_file);
      }
      }
      catch(...)
     {

     }
  }
  return 0;
}

Slight (but still automatic) modifications can be made to the string in creative ways. Ultimately, the modified string boils down to an attempt to use different tricks to obtain the same file. For example, one resulting attempt might try a command like this:

sprintf(_filepath, "..%c\\..%c\\..%c\\..%c\\scans2.txt", c, c, c, c);

A good way to think about this problem is to think of layers. The API call layer is what the examples shown here are mapping. If an engineer has placed any filters in front of the API call, then these filters can be considered additional layers, wrapping the original set of possibilities. By pondering all the possible inputs that can be provided at the API layer, we can begin uncovering and exercising any filters that the software has in place. If we know that the software definitely uses file API calls, we can try all kinds of filename encoding tricks that we know about. If we get lucky, eventually one set of encoding tricks will work, and we can get our data successfully through the filters and into the API call.

Drawing on the techniques described in Chapter 5 of "Exploiting Software: How to Break Code" (See reference - G. Hoglund and G. McGraw) , we can list a number of possible escape codes that can be injected into API calls (many of which help with the filter avoidance problem). If the data are eventually being piped into a shell, for example, we might be able to get control codes to take effect. A particular call may write data to a file or a stream that are eventually meant to be viewed on a terminal or in a client program. As a simple example, the following string contains two backspace characters that
are very likely to show up in the terminal’s execution:

write("echo hey!\x08\x08");

When the terminal interprets the data we have passed in, the output will be missing the last two characters of the original string. This kind of trick has been used for ages to corrupt data in log files. Log files capture all kinds of data about a transaction. It may be possible to insert NULL characters (for
example, %00 or '\0') or to add so many extra characters to the string that the request is truncated in the log. Imagine a request that has more than a thousand extra characters tacked on at the end. Ultimately, the string may be trimmed in the log file, and the important telltale data that expose an attack will be lost.

Ghost Characters

Ghost characters are extra characters that can be added to a request. The extra characters are designed not to affect the validity of the request. One easy example involves adding extra slashes to a filename. In many cases, the strings

/some/directory/test.txt

and

/////////////////some/////////////directory//////////////test.txt

are equivalent requests.		

From G. Hoglund and G. McGraw. Exploiting Software: How to Break Code. Addison-Wesley,	 February 2004.
		</Context_Description>
		<Injection_Vector>
				Web Form, URL, Network Socket, File
		</Injection_Vector>
		<Payload>
			The payload is the parameter that an attacker is supplying to the targetted API that will allow the attacker to elevate privilege and subvert the authorization service.
		</Payload>
		<Activation_Zone>
			The targetted API is the activation zone.  These attacks often target the file system or the shell to execute commands.
		</Activation_Zone>
		<Payload_Activation_Impact>
			Failure in authorization service may lead to compromises in data confidentiality and integrity.
		</Payload_Activation_Impact>
		<Related_Weaknesses>
			<Related_Weakness>
				<CWE_ID>173</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>41</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>172</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>171</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>179</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>180</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>181</CWE_ID>
				<Weakness_Relationship_Type>Secondary</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>183</CWE_ID>
				<Weakness_Relationship_Type>Secondary</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>184</CWE_ID>
				<Weakness_Relationship_Type>Secondary</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>20</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>74</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
		</Related_Weaknesses>
		<Related_Security_Principles>
			<Related_Security_Principle>
				Defense in Depth
			</Related_Security_Principle>
			<Related_Security_Principle>
				Reluctance to Trust
			</Related_Security_Principle>
			<Related_Security_Principle>
				Least Privilege
			</Related_Security_Principle>
		</Related_Security_Principles>
		<Related_Guidelines>
			<Related_Guideline>Perform input validation and filtering on data in its canonical form.</Related_Guideline>
			<Related_Guideline>Understand the APIs to which user input will be passed and know how permissive they are.  Perform appropriate input validation given that information.</Related_Guideline>
		</Related_Guidelines>
		<Purpose>Exploitation</Purpose>
		<CIA_Impact>
			<Confidentiality_Impact>Low</Confidentiality_Impact>
			<Integrity_Impact>Low</Integrity_Impact>
			<Availability_Impact>High</Availability_Impact>
		</CIA_Impact>
		<Technical_Context>
			<Architectural_Paradigm>All</Architectural_Paradigm>
			<Framework>All</Framework>
			<Platform>All</Platform>
			<Language>All</Language>
		</Technical_Context>
		<References>
			<Reference>G. Hoglund and G. McGraw. Exploiting Software: How to Break Code. Addison-Wesley,	 February 2004.
				</Reference>
		</References>
		<Source>
			<Submission>
				<Submitter>G. Hoglund and G. McGraw. Exploiting Software: How to Break Code. Addison-Wesley, February 2004.</Submitter>
				<Submitter_Organization>Cigital, Inc</Submitter_Organization>
				<Submission_Date>2007-03-01</Submission_Date>
			</Submission>
			<Modification>
				<Modifier>Eugene Lebanidze</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-02-26</Modification_Date>
				<Modification_Comment>Fleshed out content to CAPEC schema from the original descriptions in "Exploiting Software"</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Sean Barnum</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-03-05</Modification_Date>
				<Modification_Comment>Review and revise</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Richard Struse</Modifier>
				<Modifier_Organization>VOXEM, Inc</Modifier_Organization>
				<Modification_Date>2007-03-26</Modification_Date>
				<Modification_Comment>Review and feedback leading to changes in Name, Attack Execution Flow and Examples</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Sean Barnum</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-04-13</Modification_Date>
				<Modification_Comment>Modified pattern content according to review and feedback</Modification_Comment>
			</Modification>
		</Source>
	</Attack_Pattern>
                <Attack_Pattern CAPEC_ID="4" Name="Using Alternative IP Address Encodings" Pattern_Abstraction="Detailed">
		<Description>
			<Summary>This attack relies on the attacker using unexpected formats for representing IP addresses. Networked applications may expect network location information in a specific format, such as fully qualified domains names, URL, IP address, or IP Address ranges. The issue that the attacker can exploit is that these design assumptions may not be validated against a variety of different possible encodings and network address location formats. Applications that use naming for creating policy namespaces for managing access control may be susceptible to queryin directly by IP addresses, which is ultimately  a more generally authoritative way of communicating on a network.
			Alternative IP addresses can be used by the attacker to bypass application access control in order to gain access to data that is only protected by obscuring its location. 
			In addition this type of attack can be used as a reconnaissance mechansim to provide entry point information that the attacker gathers to penetrate deeper into the system.</Summary>
		</Description>
		<Attack_Prerequisites>
			<Attack_Prerequisite>
				The target software must fail to anticipate all of the possible valid encodings of an IP/web address.
				</Attack_Prerequisite>
		</Attack_Prerequisites>
		<Typical_Severity>High</Typical_Severity>
		<Typical_Likelihood_of_Exploit>
			<Likelihood>Medium</Likelihood>
		</Typical_Likelihood_of_Exploit>
		<Methods_of_Attack>
			<Method_of_Attack>Injection</Method_of_Attack>
			<Method_of_Attack>Protocol Manipulation</Method_of_Attack>
			<Method_of_Attack>API Abuse</Method_of_Attack>
		</Methods_of_Attack>
		<Examples-Instances>
			<Example-Instance>
				<Example-Instance_Description>
					An attacker identifies an application server that applies a security policy based on the domain and application name, so the access control policy covers authentication and authorization for anyone accessing http://example.domain:8080/application. However, by putting in the IP address of the host the application authentication and authorization controls may be bypassed http://192.168.0.1:8080/application. The attacker relies on the victim applying policy to the namespace abstraction and not having a default deny policy in place to manage exceptions.
				</Example-Instance_Description>
			</Example-Instance>
		</Examples-Instances>
		<Attacker_Skill_or_Knowledge_Required>
			Low → The attacker has only to try IP address combinations. 
		</Attacker_Skill_or_Knowledge_Required>
		<Resources_Required>
			Ability to communicate with server. Optionally, ability to capture output directly through synchronous communication or other method such as FTP.
		</Resources_Required>
		<Solutions_and_Mitigations>
			<Solution_or_Mitigation>
				Design: Default deny access control policies 
			</Solution_or_Mitigation>
			<Solution_or_Mitigation>
				Design: Input validation routines should check and enforce both input data types and content against a positive specification. In regards to IP addresses, this should include the authorized manner for the application to represent IP addresses and not accept user specified IP addresses and IP address formats (such as ranges)
			</Solution_or_Mitigation>
			<Solution_or_Mitigation>
				Implementation: Perform input validation for all remote content.
			</Solution_or_Mitigation>
		</Solutions_and_Mitigations>
		<Attack_Motivation-Consequences>
			<Attack_Motivation-Consequence>Privilege Escalation</Attack_Motivation-Consequence>
		</Attack_Motivation-Consequences>
		<Context_Description>
		“Attack Pattern: Alternative IP Addresses
		"IP address ranges can be represented using alternative methods. Here are some examples:
		192.168.0.0/24
		192.168.0.0/255.255.255.0
		192.168.0.*
		
		Classic encoding techniques can be directed against IP numbers as well."
		
		[Hoglund and McGraw 04]
		</Context_Description>
		<Injection_Vector>
			Malicious input delivered through standard input 
		</Injection_Vector>
		<Payload>
			Varies with instantiation of attack pattern. Malicious payload may be passed directly from appliation client, such as the web browser.
		</Payload>
		<Activation_Zone>
			Client machine and client network 
		</Activation_Zone>
		<Payload_Activation_Impact>
			Enables attacker to view and access unexpected network services.
		</Payload_Activation_Impact>
		<Related_Weaknesses>
			<!-- Need new CWE under Pathname Traversal and Equivalence Errors focused on IP address/domain name equivalence issues -->
			<Related_Weakness>
				<CWE_ID>291</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>180</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>41</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>345</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
		</Related_Weaknesses>
		<Purpose>Penetration</Purpose>
		<CIA_Impact>
			<Confidentiality_Impact>Medium</Confidentiality_Impact>
			<Integrity_Impact>Medium</Integrity_Impact>
			<Availability_Impact>High</Availability_Impact>
		</CIA_Impact>
		<Technical_Context>
			<Architectural_Paradigm>All</Architectural_Paradigm>
			<Framework>All</Framework>
			<Platform>All</Platform>
			<Language>All</Language>
		</Technical_Context>
		<References>
			<Reference>
				G. Hoglund and G. McGraw. Exploiting Software: How to Break Code. Addison-Wesley, February 2004.
			</Reference>
		</References>
		<Source>
			<Submission>
				<Submitter>G. Hoglund and G. McGraw. Exploiting Software: How to Break Code. Addison-Wesley, February 2004.</Submitter>
				<Submitter_Organization>Cigital, Inc</Submitter_Organization>
				<Submission_Date>2007-01-01</Submission_Date>
			</Submission>
			<Modification>
				<Modifier>Gunnar Peterson</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-02-28</Modification_Date>
				<Modification_Comment>Fleshed out content to CAPEC schema from the original descriptions in "Exploiting Software"</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Sean Barnum</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-03-09</Modification_Date>
				<Modification_Comment>Review and revise</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Richard Struse</Modifier>
				<Modifier_Organization>VOXEM, Inc</Modifier_Organization>
				<Modification_Date>2007-03-26</Modification_Date>
				<Modification_Comment>Review and feedback leading to changes in Name, Attack Prerequisites,Resources Required and Method of Attack</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Sean Barnum</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-04-13</Modification_Date>
				<Modification_Comment>Modified pattern content according to review and feedback</Modification_Comment>
			</Modification>
		</Source>
	</Attack_Pattern>
                <Attack_Pattern CAPEC_ID="5" Name="Analog In-band Switching Signals (aka Blue Boxing)" Pattern_Abstraction="Detailed">
		<Description>
			<Summary>
		This attack against older telephone switches and trunks has been around for decades. The signal is sent by the attacker to impersonate a supervisor signal. This has the effect of rerouting or usurping command of the line and call. While the US infrastructure proper may not contain widespread vulnerabilities to this type of attack, many companies are connected globally through call centers and business process outsourcing. These international systems may be operated in countries which have not upgraded telco infrastructure and so are vulnerable to Blue boxing.

		Blue boxing is a result of failure on the part of the system to enforce strong authentication for administrative functions. While the infrastructure is different than standard current applications like web applications, there are hisotrical lessons to be learned to upgrade the access control for administrative functions.
		</Summary>
		</Description>
		<Attack_Prerequisites>
			<Attack_Prerequisite>
				System must use weak authentication mechanisms for administrative functions.
			</Attack_Prerequisite>
		</Attack_Prerequisites>
		<Typical_Severity>Very High</Typical_Severity>
		<Typical_Likelihood_of_Exploit>
			<Likelihood>Medium</Likelihood>
		</Typical_Likelihood_of_Exploit>
		<Methods_of_Attack>
			<Method_of_Attack>Injection</Method_of_Attack>
			<Method_of_Attack>Protocol Manipulation</Method_of_Attack>
		</Methods_of_Attack>
		<Examples-Instances>
			<Example-Instance>
				<Example-Instance_Description>
					Attacker identifies a vulnerable CCITT-5 phone line, and sends a combination tone to the switch in order to request administrative access. Based on tone and timing parameters the request is verified for access to the switch. Once the attacker has gained control of the switch launching calls, routing calls, and a whole host of opportunities are available.
				</Example-Instance_Description>
			</Example-Instance>
		</Examples-Instances>
		<Attacker_Skill_or_Knowledge_Required>
			Low: Given a vulnerable phone system, the attacker's technical vector relies on attacks that are well documented in cracker 'zines and have been around for decades.
		</Attacker_Skill_or_Knowledge_Required>
		<Resources_Required>
			CCITT-5 or other vulnerable lines, with the ability to send tones such as combined 2,400 Hz and 2,600 Hz tones to the switch
		</Resources_Required>
		<Solutions_and_Mitigations>
			<Solution_or_Mitigation>
				Implementation: Upgrade phone lines. Note this may be prohibitively expensive
			</Solution_or_Mitigation>
			<Solution_or_Mitigation>
				Use strong access control such as two factor access control for adminsitrative access to the switch
			</Solution_or_Mitigation>
		</Solutions_and_Mitigations>
		<Attack_Motivation-Consequences>
			<Attack_Motivation-Consequence>Denial of Service</Attack_Motivation-Consequence>
			<Attack_Motivation-Consequence>Privilege Escalation</Attack_Motivation-Consequence>
		</Attack_Motivation-Consequences>
		<Context_Description>
		“Attack Pattern: Analog In-band Switching Signals (aka "Blue Boxing")
		Many people have heard of 2600, the frequency used in the United States to control telephone switches during the 1960s and 1970s. (Come to think of it, probably more people have heard of the hacker 'zine 2600 and its associated club than have heard of the reason for the name of the club,) Most systems are no longer vulnerable to ancient phreaking attacks. However older systems are still found internationally. Overseas trunk lines that use trans-Atlantic cabling are prone to the in-band signal problem, and they are too expensive a resource to abandon. Thus, many overseas (home-country direct) 800/888 numbers are known to have in-band signal problems even today.

		Consider the CCITT-5(C5) signaling system that is used internationally. This system does not use the commonly known 2,600 Hz, but instead uses 2,400Hz as a control signal. If you have ever heard the "pleeps" and chirps on the Pink Floyd album "The Wall," then you have heard C5 signals. There are millions of phone lines still in operation today that are routed through switches with in-band signaling.

		This attack pattern involves playing specific control commands across a normal voice link, thus seizing control of the line, rerouting calls, and so on."

		[Hoglund and McGraw 04]
		</Context_Description>
		<Injection_Vector>
			Payload delivered through standard communication protocols.
		</Injection_Vector>
		<Payload>
			Command(s) executed directly on host
		</Payload>
		<Activation_Zone>
			Client machine and client network
		</Activation_Zone>
		<Payload_Activation_Impact>
			Enables calls to be rerouted.
		</Payload_Activation_Impact>
		<Related_Weaknesses>
			<Related_Weakness>
				<CWE_ID>264</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
		</Related_Weaknesses>
		<Purpose>Penetration</Purpose>
		<CIA_Impact>
			<Confidentiality_Impact>Low</Confidentiality_Impact>
			<Integrity_Impact>Medium</Integrity_Impact>
			<Availability_Impact>Medium</Availability_Impact>
		</CIA_Impact>
		<Technical_Context>
			<Architectural_Paradigm>Other</Architectural_Paradigm>
			<Framework>Other</Framework>
			<Platform>Other</Platform>
			<Language>All</Language>
		</Technical_Context>
		<References>
			<Reference>
			G. Hoglund and G. McGraw. Exploiting Software: How to Break Code. Addison-Wesley, February 2004.
			</Reference>
		</References>
		<Source>
			<Submission>
				<Submitter>G. Hoglund and G. McGraw. Exploiting Software: How to Break Code. Addison-Wesley, February 2004.</Submitter>
				<Submitter_Organization>Cigital, Inc</Submitter_Organization>
				<Submission_Date>2007-01-01</Submission_Date>
			</Submission>
			<Modification>
				<Modifier>Gunnar Peterson</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-02-28</Modification_Date>
				<Modification_Comment>Fleshed out content to CAPEC schema from the original descriptions in "Exploiting Software"</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Sean Barnum</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-03-09</Modification_Date>
				<Modification_Comment>Review and revise</Modification_Comment>
			</Modification>
		</Source>
	</Attack_Pattern>
                <Attack_Pattern CAPEC_ID="7" Name="Blind SQL Injection" Pattern_Abstraction="Detailed">
		<Description>
			<Summary>Blind SQL Injection results from an insufficient mitigation for SQL Injection. Although suppressing database error messages are considered best practice, the suppression alone is not sufficient to prevent SQL Injection. Blind SQL Injection is a form of SQL Injection that overcomes the lack of error messages.  Without the error messages that facilitate SQL Injection, the attacker constructs input strings that probe the target through simple Boolean SQL expressions.  The attacker can determine if the syntax and structure of the injection was successful based on whether the query was executed or not.  Applied iteratively, the attacker determines how and where the target is vulnerable to SQL Injection.
        In order to achieve this using Blind SQL Injection, an attacker:
      
      For example, an attacker  may try entering something like "username' AND 1=1; --" in an input field. If the result is the same as when the attacker entered "username" in the field, then the attacker knows that the application is vulnerable to SQL Injection. The attacker can then ask yes/no questions from the database server to extract information from it. For example,  the attacker can extract table names from a database using the following types of queries:
      "username' AND ascii(lower(substring((SELECT TOP 1 name FROM sysobjects WHERE xtype='U'), 1, 1))) &gt; 108".
      
      If the above query executes properly, then the attacker knows that the first character in a table name in the database is a letter between m and z. If it doesn't, then the attacker knows that the character must be between a and l (assuming of course that table names only contain alphabetic characters). By performing a binary search on all character positions, the attacker can determine all table names in the database. Subsequently, the attacker may execute an actual attack and send something like:
      "username'; DROP TABLE trades; --
      </Summary>
			<Attack_Execution_Flow>
				<Attack_Phase Name="Explore">
					<Attack_Step>
						<Attack_Step_Title>Hypothesize SQL queries in application</Attack_Step_Title>
						<Attack_Step_Description>Generated hypotheses regarding the SQL queries in an application. For example, the attacker may hypothesize that his input is passed directly into a query that looks like:
            "SELECT * FROM orders WHERE ordernum = _____"
            or
            "SELECT * FROM orders WHERE ordernum IN (_____)"
            or
            "SELECT * FROM orders WHERE ordernum in (_____) ORDER BY _____"
            
            Of course, there are many other possibilities.
            </Attack_Step_Description>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Research types of SQL queries and determine which ones could be used at various places in an application.</Attack_Step_Technique_Description>
							<Environments>env-All</Environments>
						</Attack_Step_Technique>
					</Attack_Step>
					<Attack_Step>
						<Attack_Step_Title>Determine how to inject information into the queries</Attack_Step_Title>
						<Attack_Step_Description>Determine how to inject information into the queries from the previous step such that the injection does not impact their logic. For example, the following are possible injections for those queries:
            "5' OR 1=1; --"
            and
            "5) OR 1=1; --"
            and
            "ordernum DESC; --"
            </Attack_Step_Description>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Add clauses to the SQL queries such that the query logic does not change.</Attack_Step_Technique_Description>
							<Environments>env-All</Environments>
						</Attack_Step_Technique>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Add delays to the SQL queries in case server does not provide clear error  messages (e.g. WAITFOR DELAY '0:0:10' in SQL Server or BENCHMARK(1000000000,MD5(1) in MySQL). If these can be injected into the queries, then the length of time that the server takes to respond reveals whether the query is injectable or not.</Attack_Step_Technique_Description>
							<Environments>env-All</Environments>
						</Attack_Step_Technique>
						<Outcome ID="c7s2o1" type="Success">At least one way to complete a hypothesized SQL query that would violate the application developer's assumptions.</Outcome>
					</Attack_Step>
				</Attack_Phase>
				<Attack_Phase Name="Experiment">
					<Attack_Step>
						<Attack_Step_Title>Determine user-controllable input susceptible to injection</Attack_Step_Title>
						<Attack_Step_Description>Determine the user-controllable input susceptible to injection. For each user-controllable input that the attacker suspects is vulnerable to SQL injection, attempt to inject the values determined in the previous step. If an error does not occur, then the attacker knows that the SQL injection was successful.</Attack_Step_Description>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Use web browser to inject input through text fields or through HTTP GET parameters.</Attack_Step_Technique_Description>
							<Environments>env-Web</Environments>
						</Attack_Step_Technique>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Use a web application debugging tool such as Tamper Data, TamperIE, WebScarab,etc. to modify HTTP POST parameters, hidden fields, non-freeform fields, etc.</Attack_Step_Technique_Description>
							<Environments>env-Web</Environments>
						</Attack_Step_Technique>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Use network-level packet injection tools such as netcat to inject input</Attack_Step_Technique_Description>
							<Environments>env-Web env-ClientServer env-Peer2Peer env-CommProtocol</Environments>
						</Attack_Step_Technique>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Use modified client (modified by reverse engineering) to inject input.</Attack_Step_Technique_Description>
							<Environments>env-ClientServer env-Peer2Peer env-CommProtocol</Environments>
						</Attack_Step_Technique>
						<Indicator ID="c7s3i1" type="Positive">
							<Indicator_Description>Attacker receives normal response from server.</Indicator_Description>
							<Environments>env-Web env-ClientServer env-Peer2Peer env-CommProtocol</Environments>
						</Indicator>
						<Indicator ID="c7s3i2" type="Positive">
							<Indicator_Description>Response takes expected amount of time after delay is injected.</Indicator_Description>
							<Environments>env-Web env-ClientServer env-Peer2Peer env-CommProtocol</Environments>
						</Indicator>
						<Indicator ID="c7s3i3" type="Negative">
							<Indicator_Description>Server sends a specific error message that indicates programmatic parsing of the input data (e.g. NumberFormatException)</Indicator_Description>
							<Environments>env-Web env-ClientServer env-Peer2Peer env-CommProtocol</Environments>
						</Indicator>
						<Outcome ID="c7s3o1" type="Success">At least one user-controllable input susceptible to injection found.</Outcome>
						<Outcome ID="c7s3o2" type="Failure">No user-controllable input susceptible to injection found.</Outcome>
						<Security_Control ID="c7s3sc1" type="Detective">Unusual queries such as the ones described in the previous step, in application logs. Log files may contain unusual messages such as "User bob' OR 1=1; -- logged in". Operators should be alerted when such SQL commands appear in the logs.</Security_Control>
						<Security_Control ID="c7s3sc2" type="Preventative">Input validation of user-controlled data before including it in a SQL query</Security_Control>
						<Security_Control ID="c7s3sc3" type="Preventative">Use APIs that help mitigate SQL injection (such as PreparedStatement in Java)</Security_Control>
					</Attack_Step>
					<Attack_Step>
						<Attack_Step_Title>Determine database type</Attack_Step_Title>
						<Attack_Step_Description>Determines the type of the database, such as MS SQL Server or Oracle or MySQL, using logical conditions as part of the injected queries</Attack_Step_Description>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Try injecting a string containing char(0x31)=char(0x31) (this evaluates to 1=1 in SQL Server only)</Attack_Step_Technique_Description>
							<Environments>env-Web env-ClientServer env-Peer2Peer env-CommProtocol</Environments>
						</Attack_Step_Technique>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Try injecting a string containing 0x313D31 (this evaluates to 1=1 in MySQL only)</Attack_Step_Technique_Description>
							<Environments>env-Web env-ClientServer env-Peer2Peer env-CommProtocol</Environments>
						</Attack_Step_Technique>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Inject other database-specific commands into input fields susceptible to SQL Injection. The attacker can determine the type of database that is running by checking whether the query executed successfully or not (i.e. wheter the attacker received a normal response from the server or not).</Attack_Step_Technique_Description>
							<Environments>env-Web env-ClientServer env-Peer2Peer env-CommProtocol</Environments>
						</Attack_Step_Technique>
						<Indicator ID="c7s4i1" type="Positive">
							<Indicator_Description>Success outcome in previous step</Indicator_Description>
							<Environments>env-Web env-ClientServer env-Peer2Peer env-CommProtocol</Environments>
						</Indicator>
						<Indicator ID="c7s4i2" type="Negative">
							<Indicator_Description>Failure outcome in previous step</Indicator_Description>
							<Environments>env-Web env-ClientServer env-Peer2Peer env-CommProtocol</Environments>
						</Indicator>
						<Outcome ID="c7s4o1" type="Success">Database platform in use discovered.</Outcome>
						<Outcome ID="c7s4o2" type="Failure">Database platform in use not discovered.</Outcome>
					</Attack_Step>
				</Attack_Phase>
				<Attack_Phase Name="Exploit">
					<Attack_Step>
						<Attack_Step_Title>Extract information about database schema</Attack_Step_Title>
						<Attack_Step_Description>Extract information about database schema by getting the database to answer yes/no questions about the schema.</Attack_Step_Description>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Automatically extract database schema using a tool such as Absinthe.</Attack_Step_Technique_Description>
							<Environments>env-Web</Environments>
						</Attack_Step_Technique>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Manually perform the blind SQL Injection to extract desired information about the database schema.</Attack_Step_Technique_Description>
							<Environments>env-Web env-ClientServer env-Peer2Peer env-CommProtocol</Environments>
						</Attack_Step_Technique>
						<Indicator ID="c7s5i1" type="Positive">
							<Indicator_Description>Success outcome in previous step.</Indicator_Description>
							<Environments>env-Web env-ClientServer env-Peer2Peer env-CommProtocol</Environments>
						</Indicator>
						<Indicator ID="c7s5i2" type="Negative">
							<Indicator_Description>Failure outcome in previous step.</Indicator_Description>
							<Environments>env-Web env-ClientServer env-Peer2Peer env-CommProtocol</Environments>
						</Indicator>
						<Outcome ID="c7s5o1" type="Success">Desired information about database schema extracted.</Outcome>
						<Outcome ID="c7s5o2" type="Failure">Desired information about database schema could not be extracted.</Outcome>
						<Security_Control ID="c7s5sc1" type="Detective">Large number of unusual queries in database logs.</Security_Control>
					</Attack_Step>
					<Attack_Step>
						<Attack_Step_Title>Exploit SQL Injection vulnerability</Attack_Step_Title>
						<Attack_Step_Description>Use the information obtained in the previous steps to successfully inject the database in order to bypass checks or modify, add, retrieve or delete data from the database</Attack_Step_Description>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Use information about how to inject commands into SQL queries as well as information about the database schema to execute attacks such as dropping tables, inserting records, etc.</Attack_Step_Technique_Description>
							<Environments>env-Web env-ClientServer env-Peer2Peer env-CommProtocol</Environments>
						</Attack_Step_Technique>
						<Indicator ID="c7s6i1" type="Positive">
							<Indicator_Description>Success outcome in previous step.</Indicator_Description>
							<Environments>env-Web env-ClientServer env-Peer2Peer env-CommProtocol</Environments>
						</Indicator>
						<Indicator ID="c7s6i2" type="Negative">
							<Indicator_Description>Failure outcome in previous step.</Indicator_Description>
							<Environments>env-Web env-ClientServer env-Peer2Peer env-CommProtocol</Environments>
						</Indicator>
						<Outcome ID="c7s6o1" type="Success">Attacker achieves goal of unauthorized system access, denial of service, etc.</Outcome>
						<Outcome ID="c7s6o2" type="Failure">Attacker cannot exploit the information gathered by blind SQL Injection</Outcome>
					</Attack_Step>
				</Attack_Phase>
			</Attack_Execution_Flow>
		</Description>
		<Attack_Prerequisites>
			<Attack_Prerequisite>SQL queries used by the application to store, retrieve or modify data.</Attack_Prerequisite>
			<Attack_Prerequisite>User-controllable input that is not properly validated by the application as part of SQL queries.</Attack_Prerequisite>
		</Attack_Prerequisites>
		<Typical_Severity>High</Typical_Severity>
		<Typical_Likelihood_of_Exploit>
			<Likelihood>High</Likelihood>
		</Typical_Likelihood_of_Exploit>
		<Methods_of_Attack>
			<Method_of_Attack>Injection</Method_of_Attack>
			<Method_of_Attack>Analysis</Method_of_Attack>
		</Methods_of_Attack>
		<Examples-Instances>
			<Example-Instance>
				<Example-Instance_Description>In the PHP application TimeSheet 1.1, an attacker can successfully retrieve username and password hashes from the database using Blind SQL Injection. If the attacker is aware of the local path structure, the attacker can also remotely execute arbitrary code and write the output of the injected queries to the local path. Blind SQL Injection is possible since the application does not properly sanitize the $_POST['username'] variable in the login.php file.</Example-Instance_Description>
				<Example-Instance_Related_Vulnerability>CVE-2006-4705</Example-Instance_Related_Vulnerability>
			</Example-Instance>
		</Examples-Instances>
		<Attacker_Skill_or_Knowledge_Required>Medium - Determining the database type and version, as well as the right number and type of parameters to the query being injected in the absence of error messages requires greater skill than reverse-engineering database error messages.</Attacker_Skill_or_Knowledge_Required>
		<Resources_Required>None</Resources_Required>
		<Probing_Techniques>
			<Probing_Technique>In order to determine the right syntax for the query to inject, the attacker tries to determine the right number of parameters to the query and their types. This is achieved by formulating conditions that result in a true/false answer from the database. If the logical condition is true, the database will execute the rest of the query. If not, a custom error page or a default page is returned. Another approach is to ask such true/false questions of the database and note the response times to a query with a logically true condition and one with a false condition.</Probing_Technique>
		</Probing_Techniques>
		<Indicators-Warnings_of_Attack>
			<Indicator-Warning_of_Attack>The only indicators of successful Blind SQL Injection are the application or database logs that show similar queries with slightly differing logical conditions that increase in complexity over time. However, this requires extensive logging as well as knowledge of the queries that can be used to perform such injection and return meaningful information from the database.</Indicator-Warning_of_Attack>
		</Indicators-Warnings_of_Attack>
		<Solutions_and_Mitigations>
			<Solution_or_Mitigation>Security by Obscurity is not a solution to preventing SQL Injection. Rather than suppress error messages and exceptions, the application must handle them gracefully, returning either a custom error page or redirecting the user to a default page, without revealing any information about the database or the application internals.</Solution_or_Mitigation>
			<Solution_or_Mitigation>Strong input validation - All user-controllable input must be validated and filtered for illegal characters as well as SQL content. Keywords such as UNION, SELECT or INSERT must be filtered in addition to characters such as a single-quote(') or SQL-comments (--) based on the context in which they appear.</Solution_or_Mitigation>
		</Solutions_and_Mitigations>
		<Attack_Motivation-Consequences>
			<Attack_Motivation-Consequence>Data Modification</Attack_Motivation-Consequence>
			<Attack_Motivation-Consequence>Information Leakage</Attack_Motivation-Consequence>
			<Attack_Motivation-Consequence>Run Arbitrary Code</Attack_Motivation-Consequence>
		</Attack_Motivation-Consequences>
		<Context_Description>An attacker attempts Blind SQL Injection when traditional SQL Injection is not possible due to suppression of error messages.
      
      Blind SQL Injection is performed by appending logical conditions to the query being injected such that they evaluate to true or false in the context of the data stored in the database. The first step is to get the syntax for the injected query right. For example, consider a database that has a table named "users". Consider the following query:
      SELECT fname, lname, dob, ssn, address FROM users WHERE userid="user1" AND password="user1pwd";
      
      To determine whether the "userid" field is injectable or not, the attacker tries an input such as 
      user1" AND 3&gt;1+1;--
      
      This causes the following query
      SELECT fname, lname, dob, ssn, address FROM users WHERE userid="user1" AND 3&gt;1+1;--
      
      to be passed to the database. If the parameter is injectable, the database evaluates 3&gt;1+1 to be true and executes the query. If, on the other hand, a condition such as 3&lt;2 were passed, the database would return an error. Since the application suppresses such errors, the attacker never sees it. However, the application may simply hang or it may redirect to a custom error page or a default page, which is definitely an indication that the injected condition was evaluated to be false. The query can also fail if the original condition was within parentheses, such as
      
      WHERE (userid="johns" AND password="abracadabra")
      
      In such a case, the attacker will have to try injection such that the parentheses match up.
      
      Once the attacker gets the syntax right, the next step is to identify the database. This can be achieved by using operators that are unique to each database engine. For example, a condition such as "abc" = "a"+"bc" evaluates to true on MS SQL Server whereas it evaluates to false on Oracle since the concatentation operator is ||. Another approach is using system-specific functions such as those for date and time.
      
      The next step is to determine the number and type of parameters. This can again be achieved by exploiting the SELECT...WHERE conditions or using UNION SELECT statements with dummy numeric or character-based parameters.
      
      Once the type of database as well as the structure of the query has been mapped out by asking a number of questions to the database, the attacker is in a position to inject the database and extract information from it.
      
      Blind SQL Injection is a classic example of solution by reduction where the domain to be attacked is successively narrowed down by the attacker through true or false queries to the database.
    </Context_Description>
		<Injection_Vector>User-controllable input to the application</Injection_Vector>
		<Payload>SQL statements intended to bypass checks or retrieve information about the database</Payload>
		<Activation_Zone>Back-end database</Activation_Zone>
		<Payload_Activation_Impact>The injected SQL statements are such that they result in a true/false query to the database. If the database evaluates a statement to be logically true, it responds with the requested data. If the condition is evaluated to be logically false, an error is returned. The attacker modifies the boolean condition each time to gain information from the database.</Payload_Activation_Impact>
		<Related_Weaknesses>
			<Related_Weakness>
				<CWE_ID>89</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>209</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>74</CWE_ID>
				<Weakness_Relationship_Type>Secondary</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>20</CWE_ID>
				<Weakness_Relationship_Type>Secondary</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>390</CWE_ID>
				<Weakness_Relationship_Type>Secondary</Weakness_Relationship_Type>
			</Related_Weakness>
		</Related_Weaknesses>
		<Related_Attack_Patterns>
			<Related_Attack_Pattern>
				<Related_Attack_Pattern_ID>66</Related_Attack_Pattern_ID>
				<Related_Attack_Pattern_Relationship_Type>Occasionally Precedes</Related_Attack_Pattern_Relationship_Type>
				<Relationship_Description/>
			</Related_Attack_Pattern>
		</Related_Attack_Patterns>
		<Relevant_Security_Requirements>
			<Relevant_Security_Requirement>Custom error pages must be used to handle exceptions such that they do not reveal any information about the architecture of the application or the database.</Relevant_Security_Requirement>
			<Relevant_Security_Requirement>Special characters in user-controllable input must be escaped before use by the application.</Relevant_Security_Requirement>
			<Relevant_Security_Requirement>Employ application-level safeguards to filter data and handle exceptions gracefully.</Relevant_Security_Requirement>
		</Relevant_Security_Requirements>
		<Related_Security_Principles>
			<Related_Security_Principle>Reluctance to Trust</Related_Security_Principle>
			<Related_Security_Principle>Failing Securely</Related_Security_Principle>
			<Related_Security_Principle>Defense in Depth</Related_Security_Principle>
		</Related_Security_Principles>
		<Related_Guidelines>
			<Related_Guideline>Never Use Input as Part of a Directive to any Internal Component</Related_Guideline>
			<Related_Guideline>Handle All Errors Safely</Related_Guideline>
		</Related_Guidelines>
		<Purpose>Penetration</Purpose>
		<CIA_Impact>
			<Confidentiality_Impact>High</Confidentiality_Impact>
			<Integrity_Impact>High</Integrity_Impact>
			<Availability_Impact>High</Availability_Impact>
		</CIA_Impact>
		<Technical_Context>
			<Architectural_Paradigm>All</Architectural_Paradigm>
			<Framework>All</Framework>
			<Platform>All</Platform>
			<Language>All</Language>
		</Technical_Context>
		<References>
			<Reference>CWE - Input Validation</Reference>
			<Reference>CWE - Improper Error Handling</Reference>
		</References>
		<Source>
			<Submission>
				<Submitter>Chiradeep B Chhaya</Submitter>
				<Submission_Date>2007-02-22</Submission_Date>
				<Submission_Comment>Third Draft - Revised to schema v1.4</Submission_Comment>
			</Submission>
			<Modification>
				<Modifier>Malik Hamro</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-02-27</Modification_Date>
				<Modification_Comment>Reformat to new schema and review</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Sean Barnum</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-03-05</Modification_Date>
				<Modification_Comment>Review and revise</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Richard Struse</Modifier>
				<Modifier_Organization>VOXEM, Inc</Modifier_Organization>
				<Modification_Date>2007-03-26</Modification_Date>
				<Modification_Comment>Review and feedback leading to changes in Description, Attack Prerequisites and Related Attack Patterns</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Sean Barnum</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-04-13</Modification_Date>
				<Modification_Comment>Modified pattern content according to review and feedback</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Amit Sethi</Modifier>
				<Modifier_Organization>Cigital, Inc.</Modifier_Organization>
				<Modification_Date>2007-10-29</Modification_Date>
				<Modification_Comment>Added extended Attack Execution Flow</Modification_Comment>
			</Modification>
		</Source>
	</Attack_Pattern>
                <Attack_Pattern CAPEC_ID="8" Name="Buffer Overflow in an API Call" Pattern_Abstraction="Detailed">
		<Description>
			<Summary>
		This attack targets libraries or shared code modules which are vulnerable to buffer overflow attacks. An attacker who has access to an API may try to embed malicious code in the API function call and exploit a buffer overflow vulnerability in the function's implementation. All clients that make use of the code library thus become vulnerable by association. This has a very broad effect on security across a system, usually affecting more than one software process. </Summary>
			<Attack_Execution_Flow>
				<Attack_Phase Name="">
					<Attack_Step>
						<Attack_Step_Description>1- An attacker can call an API exposed by the target host.</Attack_Step_Description>
					</Attack_Step>
					<Attack_Step>
						<Attack_Step_Description>2- On the probing stage, the attacker injects malicious code using the API call and observes the results. The attacker's goal is to uncover a buffer overflow vulnerability.</Attack_Step_Description>
					</Attack_Step>
					<Attack_Step>
						<Attack_Step_Description>3- The attacker finds a buffer overflow vulnerability, crafts malicious code and injects it through an API call. The attacker can at worst execute remote code on the target host.</Attack_Step_Description>
					</Attack_Step>
				</Attack_Phase>
			</Attack_Execution_Flow>
		</Description>
		<Attack_Prerequisites>
			<Attack_Prerequisite>The target host exposes an API to the user.</Attack_Prerequisite>
			<Attack_Prerequisite>One or more API functions exposed by the target host has a buffer overflow vulnerability.</Attack_Prerequisite>
		</Attack_Prerequisites>
		<Typical_Severity>High</Typical_Severity>
		<Typical_Likelihood_of_Exploit>
			<Likelihood>High</Likelihood>
		</Typical_Likelihood_of_Exploit>
		<Methods_of_Attack>
			<Method_of_Attack>API Abuse</Method_of_Attack>
			<Method_of_Attack>Injection</Method_of_Attack>
		</Methods_of_Attack>
		<Examples-Instances>
			<Example-Instance>
				<Example-Instance_Description>Attack Example: Libc in FreeBSD

A buffer overflow in the FreeBSD utility setlocale (found in the libc module) puts many programs at risk all at once.
</Example-Instance_Description>
			</Example-Instance>
			<Example-Instance>
				<Example-Instance_Description>Xtlib

A buffer overflow in the Xt library of the X windowing system allows local users to execute commands with root privileges.
</Example-Instance_Description>
			</Example-Instance>
		</Examples-Instances>
		<Attacker_Skill_or_Knowledge_Required>Low : An attacker can simply overflow a buffer by inserting a long string into an attacker-modifiable injection vector.  The result can be a DoS.
High : 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.</Attacker_Skill_or_Knowledge_Required>
		<Solutions_and_Mitigations>
			<Solution_or_Mitigation>Use a language or compiler that performs automatic bounds checking.</Solution_or_Mitigation>
			<Solution_or_Mitigation>Use secure functions not vulnerable to buffer overflow.</Solution_or_Mitigation>
			<Solution_or_Mitigation>If you have to use dangerous functions, make sure that you do boundary checking.</Solution_or_Mitigation>
			<Solution_or_Mitigation>Compiler-based canary mechanisms such as StackGuard, ProPolice and the Microsoft Visual Studio /GS flag. Unless this provides automatic bounds checking, it is not a complete solution.</Solution_or_Mitigation>
			<Solution_or_Mitigation>Use OS-level preventative functionality. Not a complete solution.</Solution_or_Mitigation>
		</Solutions_and_Mitigations>
		<Attack_Motivation-Consequences>
			<Attack_Motivation-Consequence>Denial of Service</Attack_Motivation-Consequence>
			<Attack_Motivation-Consequence>Run Arbitrary Code</Attack_Motivation-Consequence>
			<Attack_Motivation-Consequence>Information Leakage</Attack_Motivation-Consequence>
			<Attack_Motivation-Consequence>Data Modification</Attack_Motivation-Consequence>
		</Attack_Motivation-Consequences>
		<Injection_Vector>The user supplied data.</Injection_Vector>
		<Payload>The buffer overrun by the attacker.</Payload>
		<Activation_Zone>When the function returns control to the main program, it jumps to the return address portion of the stack frame. Unfortunately that return address may have been overwritten by the overflowed buffer and the address may contain a call to a privileged command or to a malicious code.</Activation_Zone>
		<Payload_Activation_Impact>The most common is remote code execution.</Payload_Activation_Impact>
		<Related_Weaknesses>
			<Related_Weakness>
				<CWE_ID>120</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>119</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>118</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>74</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>20</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
		</Related_Weaknesses>
		<Related_Attack_Patterns>
			<Related_Attack_Pattern>
				<Related_Attack_Pattern_ID>100</Related_Attack_Pattern_ID>
				<Related_Attack_Pattern_Relationship_Type>More Detailed</Related_Attack_Pattern_Relationship_Type>
				<Relationship_Description/>
			</Related_Attack_Pattern>
		</Related_Attack_Patterns>
		<Relevant_Security_Requirements>
			<Relevant_Security_Requirement>Bound checking should be performed when copying data to a buffer.</Relevant_Security_Requirement>
		</Relevant_Security_Requirements>
		<Related_Security_Principles>
			<Related_Security_Principle>Reluctance to trust</Related_Security_Principle>
			<Related_Security_Principle>Defense in Depth</Related_Security_Principle>
		</Related_Security_Principles>
		<Purpose>Penetration</Purpose>
		<CIA_Impact>
			<Confidentiality_Impact>High</Confidentiality_Impact>
			<Integrity_Impact>High</Integrity_Impact>
			<Availability_Impact>High</Availability_Impact>
		</CIA_Impact>
		<Technical_Context>
			<Architectural_Paradigm>All</Architectural_Paradigm>
			<Framework>All</Framework>
			<Platform>All</Platform>
			<Language>All</Language>
		</Technical_Context>
		<References>
			<Reference>G. Hoglund and G. McGraw. Exploiting Software: How to Break Code. Addison-Wesley, February 2004.</Reference>
			<Reference>CWE – Buffer Errors</Reference>
		</References>
		<Source>
			<Submission>
				<Submitter>G. Hoglund and G. McGraw. Exploiting Software: How to Break Code. Addison-Wesley, February 2004.</Submitter>
				<Submitter_Organization>Cigital, Inc</Submitter_Organization>
				<Submission_Date>2007-03-01</Submission_Date>
			</Submission>
			<Modification>
				<Modifier>Eric Dalci</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-02-13</Modification_Date>
				<Modification_Comment>Fleshed out content to CAPEC schema from the original descriptions in "Exploiting Software"</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Sean Barnum</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-03-05</Modification_Date>
				<Modification_Comment>Review and revise</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Richard Struse</Modifier>
				<Modifier_Organization>VOXEM, Inc</Modifier_Organization>
				<Modification_Date>2007-03-26</Modification_Date>
				<Modification_Comment>Review and feedback leading to changes in Description</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Sean Barnum</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-04-13</Modification_Date>
				<Modification_Comment>Modified pattern content according to review and feedback</Modification_Comment>
			</Modification>
		</Source>
	</Attack_Pattern>
                <Attack_Pattern CAPEC_ID="9" Name="Buffer Overflow in Local Command-Line Utilities" Pattern_Abstraction="Detailed">
		<Description>
			<Summary>This attack targets command-line utilities available in a number of shells. An attacker can leverage a vulnerability found in a command-line utility to escalate privilege to root.</Summary>
			<Attack_Execution_Flow>
				<Attack_Phase Name="">
					<Attack_Step>
						<Attack_Step_Description>1- Attacker identifies command utilities exposed by the target host.</Attack_Step_Description>
					</Attack_Step>
					<Attack_Step>
						<Attack_Step_Description>2- On the probing stage, the attacker interacts with the command utility and observes the results of its input. The attacker's goal is to uncover a buffer oveflow in the command utility. For instance the attacker may find that input data are not properly validated.</Attack_Step_Description>
					</Attack_Step>
					<Attack_Step>
						<Attack_Step_Description>3- The attacker finds a buffer overflow vulnerability in the command utility and tries to exploit it. He crafts malicious code and injects it using the command utility. The attacker can at worst execute remote code on the target host.</Attack_Step_Description>
					</Attack_Step>
				</Attack_Phase>
			</Attack_Execution_Flow>
		</Description>
		<Attack_Prerequisites>
			<Attack_Prerequisite>The target host exposes a command-line utility to the user.</Attack_Prerequisite>
			<Attack_Prerequisite>The command-line utility exposed by the target host has a buffer overflow vulnerability that can be exploited.</Attack_Prerequisite>
		</Attack_Prerequisites>
		<Typical_Severity>High</Typical_Severity>
		<Typical_Likelihood_of_Exploit>
			<Likelihood>High</Likelihood>
		</Typical_Likelihood_of_Exploit>
		<Methods_of_Attack>
			<Method_of_Attack>Injection</Method_of_Attack>
			<Method_of_Attack>API Abuse</Method_of_Attack>
		</Methods_of_Attack>
		<Examples-Instances>
			<Example-Instance>
				<Example-Instance_Description>Attack Example: HPUX passwd

A buffer overflow in the HPUX passwd command allows local users to gain root privileges via a command-line option.&lt;/AttackExample&gt;
&lt;AttackExample&gt;Attack Example: Solaris getopt

A buffer overflow in Solaris’s getopt command (found in libc) allows local users to gain root privileges via a long argv[0].
</Example-Instance_Description>
			</Example-Instance>
		</Examples-Instances>
		<Attacker_Skill_or_Knowledge_Required>Low : An attacker can simply overflow a buffer by inserting a long string into an attacker-modifiable injection vector.  The result can be a DoS.
High : 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.</Attacker_Skill_or_Knowledge_Required>
		<Probing_Techniques>
			<Probing_Technique>The attacker can probe for services available on the target host. Many services may expose a command utility. For instance Telnet is a service which can be invoked through a command shell.</Probing_Technique>
		</Probing_Techniques>
		<Solutions_and_Mitigations>
			<Solution_or_Mitigation>Carefully review the service's implementation before making it available to user. For instance you can use manual or automated code review to uncover vulnerabilities such as buffer overflow.</Solution_or_Mitigation>
			<Solution_or_Mitigation>Use a language or compiler that performs automatic bounds checking.</Solution_or_Mitigation>
			<Solution_or_Mitigation>Use an abstraction library to abstract away risky APIs. Not a complete solution.</Solution_or_Mitigation>
			<Solution_or_Mitigation>Compiler-based canary mechanisms such as StackGuard, ProPolice and the Microsoft Visual Studio /GS flag. Unless this provides automatic bounds checking, it is not a complete solution.</Solution_or_Mitigation>
			<Solution_or_Mitigation>Operational: Use OS-level preventative functionality. Not a complete solution.</Solution_or_Mitigation>
			<Solution_or_Mitigation>Apply the latest patches to your user exposed services. This may not be a complete solution, specially against zero day attack.</Solution_or_Mitigation>
			<Solution_or_Mitigation>Do not unnecessarily expose services.</Solution_or_Mitigation>
		</Solutions_and_Mitigations>
		<Attack_Motivation-Consequences>
			<Attack_Motivation-Consequence>Privilege Escalation</Attack_Motivation-Consequence>
			<Attack_Motivation-Consequence>Run Arbitrary Code</Attack_Motivation-Consequence>
			<Attack_Motivation-Consequence>Data Modification</Attack_Motivation-Consequence>
			<Attack_Motivation-Consequence>Denial of Service</Attack_Motivation-Consequence>
			<Attack_Motivation-Consequence>Information Leakage</Attack_Motivation-Consequence>
		</Attack_Motivation-Consequences>
		<Injection_Vector>The user supplied data.</Injection_Vector>
		<Payload>The buffer overrun by the attacker.</Payload>
		<Activation_Zone>When the function returns control to the main program, it jumps to the return address portion of the stack frame. Unfortunately that return address may have been overwritten by the overflowed buffer and the address may contain a call to a privileged command or to a malicious code.</Activation_Zone>
		<Payload_Activation_Impact>The most common is remote code execution.</Payload_Activation_Impact>
		<Related_Weaknesses>
			<Related_Weakness>
				<CWE_ID>120</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>118</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>119</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>74</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>20</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
		</Related_Weaknesses>
		<Related_Attack_Patterns>
			<Related_Attack_Pattern>
				<Related_Attack_Pattern_ID>100</Related_Attack_Pattern_ID>
				<Related_Attack_Pattern_Relationship_Type>More Detailed</Related_Attack_Pattern_Relationship_Type>
				<Relationship_Description/>
			</Related_Attack_Pattern>
			<Related_Attack_Pattern>
				<Related_Attack_Pattern_ID>10</Related_Attack_Pattern_ID>
				<Related_Attack_Pattern_Relationship_Type>More Detailed</Related_Attack_Pattern_Relationship_Type>
				<Relationship_Description/>
			</Related_Attack_Pattern>
		</Related_Attack_Patterns>
		<Related_Security_Principles>
			<Related_Security_Principle>Reluctance to trust</Related_Security_Principle>
			<Related_Security_Principle>Defense in Depth</Related_Security_Principle>
			<Related_Security_Principle>Least Privilege</Related_Security_Principle>
		</Related_Security_Principles>
		<Related_Guidelines>
			<Related_Guideline>Bound checking should be performed when copying data to a buffer.</Related_Guideline>
		</Related_Guidelines>
		<Purpose>Penetration</Purpose>
		<CIA_Impact>
			<Confidentiality_Impact>High</Confidentiality_Impact>
			<Integrity_Impact>High</Integrity_Impact>
			<Availability_Impact>High</Availability_Impact>
		</CIA_Impact>
		<Technical_Context>
			<Architectural_Paradigm>All</Architectural_Paradigm>
			<Framework>All</Framework>
			<Platform>All</Platform>
			<Language>All</Language>
		</Technical_Context>
		<References>
			<Reference>G. Hoglund and G. McGraw. Exploiting Software: How to Break Code. Addison-Wesley, February 2004.</Reference>
			<Reference>CWE – Buffer Errors</Reference>
		</References>
		<Source>
			<Submission>
				<Submitter>G. Hoglund and G. McGraw. Exploiting Software: How to Break Code. Addison-Wesley, February 2004.</Submitter>
				<Submitter_Organization>Cigital, Inc</Submitter_Organization>
				<Submission_Date>2007-03-01</Submission_Date>
			</Submission>
			<Modification>
				<Modifier>Eric Dalci</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-02-13</Modification_Date>
				<Modification_Comment>Fleshed out content to CAPEC schema from the original descriptions in "Exploiting Software"</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Sean Barnum</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-03-05</Modification_Date>
				<Modification_Comment>Review and revise</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Richard Struse</Modifier>
				<Modifier_Organization>VOXEM, Inc</Modifier_Organization>
				<Modification_Date>2007-03-26</Modification_Date>
				<Modification_Comment>Review and feedback leading to changes in Attack Execution Flow, Probing Techniques and Method of Attack</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Sean Barnum</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-04-13</Modification_Date>
				<Modification_Comment>Modified pattern content according to review and feedback</Modification_Comment>
			</Modification>
		</Source>
	</Attack_Pattern>
                <Attack_Pattern CAPEC_ID="10" Name="Buffer Overflow via Environment Variables" Pattern_Abstraction="Detailed">
		<Description>
			<Summary>
		This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.</Summary>
			<Attack_Execution_Flow>
				<Attack_Phase Name="">
					<Attack_Step>
						<Attack_Step_Description>1- The attacker tries to find an environment variable which can be overwritten for instance by gathering information about the target host (error pages, software's version number, etc.). </Attack_Step_Description>
					</Attack_Step>
					<Attack_Step>
						<Attack_Step_Description>2- The attacker manipulates the environment variable to contain excessive-length content to cause a buffer overflow.</Attack_Step_Description>
					</Attack_Step>
					<Attack_Step>
						<Attack_Step_Description>3- The attacker potentially leverages the buffer overflow to inject maliciously crafted code in an attempt to execute privileged command on the target environment.</Attack_Step_Description>
					</Attack_Step>
				</Attack_Phase>
			</Attack_Execution_Flow>
		</Description>
		<Attack_Prerequisites>
			<Attack_Prerequisite>The application uses environment variables.</Attack_Prerequisite>
			<Attack_Prerequisite>An environment variable exposed to the user is vulnerable to a buffer overflow.</Attack_Prerequisite>
			<Attack_Prerequisite>The vulnerable environment variable uses untrusted data.</Attack_Prerequisite>
			<Attack_Prerequisite>Tainted data used in the environment variables is not properly validated. For instance boundary checking is not done before copying the input data to a buffer.</Attack_Prerequisite>
		</Attack_Prerequisites>
		<Typical_Severity>High</Typical_Severity>
		<Typical_Likelihood_of_Exploit>
			<Likelihood>High</Likelihood>
		</Typical_Likelihood_of_Exploit>
		<Methods_of_Attack>
			<Method_of_Attack>Injection</Method_of_Attack>
		</Methods_of_Attack>
		<Examples-Instances>
			<Example-Instance>
				<Example-Instance_Description>Attack Example: Buffer Overflow in $HOME

A buffer overflow in sccw allows local users to gain root access via the $HOME environmental variable.
</Example-Instance_Description>
				<Example-Instance_Related_Vulnerability>CVE-1999-0906</Example-Instance_Related_Vulnerability>
			</Example-Instance>
			<Example-Instance>
				<Example-Instance_Description>Attack Example: Buffer Overflow in TERM

A buffer overflow in the rlogin program involves its consumption of the TERM environmental variable.
</Example-Instance_Description>
				<Example-Instance_Related_Vulnerability>CVE-1999-0046</Example-Instance_Related_Vulnerability>
			</Example-Instance>
		</Examples-Instances>
		<Attacker_Skill_or_Knowledge_Required>
		Low : An attacker can simply overflow a buffer by inserting a long string into an attacker-modifiable injection vector.  The result can be a DoS.
		High : 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.</Attacker_Skill_or_Knowledge_Required>
		<Probing_Techniques>
			<Probing_Technique>While interacting with a system an attacker would typically investigate for environment variables that can be overwritten. The more a user knows about a system the more likely she will find a vulnerable environment variable.</Probing_Technique>
			<Probing_Technique>On a web environment, the attacker can read the client side code and search for environment variables that can be overwritten.</Probing_Technique>
			<Probing_Technique>There are tools such as Sharefuzz (http://sharefuzz.sourceforge.net/) which is an environment variable fuzzer for Unix that support loading a shared library. Attackers can use such tools to uncover a buffer overflow in an environment variable.</Probing_Technique>
		</Probing_Techniques>
		<Indicators-Warnings_of_Attack>
			<Indicator-Warning_of_Attack>If the application does bound checking, it should fail when the data source is larger than the size of the destination buffer. If the application's code is well written, that failure should triger an alert.</Indicator-Warning_of_Attack>
		</Indicators-Warnings_of_Attack>
		<Obfuscation_Techniques>
			<Obfuscation_Technique/>
		</Obfuscation_Techniques>
		<Solutions_and_Mitigations>
			<Solution_or_Mitigation>Do not expose environment variable to the user.</Solution_or_Mitigation>
			<Solution_or_Mitigation>Do not use untrusted data in your environment variables.</Solution_or_Mitigation>
			<Solution_or_Mitigation>Use a language or compiler that performs automatic bounds checking</Solution_or_Mitigation>
			<Solution_or_Mitigation>There are tools such as Sharefuzz (http://sharefuzz.sourceforge.net/) which is an environment variable fuzzer for Unixes that support loading a shared library. You can use Sharefuzz to determine if you are exposing an environment variable vulnerable to buffer overflow.</Solution_or_Mitigation>
		</Solutions_and_Mitigations>
		<Attack_Motivation-Consequences>
			<Attack_Motivation-Consequence>Denial of Service</Attack_Motivation-Consequence>
			<Attack_Motivation-Consequence>Run Arbitrary Code</Attack_Motivation-Consequence>
			<Attack_Motivation-Consequence>Information Leakage</Attack_Motivation-Consequence>
			<Attack_Motivation-Consequence>Data Modification</Attack_Motivation-Consequence>
			<Attack_Motivation-Consequence>Privilege Escalation</Attack_Motivation-Consequence>
		</Attack_Motivation-Consequences>
		<Injection_Vector>The user modifiable environment variable.</Injection_Vector>
		<Payload>User supplied data potentially containing malicious code.</Payload>
		<Activation_Zone>When the subroutine which uses the environment variable returns control to the main program, it jumps to the return address portion of the stack frame. Unfortunately that return address may have been overwritten by the overflowed buffer and the address may contain a call to a privileged command or to a malicious code.</Activation_Zone>
		<Payload_Activation_Impact>The most common is remote code execution.</Payload_Activation_Impact>
		<Related_Weaknesses>
			<Related_Weakness>
				<CWE_ID>120</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>302</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>118</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>119</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>74</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>99</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>20</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
		</Related_Weaknesses>
		<Related_Attack_Patterns>
			<Related_Attack_Pattern>
				<Related_Attack_Pattern_ID>100</Related_Attack_Pattern_ID>
				<Related_Attack_Pattern_Relationship_Type>More Detailed</Related_Attack_Pattern_Relationship_Type>
				<Relationship_Description/>
			</Related_Attack_Pattern>
		</Related_Attack_Patterns>
		<Related_Security_Principles>
			<Related_Security_Principle>Reluctance to trust</Related_Security_Principle>
		</Related_Security_Principles>
		<Related_Guidelines>
			<Related_Guideline>Bound checking should be performed when copying data to a buffer.</Related_Guideline>
		</Related_Guidelines>
		<Purpose>Penetration</Purpose>
		<CIA_Impact>
			<Confidentiality_Impact>High</Confidentiality_Impact>
			<Integrity_Impact>High</Integrity_Impact>
			<Availability_Impact>High</Availability_Impact>
		</CIA_Impact>
		<Technical_Context>
			<Architectural_Paradigm>All</Architectural_Paradigm>
			<Framework>All</Framework>
			<Platform>All</Platform>
			<Language>All</Language>
		</Technical_Context>
		<References>
			<Reference>G. Hoglund and G. McGraw. Exploiting Software: How to Break Code. Addison-Wesley, February 2004.</Reference>
			<Reference>CWE – Buffer Errors</Reference>
		</References>
		<Source>
			<Submission>
				<Submitter>G. Hoglund and G. McGraw. Exploiting Software: How to Break Code. Addison-Wesley, February 2004.</Submitter>
				<Submitter_Organization>Cigital, Inc</Submitter_Organization>
				<Submission_Date>2007-03-01</Submission_Date>
			</Submission>
			<Modification>
				<Modifier>Eric Dalci</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-02-13</Modification_Date>
				<Modification_Comment>Fleshed out content to CAPEC schema from the original descriptions in "Exploiting Software"</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Sean Barnum</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-03-05</Modification_Date>
				<Modification_Comment>Review and revise</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Richard Struse</Modifier>
				<Modifier_Organization>VOXEM, Inc</Modifier_Organization>
				<Modification_Date>2007-03-26</Modification_Date>
				<Modification_Comment>Review and feedback leading to changes in Name</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Sean Barnum</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-04-13</Modification_Date>
				<Modification_Comment>Modified pattern content according to review and feedback</Modification_Comment>
			</Modification>
		</Source>
	</Attack_Pattern>
                <Attack_Pattern CAPEC_ID="14" Name="Client-side Injection-induced Buffer Overflow" Pattern_Abstraction="Detailed">
		<Description>
			<Summary>This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service. </Summary>
			<Attack_Execution_Flow>
				<Attack_Phase Name="">
					<Attack_Step>
						<Attack_Step_Description>1. The attacker creates a custom hostile service</Attack_Step_Description>
					</Attack_Step>
					<Attack_Step>
						<Attack_Step_Description>2.	The attacker acquires information about the kind of client attaching to her hostile service to determine if it contains an exploitable buffer overflow vulnerability.</Attack_Step_Description>
					</Attack_Step>
					<Attack_Step>
						<Attack_Step_Description>3. The attacker intentionally feeds malicious data to the client to exploit the buffer overflow vulnerability that she has uncovered.</Attack_Step_Description>
					</Attack_Step>
					<Attack_Step>
						<Attack_Step_Description>4.  The attacker leverages the exploit to execute arbitrary code or to cause a denial of service.</Attack_Step_Description>
					</Attack_Step>
				</Attack_Phase>
			</Attack_Execution_Flow>
		</Description>
		<Attack_Prerequisites>
			<Attack_Prerequisite>The targeted client software communicates with an external server.</Attack_Prerequisite>
			<Attack_Prerequisite>The targeted client software has a buffer oveflow vulnerability.</Attack_Prerequisite>
		</Attack_Prerequisites>
		<Typical_Severity>High</Typical_Severity>
		<Typical_Likelihood_of_Exploit>
			<Likelihood>Medium</Likelihood>
		</Typical_Likelihood_of_Exploit>
		<Methods_of_Attack>
			<Method_of_Attack>API Abuse</Method_of_Attack>
			<Method_of_Attack>Injection</Method_of_Attack>
		</Methods_of_Attack>
		<Examples-Instances>
			<Example-Instance>
				<Example-Instance_Description>Attack Example: Buffer Overflow in Internet Explorer 4.0 Via EMBED Tag

Authors often use &lt;EMBED&gt; tags in HTML documents. For example

&lt;EMBED TYPE="audio/midi" SRC="/path/file.mid" AUTOSTART="true"&gt;

If an attacker supplies an overly long path in the SRC= directive, the mshtml.dll component will suffer a buffer overflow. This is a standard example of content in a Web page being directed to exploit a faulty module in the system. There are potentially thousands of different ways data can propagate into a given system, thus these kinds of attacks will continue to be found in the wild.</Example-Instance_Description>
			</Example-Instance>
		</Examples-Instances>
		<Attacker_Skill_or_Knowledge_Required>Low : To achieve a denial of service, an attacker can simply overflow a buffer by inserting a long string into an attacker-modifiable injection vector.
High : Exploiting a buffer overflow to inject malicious code into the stack of a software system or even the heap requires a more in-depth knowledge and higher skill level.
</Attacker_Skill_or_Knowledge_Required>
		<Probing_Techniques>
			<Probing_Technique>The server may look like a valid server, but in reality it may be a hostile server aimed at fooling the client software. For instance the server can use honey pots and get the client to download malicious code.</Probing_Technique>
			<Probing_Technique>Once engaged with the client, the hostile server may attempt to scan the client's host for open ports and potential vulnerabilities in the client software.</Probing_Technique>
			<Probing_Technique>The hostile server may also attempt to install and run malicious code on the client software. That malicious code can be used to scan the client software for buffer overflow.</Probing_Technique>
		</Probing_Techniques>
		<Indicators-Warnings_of_Attack>
			<Indicator-Warning_of_Attack>An example of indicator is when the client software crashes after executing code downloaded from a hostile server.</Indicator-Warning_of_Attack>
		</Indicators-Warnings_of_Attack>
		<Solutions_and_Mitigations>
			<Solution_or_Mitigation>The client software should not install untrusted code from a non authenticated server.</Solution_or_Mitigation>
			<Solution_or_Mitigation>The client software should have the latest patches and should be audited for vulnerabilities before being used to communicate with potentially hostile servers.</Solution_or_Mitigation>
			<Solution_or_Mitigation>Perform input validation for length of buffer inputs.</Solution_or_Mitigation>
			<Solution_or_Mitigation>Use a language or compiler that performs automatic bounds checking.</Solution_or_Mitigation>
			<Solution_or_Mitigation>Use an abstraction library to abstract away risky APIs. Not a complete solution.</Solution_or_Mitigation>
			<Solution_or_Mitigation>Compiler-based canary mechanisms such as StackGuard, ProPolice and the Microsoft Visual Studio /GS flag. Unless this provides automatic bounds checking, it is not a complete solution.</Solution_or_Mitigation>
			<Solution_or_Mitigation>Ensure all buffer uses are consistently bounds-checked.</Solution_or_Mitigation>
			<Solution_or_Mitigation>Use OS-level preventative functionality. Not a complete solution.</Solution_or_Mitigation>
		</Solutions_and_Mitigations>
		<Attack_Motivation-Consequences>
			<Attack_Motivation-Consequence>Denial of Service</Attack_Motivation-Consequence>
			<Attack_Motivation-Consequence>Run Arbitrary Code</Attack_Motivation-Consequence>
		</Attack_Motivation-Consequences>
		<Context_Description>“Backwash Attacks: Leveraging Client-side Buffer Overflows

Nothing is more forward than directly attacking those who are attacking you. In many cases this philosophy is instantiated as a series of denial-of-service attacks launched in either direction. In standard scenarios, you can learn what IP address is being used to attack you, and then you can follow up with an attack of your own. (Be forewarned, however, that the legal ramifications of counterattack are drastic.) If the attacker is dumb enough to have open services, you may in some cases be able to own their system.

This has led some security types to consider a rather insidious tactic—creating hostile network services that look like valid targets. The basic idea builds on the idea of honey pots, but goes one important step further. Because most client software contains buffer overflows and other vulnerabilities, including a capacity to exploit these weaknesses directly when probed is within the realm of possibility.

Not surprisingly, of all the code that gets tested and probed in a security situation, client code is usually ignored. This is one of the reasons that client code ends up with more serious problems than server code. If a vulnerable client attaches to a hostile service, the hostile service can attempt to identify the type and version of the client that is connecting. This is a variety of fingerprinting.

Once the client is properly identified, the hostile server can issue a response that exploits a buffer overflow (or some other security defect) in the client. Typically this kind of attack is not designed simply just to crash the client. Attackers using this technique can inject a virus or backdoor into the original attacker’s computer using their own connection against them.

Obviously, this kind of “backwash attack” is a serious threat to an attacker. Anyone planning to attack arbitrary systems should assume that a backwash attack can and will happen. Any and all client software should be carefully audited before use.”</Context_Description>
		<Payload>Attacker-supplied data potentially containing malicious code.</Payload>
		<Activation_Zone>When the function returns control to the main program, it jumps to the return address portion of the stack frame. Unfortunately that return address may have been overwritten by the overflowed buffer and the address may contain a call to a privileged command or to malicious code.</Activation_Zone>
		<Payload_Activation_Impact>The most common are remote code execution or denial of service.</Payload_Activation_Impact>
		<Related_Weaknesses>
			<Related_Weakness>
				<CWE_ID>120</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>353</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>118</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>119</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>74</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>20</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
		</Related_Weaknesses>
		<Related_Attack_Patterns>
			<Related_Attack_Pattern>
				<Related_Attack_Pattern_ID>8</Related_Attack_Pattern_ID>
				<Related_Attack_Pattern_Relationship_Type>More Detailed</Related_Attack_Pattern_Relationship_Type>
				<Relationship_Description/>
			</Related_Attack_Pattern>
		</Related_Attack_Patterns>
		<Related_Security_Principles>
			<Related_Security_Principle>Reluctance to Trust</Related_Security_Principle>
			<Related_Security_Principle>Defense in Depth</Related_Security_Principle>
		</Related_Security_Principles>
		<Purpose>Penetration</Purpose>
		<CIA_Impact>
			<Confidentiality_Impact>High</Confidentiality_Impact>
			<Integrity_Impact>High</Integrity_Impact>
			<Availability_Impact>High</Availability_Impact>
		</CIA_Impact>
		<Technical_Context>
			<Architectural_Paradigm>Client-Server</Architectural_Paradigm>
			<Architectural_Paradigm>Other</Architectural_Paradigm>
			<Framework>All</Framework>
			<Platform>All</Platform>
			<Language>All</Language>
		</Technical_Context>
		<References>
			<Reference>G. Hoglund and G. McGraw. Exploiting Software: How to Break Code. Addison-Wesley, February 2004.</Reference>
			<Reference>CWE – Buffer Errors</Reference>
		</References>
		<Source>
			<Submission>
				<Submitter>G. Hoglund and G. McGraw. Exploiting Software: How to Break Code. Addison-Wesley, February 2004.</Submitter>
				<Submitter_Organization>Cigital, Inc</Submitter_Organization>
				<Submission_Date>2007-03-01</Submission_Date>
			</Submission>
			<Modification>
				<Modifier>Eric Dalci</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-02-13</Modification_Date>
				<Modification_Comment>Fleshed out content to CAPEC schema from the original descriptions in "Exploiting Software"</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Sean Barnum</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-03-05</Modification_Date>
				<Modification_Comment>Review and revise</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Richard Struse</Modifier>
				<Modifier_Organization>VOXEM, Inc</Modifier_Organization>
				<Modification_Date>2007-03-26</Modification_Date>
				<Modification_Comment>Review and feedback leading to changes in Related Attack Patterns</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Sean Barnum</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-04-13</Modification_Date>
				<Modification_Comment>Modified pattern content according to review and feedback</Modification_Comment>
			</Modification>
		</Source>
	</Attack_Pattern>
                <Attack_Pattern CAPEC_ID="16" Name="Dictionary-based Password Attack" Pattern_Abstraction="Detailed">
		<Description>
			<Summary>
        An attacker tries each of the words in a dictionary as passwords to gain access to  the system via some user's account.  If the password chosen by the user was a word within the dictionary, this attack will be successful (in the absence of other mitigations). This is a specific instance of the password brute forcing attack pattern.  
      </Summary>
			<Attack_Execution_Flow>
				<Attack_Phase Name="Explore">
					<Attack_Step>
						<Attack_Step_Title>Determine application's/system's password policy</Attack_Step_Title>
						<Attack_Step_Description>Determine the password policies of the target application/system. </Attack_Step_Description>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Determine minimum and maximum allowed password lengths.</Attack_Step_Technique_Description>
							<Environments>env-All</Environments>
						</Attack_Step_Technique>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Determine format of allowed passwords (whether they are required or allowed to contain numbers, special characters, etc., or whether they are allowed to contain words from the dictionary).</Attack_Step_Technique_Description>
							<Environments>env-All</Environments>
						</Attack_Step_Technique>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Determine account lockout policy (a strict account lockout policy will prevent brute force attacks).</Attack_Step_Technique_Description>
							<Environments>env-All</Environments>
						</Attack_Step_Technique>
						<Indicator ID="c49s0i1" type="Positive">
							<Indicator_Description>Passwords are used in the application/system</Indicator_Description>
							<Environments>env-All</Environments>
						</Indicator>
						<Indicator ID="c49s0i2" type="Negative">
							<Indicator_Description>Passwords are not used in the application/system.</Indicator_Description>
							<Environments>env-All</Environments>
						</Indicator>
					</Attack_Step>
					<Attack_Step>
						<Attack_Step_Title>Select dictionaries</Attack_Step_Title>
						<Attack_Step_Description>
              Pick the dictionaries to be used in the attack (e.g. different languages, specific terminology, etc.)
            </Attack_Step_Description>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Select dictionary based on particular users' preferred languages.</Attack_Step_Technique_Description>
							<Environments>env-All</Environments>
						</Attack_Step_Technique>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Select dictionary based on the application/system's supported languages.</Attack_Step_Technique_Description>
							<Environments>env-All</Environments>
						</Attack_Step_Technique>
					</Attack_Step>
					<Attack_Step>
						<Attack_Step_Title>Determine username(s) to target</Attack_Step_Title>
						<Attack_Step_Description>Determine username(s) whose passwords to crack.</Attack_Step_Description>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Obtain username(s) by sniffing network packets.</Attack_Step_Technique_Description>
							<Environments>env-CommProtocol env-Peer2Peer env-ClientServer</Environments>
						</Attack_Step_Technique>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Obtain username(s) by querying application/system (e.g. if upon a failed login attempt, the system indicates whether the entered username was valid or not)</Attack_Step_Technique_Description>
							<Environments>env-All</Environments>
						</Attack_Step_Technique>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Obtain usernames from filesystem (e.g. list of directories in C:\Documents and Settings\ in Windows, and list in /etc/passwd in UNIX-like systems)</Attack_Step_Technique_Description>
							<Environments>env-Embedded env-Local</Environments>
						</Attack_Step_Technique>
						<Indicator ID="c16s2i1" type="Negative">
							<Indicator_Description>Remote application or system provides no indication regarding whether a given username is valid or not.</Indicator_Description>
							<Environments>env-ClientServer env-Peer2Peer env-Web env-CommProtocol</Environments>
						</Indicator>
						<Outcome ID="c16s2o1" type="Success">At least one valid username found.</Outcome>
						<Outcome ID="c16s2o2" type="Failure">Presence of any valid usernames could not be established.</Outcome>
						<Security_Control ID="c16s2sc1" type="Preventative">Do not reveal information regarding validity of particular usernames to users.</Security_Control>
						<Security_Control ID="c16s2sc2" type="Corrective">Lock out accounts whose usernames are suspected to have been compromised.</Security_Control>
					</Attack_Step>
				</Attack_Phase>
				<Attack_Phase Name="Exploit">
					<Attack_Step>
						<Attack_Step_Title>Use dictionary to crack passwords.</Attack_Step_Title>
						<Attack_Step_Description>
              Use a password cracking tool that will leverage the dictionary to feed passwords to the system and see if they work.				
            </Attack_Step_Description>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Try all words in the dictionary, as well as common misspellings of the words as passwords for the chosen username(s).</Attack_Step_Technique_Description>
							<Environments>env-All</Environments>
						</Attack_Step_Technique>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Try common combinations of words in the dictionary, as well as common misspellings of the combinations as passwords for the chosen username(s).</Attack_Step_Technique_Description>
							<Environments>env-All</Environments>
						</Attack_Step_Technique>
						<Indicator ID="c16s3i1" type="Negative">
							<Indicator_Description>Application/system does not use password authentication.</Indicator_Description>
							<Environments>env-All</Environments>
						</Indicator>
						<Outcome ID="c16s3o1" type="Success">Attacker determines correct password for a user ID and obtains  access to application or system.</Outcome>
						<Outcome ID="c16s3o2" type="Failure">Attacker is unable to determine correct password for a user ID and obtain access to application or system.</Outcome>
						<Security_Control ID="c16s3sc1" type="Detective">Large number of authentication failures in logs.</Security_Control>
						<Security_Control ID="c16s3sc2" type="Preventative">Enforce strict account lockout policies.</Security_Control>
						<Security_Control ID="c16s3sc3" type="Preventative">Enforce strong passwords (having sufficient length and containing mix of lower case and upper case letters, numbers, and special characters)</Security_Control>
					</Attack_Step>
				</Attack_Phase>
			</Attack_Execution_Flow>
		</Description>
		<Attack_Prerequisites>
			<Attack_Prerequisite>
        The system uses one factor password based authentication.
      </Attack_Prerequisite>
			<Attack_Prerequisite>
        The system does not have a sound password policy that is being enforced.
      </Attack_Prerequisite>
			<Attack_Prerequisite>
        The system does not implement an effective password throttling mechanism.			
      </Attack_Prerequisite>
		</Attack_Prerequisites>
		<Typical_Severity>High</Typical_Severity>
		<Typical_Likelihood_of_Exploit>
			<Likelihood>Medium</Likelihood>
		</Typical_Likelihood_of_Exploit>
		<Methods_of_Attack>
			<Method_of_Attack>Brute Force</Method_of_Attack>
		</Methods_of_Attack>
		<Examples-Instances>
			<Example-Instance>
				<Example-Instance_Description>
          A system user selects the word "treacherous" as their passwords believing that it would be very difficult to guess.  The password-based dictionary attack is used to crack this password and gain access to the account.
        </Example-Instance_Description>
				<Example-Instance_Related_Vulnerability/>
			</Example-Instance>
			<Example-Instance>
				<Example-Instance_Description>
          The Cisco LEAP challenge/response authentication mechanism uses passwords in a way that is susceptible to dictionary attacks, which makes it easier for remote attackers to gain privileges via brute force password guessing attacks. 				
          
          Cisco LEAP is a mutual authentication algorithm that supports dynamic derivation of session keys. With Cisco LEAP, mutual authentication relies on a shared secret, the user's logon password—which is known by the client and the network, and is used to respond to challenges between the user and the Remote Authentication Dial-In User Service (RADIUS) server.
          
          Methods exist for someone to write a tool to launch an offline dictionary attack on password-based authentications that leverage Microsoft MS-CHAP, such as Cisco LEAP.  The tool leverages large password lists
          to efficiently launch offline dictionary attacks against LEAP user accounts, collected through passive sniffing or active techniques.
        </Example-Instance_Description>
				<Example-Instance_Related_Vulnerability>CVE-2003-1096</Example-Instance_Related_Vulnerability>
			</Example-Instance>
		</Examples-Instances>
		<Attacker_Skill_or_Knowledge_Required>
      Low:  A variety of password cracking tools and dictionaries are available to launch this type of an attack.
    </Attacker_Skill_or_Knowledge_Required>
		<Resources_Required>
      A machine with sufficient resources for the job (e.g. CPU, RAM, HD).  Applicable dictionaries are required.  Also a password cracking tool or a custom script that leverages the dictionary database to launch the attack.
    </Resources_Required>
		<Indicators-Warnings_of_Attack>
			<Indicator-Warning_of_Attack>
        Many invalid login attempts are coming from the same machine (same IP address) or for the same log in name.  The login attempts use passwords that are dictionary words.
      </Indicator-Warning_of_Attack>
		</Indicators-Warnings_of_Attack>
		<Obfuscation_Techniques>
			<Obfuscation_Technique>
        Employ IP spoofing to make it seem like login attempts are coming from different machines.
      </Obfuscation_Technique>
		</Obfuscation_Techniques>
		<Solutions_and_Mitigations>
			<Solution_or_Mitigation>
        Create a strong password policy and ensure that your system enforces this policy.
      </Solution_or_Mitigation>
			<Solution_or_Mitigation>
        Implement an intelligent password throttling mechanism. Care must be taken to assure that these mechanisms do not excessively enable account lockout attacks such as CAPEC-02.
      </Solution_or_Mitigation>
		</Solutions_and_Mitigations>
		<Attack_Motivation-Consequences>
			<Attack_Motivation-Consequence>Privilege Escalation</Attack_Motivation-Consequence>
		</Attack_Motivation-Consequences>
		<Related_Weaknesses>
			<Related_Weakness>
				<CWE_ID>521</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>262</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>263</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
		</Related_Weaknesses>
		<Related_Attack_Patterns>
			<Related_Attack_Pattern>
				<Related_Attack_Pattern_ID>49</Related_Attack_Pattern_ID>
				<Related_Attack_Pattern_Relationship_Type>More Abstract</Related_Attack_Pattern_Relationship_Type>
				<Related_Attack_Pattern_Relationship_Type>Occasionally Follows</Related_Attack_Pattern_Relationship_Type>
				<Relationship_Description/>
			</Related_Attack_Pattern>
			<Related_Attack_Pattern>
				<Related_Attack_Pattern_ID>70</Related_Attack_Pattern_ID>
				<Related_Attack_Pattern_Relationship_Type>More Detailed</Related_Attack_Pattern_Relationship_Type>
				<Related_Attack_Pattern_Relationship_Type>Occasionally Precedes</Related_Attack_Pattern_Relationship_Type>
				<Relationship_Description/>
			</Related_Attack_Pattern>
			<Related_Attack_Pattern>
				<Related_Attack_Pattern_ID>55</Related_Attack_Pattern_ID>
				<Related_Attack_Pattern_Relationship_Type>Occasionally Follows</Related_Attack_Pattern_Relationship_Type>
				<Relationship_Description/>
			</Related_Attack_Pattern>
		</Related_Attack_Patterns>
		<Purpose>Penetration</Purpose>
		<CIA_Impact>
			<Confidentiality_Impact>High</Confidentiality_Impact>
			<Integrity_Impact>Medium</Integrity_Impact>
			<Availability_Impact>Low</Availability_Impact>
		</CIA_Impact>
		<Technical_Context>
			<Architectural_Paradigm>All</Architectural_Paradigm>
			<Framework>All</Framework>
			<Platform>All</Platform>
			<Language>All</Language>
		</Technical_Context>
		<Source>
			<Submission>
				<Submitter>Eugene Lebanidze</Submitter>
				<Submitter_Organization>Cigital, Inc</Submitter_Organization>
				<Submission_Date>2007-02-26</Submission_Date>
			</Submission>
			<Modification>
				<Modifier>Sean Barnum</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-03-01</Modification_Date>
				<Modification_Comment>Review and revision of content</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Richard Struse</Modifier>
				<Modifier_Organization>VOXEM, Inc</Modifier_Organization>
				<Modification_Date>2007-03-26</Modification_Date>
				<Modification_Comment>Review and feedback leading to changes in Solutions</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Sean Barnum</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-04-13</Modification_Date>
				<Modification_Comment>Modified pattern content according to review and feedback</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Amit Sethi</Modifier>
				<Modifier_Organization>Cigital, Inc.</Modifier_Organization>
				<Modification_Date>2007-10-29</Modification_Date>
				<Modification_Comment>Added extended Attack Execution Flow</Modification_Comment>
			</Modification>
		</Source>
	</Attack_Pattern>
                <Attack_Pattern CAPEC_ID="24" Name="Filter Failure through Buffer Overflow" Pattern_Abstraction="Detailed">
		<Description>
			<Summary>
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. lets the user input into the system unfiltered).		
	</Summary>
			<Attack_Execution_Flow>
				<Attack_Phase Name="Explore">
					<Attack_Step>
						<Attack_Step_Title>Survey</Attack_Step_Title>
						<Attack_Step_Description>The attacker surveys the target application, possibly as a valid and authenticated user</Attack_Step_Description>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Spidering web sites for inputs that involve potential filtering</Attack_Step_Technique_Description>
							<Environments>env-Web</Environments>
						</Attack_Step_Technique>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Brute force guessing of filtered inputs</Attack_Step_Technique_Description>
							<Environments>env-All</Environments>
						</Attack_Step_Technique>
						<Indicator ID="c24s1i1" type="Positive">
							<Indicator_Description>Software messages (e.g., "the following characters are not allowed...") indicate that filtered inputs are present in the software. (</Indicator_Description>
							<Environments>env-Web env-ClientServer</Environments>
						</Indicator>
						<Indicator ID="c24s1i2" type="Positive">
							<Indicator_Description>Application uses predefined inputs (e.g., drop-down lists, radio buttons, selection lists, etc.)</Indicator_Description>
							<Environments>env-Web env-ClientServer env-Local env-Embedded</Environments>
						</Indicator>
						<Indicator ID="c24s1i3" type="Negative">
							<Indicator_Description>Managed code (e.g., .NET, Java) is likely, based on URLs.</Indicator_Description>
							<Environments>env-Web</Environments>
						</Indicator>
						<Indicator ID="c24s1i4" type="Negative">
							<Indicator_Description>Managed code (e.g., .NET, Java) is likely, based on files found in software.</Indicator_Description>
							<Environments>env-ClientServer env-Local env-Embedded env-Peer2Peer env-CommProtocol</Environments>
						</Indicator>
						<Indicator ID="c24s1i5" type="Negative">
							<Indicator_Description>Java code is likely, based on standard disclaimers (e.g., "This software contains Java from Sun...."). Such declarations are frequent on commercial software that is based on Java.</Indicator_Description>
							<Environments>env-Embedded env-Local env-ClientServer</Environments>
						</Indicator>
						<Indicator ID="c24s1i6" type="Inconclusive">
							<Indicator_Description>Java code is likely, based on one of the other indicators, but it could contain Java Native Interface (JNI) code. This is indicated by the inclusion of DLLs or equivalent binary object code with Java code.</Indicator_Description>
							<Environments>env-Embedded env-Local env-ClientServer</Environments>
						</Indicator>
					</Attack_Step>
				</Attack_Phase>
				<Attack_Phase Name="Experiment">
					<Attack_Step>
						<Attack_Step_Title>Attempt injections</Attack_Step_Title>
						<Attack_Step_Description>
              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.
            </Attack_Step_Description>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Brute force attack through black box penetration test tool.</Attack_Step_Technique_Description>
							<Environments>env-Web env-ClientServer env-CommProtocol env-Peer2Peer</Environments>
						</Attack_Step_Technique>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Fuzzing of communications protocols</Attack_Step_Technique_Description>
							<Environments>env-CommProtocol env-Peer2Peer env-ClientServer</Environments>
						</Attack_Step_Technique>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Manual testing of possible inputs with attack data.</Attack_Step_Technique_Description>
							<Environments>env-All</Environments>
						</Attack_Step_Technique>
						<Outcome ID="c24s2o1" type="Success">Unexpected output from the application.</Outcome>
						<Outcome ID="c24s2o2" type="Failure">No unexpected output from the application.</Outcome>
						<Security_Control ID="c24s2s1" type="Detective">Monitor and analyze logs for failures that exceed common usage sizes. For example, if typical transactions, even normal failed transactions, rarely exceed 250 characters, monitor logs for all attempts that contain 250 or more characters. In the event of successful exploitation, there may actually be no useful log. But an attacker's experiments will likely show up, giving clues to the ultimate attack.</Security_Control>
						<Security_Control ID="c24s2s2" type="Corrective">Disconnect or block connections from systems or users that exceed acceptable heuristics for normal transaction sizes.</Security_Control>
					</Attack_Step>
					<Attack_Step>
						<Attack_Step_Title>Monitor responses</Attack_Step_Title>
						<Attack_Step_Description>
Watch for any indication of failure occurring.  Carefully watch to see what happened when filter failure occurred.  Did the data get in?
            </Attack_Step_Description>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>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.</Attack_Step_Technique_Description>
							<Environments>env-All</Environments>
						</Attack_Step_Technique>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Check Log files. An attacker with access to log files can look at the outcome of bad input.</Attack_Step_Technique_Description>
							<Environments>env-Local env-Embedded</Environments>
						</Attack_Step_Technique>
						<Security_Control ID="c24s3s1" type="Preventative">Prevent access to log files that contain error output.</Security_Control>
						<Security_Control ID="c24s3s2" type="Preventative">Prevent access to and/or sanitize all error output.</Security_Control>
					</Attack_Step>
				</Attack_Phase>
				<Attack_Phase Name="Exploit">
					<Attack_Step>
						<Attack_Step_Title>Abuse the system through filter failure</Attack_Step_Title>
						<Attack_Step_Description>An attacker writes a script to consistently induce the filter failure. </Attack_Step_Description>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>DoS through filter failure. The attacker causes the system to crash or stay down because of its failure to filter properly.</Attack_Step_Technique_Description>
							<Environments>env-All</Environments>
						</Attack_Step_Technique>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Malicious code execution. An attacker introduces a malicious payload and executes arbitrary code on the target system.</Attack_Step_Technique_Description>
							<Environments>env-All</Environments>
						</Attack_Step_Technique>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>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.</Attack_Step_Technique_Description>
							<Environments>env-All</Environments>
						</Attack_Step_Technique>
						<Indicator ID="c24s4i1" type="Positive">
							<Indicator_Description>Failure mode of the software (perhaps as a safety mechanism) includes exiting or ceasing to respond.</Indicator_Description>
							<Environments>env-All</Environments>
						</Indicator>
						<Indicator ID="c24s4i2" type="Negative">
							<Indicator_Description>Failures do not involve stopping services, rejecting inputs or connections, and do not affect other simultaneous users of the software.</Indicator_Description>
							<Environments>env-All</Environments>
						</Indicator>
						<Outcome ID="c24s4o1" type="Success">Attacker-supplied code is executed on the target system.</Outcome>
						<Outcome ID="c24s4o2" type="Success">The software stops responding for at least two orders of magnitude longer than the input takes to send. (e.g., 0.1s to send input induces at least a 10 second period non-responsiveness).</Outcome>
						<Outcome ID="c24s4o3" type="Success">Non-response by an attacker's input has an impact on the quality of service of other simultaneous users of the software.</Outcome>
						<Security_Control ID="c24s4s1" type="Detective">Monitor software response time regularly, and react to unexpected variations.</Security_Control>
						<Security_Control ID="c24s4s2" type="Preventative">Execute filtering modules with minimal privileges.</Security_Control>
						<Security_Control ID="c24s4s3" type="Preventative">Execute filtering modules in operating system "sandboxes" or similar containers.</Security_Control>
					</Attack_Step>
				</Attack_Phase>
			</Attack_Execution_Flow>
		</Description>
		<Attack_Prerequisites>
			<Attack_Prerequisite>Ability to control the length of data passed to an active filter.</Attack_Prerequisite>
		</Attack_Prerequisites>
		<Typical_Severity>High</Typical_Severity>
		<Typical_Likelihood_of_Exploit>
			<Likelihood>High</Likelihood>
		</Typical_Likelihood_of_Exploit>
		<Methods_of_Attack>
			<Method_of_Attack>Injection</Method_of_Attack>
		</Methods_of_Attack>
		<Examples-Instances>
			<Example-Instance>
				<Example-Instance_Description>Attack Example: Filter Failure in Taylor UUCP Daemon
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.</Example-Instance_Description>
			</Example-Instance>
			<Example-Instance>
				<Example-Instance_Description>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.</Example-Instance_Description>
			</Example-Instance>
			<Example-Instance>
				<Example-Instance_Description>
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.</Example-Instance_Description>
			</Example-Instance>
		</Examples-Instances>
		<Attacker_Skill_or_Knowledge_Required>Low : An attacker can simply overflow a buffer by inserting a long string into an attacker-modifiable injection vector.  The result can be a DoS.
High : 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.
	</Attacker_Skill_or_Knowledge_Required>
		<Resources_Required/>
		<Probing_Techniques>
			<Probing_Technique>
Try to feed very long data as input to the program and watch for any indication that a failure has occurred.   Then see if input has been admitted into the system.  
		</Probing_Technique>
			<Probing_Technique>
Some dynamic analysis tools may be helpful here to determine whether failure can be induced by feeding overly long inputs strings into the system.
		</Probing_Technique>
		</Probing_Techniques>
		<Indicators-Warnings_of_Attack>
			<Indicator-Warning_of_Attack>
Many exceptions are thrown by the application's filter modules in a short period of time. Check the logs. See if the probes are coming from the same IP address.
			</Indicator-Warning_of_Attack>
		</Indicators-Warnings_of_Attack>
		<Obfuscation_Techniques>
			<Obfuscation_Technique>
An attacker may temporally space out their probes.
		</Obfuscation_Technique>
			<Obfuscation_Technique>
An attacker may perform probes from different IP addresses.
		</Obfuscation_Technique>
		</Obfuscation_Techniques>
		<Solutions_and_Mitigations>
			<Solution_or_Mitigation>
Make sure that ANY failure occurring in the filtering or input validation routine is properly handled and that offending input is NOT allowed to go through.  Basically make sure that the vault is closed when failure occurs.
			</Solution_or_Mitigation>
			<Solution_or_Mitigation>
Pre-design: Use a language or compiler that performs automatic bounds checking.
			</Solution_or_Mitigation>
			<Solution_or_Mitigation>
Pre-design through Build: Compiler-based canary mechanisms such as StackGuard, ProPolice and the Microsoft Visual Studio /GS flag. Unless this provides automatic bounds checking, it is not a complete solution.
			</Solution_or_Mitigation>
			<Solution_or_Mitigation>
Operational: Use OS-level preventative functionality. Not a complete solution.
			</Solution_or_Mitigation>
			<Solution_or_Mitigation>
Design: Use an abstraction library to abstract away risky APIs. Not a complete solution.
			</Solution_or_Mitigation>
		</Solutions_and_Mitigations>
		<Attack_Motivation-Consequences>
			<Attack_Motivation-Consequence>Run Arbitrary Code</Attack_Motivation-Consequence>
			<Attack_Motivation-Consequence>Privilege Escalation</Attack_Motivation-Consequence>
			<Attack_Motivation-Consequence>Denial of Service</Attack_Motivation-Consequence>
		</Attack_Motivation-Consequences>
		<Context_Description/>
		<Injection_Vector> Web form, URL, File, Command line, Network socket, etc.
		</Injection_Vector>
		<Payload>All of the data that just got into the system unfiltered becomes the payload.  </Payload>
		<Activation_Zone>
Since the input enters the system effectively unfiltered, it may be dangerous if used in a SQL statement (i.e. SQL injection), as part of the command executed on the target system (i.e. command injection), as part of the reflection API (i.e. reflection injection), placed in logs (i.e. log injection), or perhaps to overflow another buffer in the system and give the attacker ability to execute arbitrary code. A subsequent buffer overflow may not even be required for that as the original one may be leveraged if the attacker gets lucky, that is the payload is activated in the filter itself, which also becomes the activation zone.
		</Activation_Zone>
		<Payload_Activation_Impact>
Since no input validation is effectively performed in this situation, the impact of the attack may be a complete compromise of confidentiality, integrity, accountability and availability services.
		</Payload_Activation_Impact>
		<Related_Weaknesses>
			<Related_Weakness>
				<CWE_ID>120</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>119</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>118</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>74</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
			<Related_Weakness>
				<CWE_ID>20</CWE_ID>
				<Weakness_Relationship_Type>Targeted</Weakness_Relationship_Type>
			</Related_Weakness>
		</Related_Weaknesses>
		<Related_Attack_Patterns>
			<Related_Attack_Pattern>
				<Related_Attack_Pattern_ID>100</Related_Attack_Pattern_ID>
				<Related_Attack_Pattern_Relationship_Type>Occasionally Follows</Related_Attack_Pattern_Relationship_Type>
				<Relationship_Description/>
			</Related_Attack_Pattern>
		</Related_Attack_Patterns>
		<Relevant_Security_Requirements>
			<Relevant_Security_Requirement>
			    Input validation and filtering logic should fail securely (vault doors are closed)
			 </Relevant_Security_Requirement>
		</Relevant_Security_Requirements>
		<Related_Security_Principles>
			<Related_Security_Principle>
Failing Securely
			</Related_Security_Principle>
		</Related_Security_Principles>
		<Related_Guidelines>
			<Related_Guideline>All input should be treated as rejected by default, unless explicitly allowed by the filter.  Thus if the filter fails before "blessing" the data, it will be rejected.</Related_Guideline>
		</Related_Guidelines>
		<Purpose>Penetration</Purpose>
		<CIA_Impact>
			<Confidentiality_Impact>Medium</Confidentiality_Impact>
			<Integrity_Impact>High</Integrity_Impact>
			<Availability_Impact>Medium</Availability_Impact>
		</CIA_Impact>
		<Technical_Context>
			<Architectural_Paradigm>All</Architectural_Paradigm>
			<Framework>All</Framework>
			<Platform>All</Platform>
			<Language>All</Language>
			<Language>C</Language>
			<Language>C++</Language>
		</Technical_Context>
		<References>
			<Reference>G. Hoglund and G. McGraw. Exploiting Software: How to Break Code. Addison-Wesley, February 2004.</Reference>
			<Reference>CWE – Buffer Errors</Reference>
		</References>
		<Source>
			<Submission>
				<Submitter>G. Hoglund and G. McGraw. Exploiting Software: How to Break Code. Addison-Wesley, February 2004.</Submitter>
				<Submitter_Organization>Cigital, Inc</Submitter_Organization>
				<Submission_Date>2007-03-01</Submission_Date>
			</Submission>
			<Modification>
				<Modifier>Eugene Lebanidze</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-02-26</Modification_Date>
				<Modification_Comment>Fleshed out content to CAPEC schema from the original descriptions in "Exploiting Software"</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Sean Barnum</Modifier>
				<Modifier_Organization>Cigital, Inc</Modifier_Organization>
				<Modification_Date>2007-03-05</Modification_Date>
				<Modification_Comment>Review and revise</Modification_Comment>
			</Modification>
			<Modification>
				<Modifier>Paco Hope</Modifier>
				<Modifier_Organization>Cigital, Inc.</Modifier_Organization>
				<Modification_Date>2007-10-20</Modification_Date>
				<Modification_Comment>Added extended Attack Execution Flow</Modification_Comment>
			</Modification>
		</Source>
	</Attack_Pattern>
                <Attack_Pattern CAPEC_ID="27" Name="Leveraging Race Conditions via Symbolic Links" Pattern_Abstraction="Detailed">
		<Description>
			<Summary>This attack leverages the use of symbolic links (Symlinks) in order to write to sensitive files. An attacker can create a Symlink link to a target file not otherwise accessible to her. When the privileged program tries to create a temporary file with the same name as the Symlink link, it will actually write to the target file pointed to by the attacker's Symlink link. If the attacker can insert malicious content in the temporary file she will be writing to the sensitive file by using the Symlink. The race occurs because the system checks if the temporary file exists, then creates the file. The attacker would typically create the Symlink during the interval between the check and the creation of the temporary file.</Summary>
			<Attack_Execution_Flow>
				<Attack_Phase Name="Explore">
					<Attack_Step>
						<Attack_Step_Title>Verify that target host's platform supports symbolic links.</Attack_Step_Title>
						<Attack_Step_Description>This attack pattern is only applicable on platforms that support symbolic links.</Attack_Step_Description>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Research target platform to determine whether it supports symbolic links.</Attack_Step_Technique_Description>
							<Environments>env-Embedded env-Local</Environments>
						</Attack_Step_Technique>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Create a symbolic link and ensure that it works as expected on the given platform.</Attack_Step_Technique_Description>
							<Environments>env-Embedded env-Local</Environments>
						</Attack_Step_Technique>
						<Outcome ID="c27s0o1" type="Success">Target platform supports symbolic links (e.g. Linux, UNIX, etc.)</Outcome>
						<Outcome ID="c27s0o2" type="Failure">Target platform does not support symbolic links (e.g. MS Windows)</Outcome>
					</Attack_Step>
					<Attack_Step>
						<Attack_Step_Title>Examine application's file I/O behavior</Attack_Step_Title>
						<Attack_Step_Description>Analyze the application's file I/O behavior to determine where it stores files, as well as the operations it performs to read/write files.</Attack_Step_Description>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Use kernel tracing utility such as ktrace to monitor application behavior</Attack_Step_Technique_Description>
							<Environments>env-Local</Environments>
						</Attack_Step_Technique>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Use debugging utility such as File Monitor to monitor the application's filesystem I/O calls</Attack_Step_Technique_Description>
							<Environments>env-Local</Environments>
						</Attack_Step_Technique>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Description>Watch temporary directories to see when temporary files are created, modified and deleted.</Attack_Step_Technique_Description>
							<Environments>env-Embedded env-Local</Environments>
						</Attack_Step_Technique>
						<Attack_Step_Technique>
							<Attack_Step_Technique_Descriptio