{ "id": "bundle--90216c3a-8ce9-4fad-b81c-4f7714af9d48", "objects": [ { "created": "2014-06-23T00:00:00.000Z", "created_by_ref": "identity--e50ab59c-5c4f-4d40-bf6a-d58418d89bcd", "description": "An adversary distributes a link (or possibly some other query structure) with a request to a third party web server that is malformed and also contains a block of exploit code in order to have the exploit become live code in the resulting error page.", "external_references": [ { "external_id": "CAPEC-198", "source_name": "capec", "url": "https://capec.mitre.org/data/definitions/198.html" }, { "external_id": "CWE-81", "source_name": "cwe", "url": "http://cwe.mitre.org/data/definitions/81.html" } ], "id": "attack-pattern--0e2bf24b-2931-45aa-a0e9-22eccfb310b2", "modified": "2022-09-29T00:00:00.000Z", "name": "XSS Targeting Error Pages", "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--61b17787-fe92-427c-9e6a-6311997d7b2a", "attack-pattern--800f8095-99b6-4bb9-8bc6-8b9727201a2f", "attack-pattern--b1eef783-daae-494c-a418-cd9ada7cbe8b" ], "x_capec_domains": [ "Software", "Software", "Software" ], "x_capec_execution_flow": "

Execution Flow

Explore

  1. Survey the application for user-controllable inputs as URL parameters: Using a browser or an automated tool, an adversary follows all public links and actions on a web site. They record all the links, the forms, the resources accessed and all other potential entry-points for the web application, looking for URLs which use parameters.

  2. Techniques
    Use a spidering tool to follow and record all links and analyze the web pages to find entry points. Make note of any links that include parameters in the URL.
    Use a proxy tool to record all links visited during a manual traversal of the web application.
    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.

Experiment

  1. Cause application to return error page: The adversary uses the URLs gathered in the \"Explore\" phase as a target list and injects various common script payloads and special characters into the parameters to see if an error page occurs, and if the injected payload is executed by the error page.

  2. Techniques
    Use a list of XSS probe strings to inject script in parameters of known URLs. If possible, the probe strings contain a unique identifier.
    Use a proxy tool to record results of manual input of XSS probes in known URLs.
    Use a list of HTML special characters to inject into parameters of known URLs and check if they caused errors
  3. Craft malicious XSS URL: Once the adversary has determined which parameters are vulnerable to XSS through an error page, they will craft a malicious URL containing the XSS exploit. The adversary can have many goals, from stealing session IDs, cookies, credentials, and page content from the victim.

  4. Techniques
    Change a URL parameter to include a malicious script tag.
    Send information gathered from the malicious script to a remote endpoint.

Exploit

  1. Get victim to click URL: In order for the attack to be successful, the victim needs to access the malicious URL.

  2. Techniques
    Send a phishing email to the victim containing the malicious URL. This can be hidden in a hyperlink as to not show the full URL, which might draw suspicion.
    Put the malicious URL on a public forum, where many victims might accidentally click the link.
", "x_capec_extended_description": "\n When the third party web server receives the crafted request and notes the error it then creates an error message that echoes the malformed message, including the exploit. Doing this converts the exploit portion of the message into to valid language elements that are executed by the viewing browser. When a victim executes the query provided by the adversary the infected error message is returned including the exploit code which then runs in the victim's browser. XSS can result in execution of code as well as data leakage (e.g. session cookies can be sent to the attacker). This type of attack is especially dangerous since the exploit appears to come from the third party web server, who the victim may trust and hence be more vulnerable to deception.\n ", "x_capec_prerequisites": [ "A third party web server which fails to adequately sanitize messages sent in error pages.", "The victim must be made to execute a query crafted by the adversary which results in the infected error report." ], "x_capec_resources_required": [ "None: No specialized resources are required to execute this type of attack." ], "x_capec_status": "Draft", "x_capec_typical_severity": "Medium", "x_capec_version": "3.9" } ], "type": "bundle" }