test_scratch / cti-ATT-CK-v13.1 /capec /2.1 /attack-pattern /attack-pattern--07e5901d-0f6d-41a9-ac19-e00eecece95f.json
khoicrtp's picture
Upload 2298 files
5fe70fd
raw
history blame
9.47 kB
{
"id": "bundle--8bd4aa5d-8297-4c2e-9d55-8a812269388d",
"objects": [
{
"created": "2014-06-23T00:00:00.000Z",
"created_by_ref": "identity--e50ab59c-5c4f-4d40-bf6a-d58418d89bcd",
"description": "This attack targets the use of the backslash in alternate encoding. An adversary can provide a backslash as a leading character and causes a parser to believe that the next character is special. This is called an escape. By using that trick, the adversary tries to exploit alternate ways to encode the same character which leads to filter problems and opens avenues to attack.",
"external_references": [
{
"external_id": "CAPEC-78",
"source_name": "capec",
"url": "https://capec.mitre.org/data/definitions/78.html"
},
{
"external_id": "CWE-180",
"source_name": "cwe",
"url": "http://cwe.mitre.org/data/definitions/180.html"
},
{
"external_id": "CWE-181",
"source_name": "cwe",
"url": "http://cwe.mitre.org/data/definitions/181.html"
},
{
"external_id": "CWE-173",
"source_name": "cwe",
"url": "http://cwe.mitre.org/data/definitions/173.html"
},
{
"external_id": "CWE-172",
"source_name": "cwe",
"url": "http://cwe.mitre.org/data/definitions/172.html"
},
{
"external_id": "CWE-73",
"source_name": "cwe",
"url": "http://cwe.mitre.org/data/definitions/73.html"
},
{
"external_id": "CWE-22",
"source_name": "cwe",
"url": "http://cwe.mitre.org/data/definitions/22.html"
},
{
"external_id": "CWE-74",
"source_name": "cwe",
"url": "http://cwe.mitre.org/data/definitions/74.html"
},
{
"external_id": "CWE-20",
"source_name": "cwe",
"url": "http://cwe.mitre.org/data/definitions/20.html"
},
{
"external_id": "CWE-697",
"source_name": "cwe",
"url": "http://cwe.mitre.org/data/definitions/697.html"
},
{
"external_id": "CWE-707",
"source_name": "cwe",
"url": "http://cwe.mitre.org/data/definitions/707.html"
},
{
"description": "G. Hoglund, G. McGraw, Exploiting Software: How to Break Code, 2004--02, Addison-Wesley",
"external_id": "REF-1",
"source_name": "reference_from_CAPEC"
}
],
"id": "attack-pattern--07e5901d-0f6d-41a9-ac19-e00eecece95f",
"modified": "2022-09-29T00:00:00.000Z",
"name": "Using Escaped Slashes in Alternate Encoding",
"object_marking_refs": [
"marking-definition--17d82bb2-eeeb-4898-bda5-3ddbcd2b799d"
],
"spec_version": "2.1",
"type": "attack-pattern",
"x_capec_abstraction": "Detailed",
"x_capec_child_of_refs": [
"attack-pattern--a1af7c24-25cb-46e5-a27b-ed316e1f91ce"
],
"x_capec_consequences": {
"Access_Control": [
"Bypass Protection Mechanism"
],
"Authorization": [
"Bypass Protection Mechanism"
],
"Availability": [
"Resource Consumption (Denial of Service)",
"Execute Unauthorized Commands (Run Arbitrary Code)"
],
"Confidentiality": [
"Read Data",
"Execute Unauthorized Commands (Run Arbitrary Code)",
"Bypass Protection Mechanism"
],
"Integrity": [
"Execute Unauthorized Commands (Run Arbitrary Code)"
]
},
"x_capec_domains": [
"Software"
],
"x_capec_example_instances": [
"\n <xhtml:p>For example, the byte pair \\0 might result in a single zero byte (a NULL) being sent. Another example is \\t, which is sometimes converted into a tab character. There is often an equivalent encoding between the back slash and the escaped back slash. This means that \\/ results in a single forward slash. A single forward slash also results in a single forward slash. The encoding looks like this:</xhtml:p>\n <xhtml:div style=\"margin-left:1em;\" class=\"informative\">/ yields /\\/ yields /</xhtml:div>\n ",
"\n <xhtml:p>An attack leveraging escaped slashes in slternate encodings is very simple. If you believe the target may be filtering the slash, attempt to supply \\/ and see what happens. Example command strings to try out include</xhtml:p>\n <xhtml:div style=\"margin-left:1em;\" class=\"informative\">CWD ..\\/..\\/..\\/..\\/winnt</xhtml:div>\n <xhtml:p>which converts in many cases to</xhtml:p>\n <xhtml:div style=\"margin-left:1em;\" class=\"informative\">CWD ../../../../winnt</xhtml:div>\n <xhtml:p>To probe for this kind of problem, a small C program that uses string output routines can be very useful. File system calls make excellent testing fodder. The simple snippet</xhtml:p>\n <xhtml:div style=\"margin-left:1em;\" class=\"informative\">int main(int argc, char* argv[]){<xhtml:div style=\"margin-left:1em;\">puts(\"\\/ \\\\ \\? \\. \\| \");return 0;</xhtml:div>\n }</xhtml:div>\n <xhtml:p>produces the output</xhtml:p>\n <xhtml:div style=\"margin-left:1em;\" class=\"informative\">/ \\ ? . |</xhtml:div>\n <xhtml:p>Clearly, the back slash is ignored, and thus we have hit on a number of alternative encodings to experiment with. Given our previous example, we can extend the attack to include other possibilities:</xhtml:p>\n <xhtml:div style=\"margin-left:1em;\" class=\"informative\">CWD ..\\?\\?\\?\\?\\/..\\/..\\/..\\/winntCWD \\.\\.\\/\\.\\.\\/\\.\\.\\/\\.\\.\\/winntCWD ..\\|\\|\\|\\|\\/..\\/..\\/..\\/winnt</xhtml:div>\n "
],
"x_capec_execution_flow": "<h2> Execution Flow </h2><div><h3>Explore</h3><ol><li> <p> <b>Survey the application for user-controllable inputs: </b>Using a browser, an automated tool or by inspecting the application, an adversary records all entry points to the application.</p></li><table><tbody><tr><th>Techniques</th></tr><tr><td>Use a spidering tool to follow and record all links and analyze the web pages to find entry points. Make special note of any links that include parameters in the URL.</td></tr><tr><td>Use a proxy tool to record all user input entry points visited during a manual traversal of the web application.</td></tr><tr><td>Use a browser to manually explore the website and analyze how it is constructed. Many browsers' plugins are available to facilitate the analysis or automate the discovery.</td></tr><tr><td>Manually inspect the application to find entry points.</td></tr></tbody></table></ol></div><div><h3>Experiment</h3><ol><li> <p> <b>Probe entry points to locate vulnerabilities: </b>The adversary uses the entry points gathered in the \"Explore\" phase as a target list and attempts to escape multiple different special characters using a backslash.</p></li><table><tbody><tr><th>Techniques</th></tr><tr><td>Escape a special character with a backslash to bypass input validation.</td></tr><tr><td>Try different encodings of both the backslash and the special character to see if this bypasses input validation</td></tr></tbody></table></ol></div><div><h3>Exploit</h3><ol><li> <p> <b>Manipulate input: </b>Once the adversary determines how to bypass filters that filter out special characters using an escaped slash, they will manipulate the user input in a way that is not intended by the application.</p></li></ol></div>",
"x_capec_likelihood_of_attack": "High",
"x_capec_prerequisites": [
"The application accepts the backlash character as escape character.",
"The application server does incomplete input data decoding, filtering and validation."
],
"x_capec_skills_required": {
"Low": "The adversary can naively try backslash character and discover that the target host uses it as escape character.",
"Medium": "The adversary may need deep understanding of the host target in order to exploit the vulnerability. The adversary may also use automated tools to probe for this vulnerability."
},
"x_capec_status": "Draft",
"x_capec_typical_severity": "High",
"x_capec_version": "3.9"
}
],
"type": "bundle"
}