Catch-up on Flash XSS exploitation Part 2 – “navigateToURL” and “jar:” protocol!
Flash's navigateToURL function ignored the jar: protocol prefix, so a blacklist that blocked javascript: could be bypassed with jar:javascript:. The same trick, combined with slash manipulation, let Internet Explorer open restricted local protocols such as file: and ms-its: from a Flash file, enabling local file access and drive enumeration.
soroush.me
Published on soroush.me
I think I have already proven my interest in using simple vectors to bypass available protections (some examples to support my claim!: IIS Semi-colon issue, IIS Short Filename Scanner, Mozilla Firefox Directory Traversal by using resource protocol, etc). Now, I am going to reveal more secrets and this time in Flash…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely Flash's URL handling treated the jar: prefix as transparent and did not re-check the inner scheme against its protocol restrictions, and Internet Explorer then resolved the resulting URL to restricted local protocols.
Impact
An attacker could bypass javascript: blacklists to run script in the Flash file's context, and in Internet Explorer could open restricted local protocols, enumerate drives and potentially run local files; Chrome and Firefox were not bypassed.
What the attacker needed
Victim uses Internet Explorer for local-protocol bypass; attacker can supply input to a Flash navigateToURL call; victim loads the malicious Flash file
The fix
Adobe Flash was patched to close the JAR protocol issues.
How it was found
- Create a Flash file that passes user input to navigateToURL.
- Supply input beginning with jar: followed by javascript: to bypass a javascript: blacklist.
- For local access, supply jar: followed by a restricted protocol such as file: with manipulated slashes.
- Open the resulting link in Internet Explorer, optionally inside an iframe, to reach local resources.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Flash movies can tell the browser to open a web address. The author found that putting 'jar:' in front of a dangerous address like 'javascript:' made Flash ignore that prefix, so a filter looking for 'javascript:' missed it. He also found that this trick let Internet Explorer open local files and devices that Flash normally blocks.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.