CAPEC-182: Flash Injection
An attacker tricks a victim to execute malicious flash content that executes commands or makes flash calls specified by the attacker. One example of this attack is cross-site flashing, an attacker controlled parameter to a reference call loads from content specified by the attacker.
Last updated
Overview
CAPEC-182 (Flash Injection) is a standard-level attack pattern catalogued by MITRE in the Common Attack Pattern Enumeration and Classification (CAPEC). It describes a recurring method attackers use to exploit software weaknesses.
How the attack works
The phases an attacker typically follows.
- Step 1Explore
[Find Injection Entry Points] The attacker first takes an inventory of the entry points of the application.
- Spider the website for all available URLs that reference a Flash application.
- List all uninitialized global variables (such as _root.*, _global.*, _level0.*) in ActionScript, registered global variables in included files, load variables to external movies.
- Step 2Experiment
[Determine the application's susceptibility to Flash injection] Determine the application's susceptibility to Flash injection. For each URL identified in the explore phase, the attacker attempts to use various techniques such as direct load asfunction, controlled evil page/host, Flash HTML injection, and DOM injection to determine whether the application is susceptible to Flash injection.
- Test the page using direct load asfunction, getURL,javascript:gotRoot("")///d.jpg
- Test the page using controlled evil page/host, http://example.com/evil.swf
- Test the page using Flash HTML injection, "'><img src='asfunction:getURL,javascript:gotRoot("")//.jpg' >
- Test the page using DOM injection, (gotRoot(''))
- Step 3Exploit
[Inject malicious content into target] Inject malicious content into target utilizing vulnerable injection vectors identified in the Experiment phase
What the attacker needs
Prerequisites
- The target must be capable of running Flash applications. In some cases, the victim must follow an attacker-supplied link.
Skills required
- Medium skill: The attacker needs to have knowledge of Flash, especially how to insert content the executes commands.
Resources required
- None: No specialized resources are required to execute this type of attack. The attacker may need to be able to serve the injected Flash content.
Consequences
What a successful CAPEC-182 attack can achieve.
Other
Affects: Confidentiality
Information Leakage
Modify Data
Affects: Integrity
Read Data
Affects: Confidentiality
Execute Unauthorized Commands
Affects: Authorization
Run Arbitrary Code
Gain Privileges
Affects: Accountability, Authentication, Authorization, Non-Repudiation
Bypass Protection Mechanism
Affects: Access Control, Authorization
How to mitigate it
Defenses that reduce the risk of CAPEC-182.
- Implementation: remove sensitive information such as user name and password in the SWF file.
- Implementation: use validation on both client and server side.
- Implementation: remove debug information.
- Implementation: use SSL when loading external data
- Implementation: use crossdomain.xml file to allow the application domain to load stuff or the SWF file called by other domain.
Examples
In the following example, the SWF file contains getURL('javascript:SomeFunc("someValue")','','GET') A request like http://example.com/noundef.swf?a=0:0;alert('XSS') becomes javascript:SomeFunc("someValue")?a=0:0;alert(123)
Frequently asked questions
Common questions about CAPEC-182.
- What is CAPEC-182?
- An attacker tricks a victim to execute malicious flash content that executes commands or makes flash calls specified by the attacker. One example of this attack is cross-site flashing, an attacker controlled parameter to a reference call loads from content specified by the attacker.
- How does a Flash Injection attack work?
- It typically unfolds over 3 phases. It begins with: [Find Injection Entry Points] The attacker first takes an inventory of the entry points of the application.
- How do you prevent CAPEC-182?
- Implementation: remove sensitive information such as user name and password in the SWF file.
- What weaknesses does CAPEC-182 target?
- CAPEC-182 exploits 3 CWE weaknesses: CWE-20 (Improper Input Validation), CWE-184 (Incomplete List of Disallowed Inputs) and CWE-697 (Incorrect Comparison).
- How severe is CAPEC-182?
- MITRE rates CAPEC-182 as Medium severity with high likelihood of attack.
Sources
- [1]Finding Vulnerabilities in Flash Applications (2007)
- [2]A Lazy Pen Tester's Guide to Testing Flash Applications
- [3]Creating More Secure SWF Web Application
References
Attack-pattern data is sourced from the MITRE CAPEC catalog (v3.9). Weakness associations link to the corresponding CWE entries on RadicalNotion.AI.
Defend against CAPEC-182
Track the CVEs and weaknesses this technique exploits, with AI-written analysis and remediation steps.