CAPEC-244
XSS Targeting URI Placeholders
An attack of this type exploits the ability of most browsers to interpret "data", "javascript" or other URI schemes as client-side executable content placeholders. This attack consists of passing a malicious URI in an anchor tag HREF attribute or any other similar attributes in other HTML tags. Such malicious URI contains, for example, a base64 encoded HTML content with an embedded cross-site scripting payload. The attack is executed when the browser interprets the malicious content i.e., for example, when the victim clicks on the malicious link.
Abstraction
Detailed
Typical severity
High
Likelihood of attack
High
Understand the attack
What is this attack pattern?
Execution flow
How does the attack proceed, step by step?
Explore
Survey the application for user-controllable inputs
Techniques used
- Use a spidering tool to follow and record all links. Make special 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. Make special note of any links that include parameters in the URL. Manual traversal of this type is frequently necessary to identify forms that are GET method forms rather than POST forms.
- Use a browser to manually explore the website and analyze how it is constructed. Many browser's plugins are available to facilitate the analysis or automate the URL discovery.
Experiment
Probe identified potential entry points for reflected XSS vulnerability
Techniques used
- Use a list of XSS probe strings using different URI schemes to inject in parameters of known URLs. If possible, the probe strings contain a unique identifier to trace the injected string back to the entry point.
- Use a proxy tool to record results of manual input of XSS probes in known URLs.
Craft malicious XSS URL
Techniques used
- Change a URL parameter to include a malicious payload formatted as a URI scheme, or use the URL returned when the URI scheme was given as input to the web application.
- Send information gathered from the malicious script to a remote endpoint.
Exploit
Get victim to click URL
Techniques used
- 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.
Requirements
What does the attack require?
Prerequisites
- Target client software must allow scripting such as JavaScript and allows executable content delivered using a data URI scheme.
Skills required
- Medium: To inject the malicious payload in a web page
Resources required
- Ability to send HTTP request to a web application
Impact
What does a successful attack lead to?
Affected scopes: Integrity
Affected scopes: Confidentiality
Affected scopes: Authorization
Affected scopes: Accountability, Authentication, Authorization, Non-Repudiation
Affected scopes: Access Control, Authorization
Defence
How is it prevented and mitigated?
Real world