Closed
Bug 863933
(CVE-2013-1687)
Opened 12 years ago
Closed 12 years ago
Arbitrary code execution via XBL
Categories
(Core :: XPConnect, defect)
Core
XPConnect
Tracking
()
VERIFIED
FIXED
Tracking | Status | |
---|---|---|
firefox20 | --- | unaffected |
firefox21 | --- | unaffected |
firefox22 | - | verified |
firefox23 | - | verified |
firefox-esr17 | --- | unaffected |
b2g18 | --- | unaffected |
People
(Reporter: marius.mlynski, Assigned: bholley)
References
Details
(Keywords: regression, reporter-external, sec-critical, Whiteboard: [adv-main22+])
Attachments
(1 file)
1.44 KB,
text/html
|
Details |
It is possible to compile a user-defined function in the XBL scope of a "marquee" element -- using |_setEventListener| method. Once the defined event is triggered, the code running in the XBL scope can access all content protected by System Only Wrapper. It can also open arbitrary chrome-privileged pages.
Additionally, remote web content can access privileged methods from property descriptor objects on Chrome Object Wrappers fetched off of an XBL scope. They can be subsequently used to perform a cross-site scripting attack on a frame with a privileged page, which allows drive-by download of malware.
Reporter | ||
Comment 1•12 years ago
|
||
This opens C:\Windows\System32\calc.exe on Windows or alerts Components.classes on other systems. Works in Firefox 22-23, earlier versions may work partially or not at all.
Reporter | ||
Updated•12 years ago
|
Attachment #739893 -
Attachment mime type: text/plain → text/html
Reporter | ||
Comment 2•12 years ago
|
||
Comment on attachment 739893 [details]
Exploit (launches calc.exe on windows)
Oh, btw, run from HTTP to avoid the mixed-content blocker ruining things.
Attachment #739893 -
Attachment mime type: text/html → text/plain
Assignee | ||
Updated•12 years ago
|
Keywords: sec-critical
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → bobbyholley+bmo
Comment 3•12 years ago
|
||
Matt agreed to confirm exploitability (or not) of branches. \o/
Flags: needinfo?(mwobensmith)
Comment 4•12 years ago
|
||
Is this something that may affect all branches, or might it be a regression from more recent patches?
Assignee | ||
Comment 5•12 years ago
|
||
Holy moly Mariusz, this is probably the best Mozilla exploit I've ever seen. The depth and cleverness here are off the charts. There are at least three distinct security exploits working in tandem here, and a number of other bits of suboptimal Gecko behavior being used as well. You have my deepest respect.
For those following along, here's the short version of what this testcase does:
1 - Hijacks the XBL scope using <marquee>
2 - Using the nsExpandedPrincipal associatd with the XBL scope, exploits a bug in CAPS to load "about:" in an iframe, which ends up loading with system principal.
3 - Using the ability of XBL scopes to create Xray waivers to content, bypasses COWs to access the |about:| iframe's Object.prototype, grabs __lookupSetter__, uses __lookupSetter__ to get a chrome-side setter to Element.innerHTML, and invokes the setter with the payload, causing it to get loaded as chrome.
Bugs 1 and 2 are really bad bugs but straightforward to fix. The XBL Scope hijack is particularly problematic on Beta, because we still have the Sandbox exception for __exposedProps__ there, meaning that this allows arbitrary COW bypasses even without the cleverness of (2) and (3). Thankfully, those bugs should be easy to backport.
I'm going to file dependent bugs for all of the pieces here.
Assignee | ||
Updated•12 years ago
|
Depends on: CVE-2013-1703
Assignee | ||
Comment 6•12 years ago
|
||
I still need to file the lynchpin bug here - I'll get to it shortly.
Comment 7•12 years ago
|
||
Exploit works on 22/23, all Windows.
For the purposes of this bug, I set the branch flags. However, I understand that components of this bug - the bugs that were filed as a result - may actually affect older branches.
status-firefox20:
--- → unaffected
status-firefox21:
--- → unaffected
status-firefox22:
--- → affected
status-firefox23:
--- → affected
status-firefox-esr17:
--- → unaffected
Flags: needinfo?(mwobensmith)
Updated•12 years ago
|
tracking-firefox22:
--- → ?
tracking-firefox23:
--- → ?
Updated•12 years ago
|
Keywords: regression
Comment 8•12 years ago
|
||
As above, can we assume this affects Mac/Linux as well?
Comment 9•12 years ago
|
||
yeah.
Updated•12 years ago
|
Updated•12 years ago
|
Flags: sec-bounty?
Updated•12 years ago
|
Flags: sec-bounty? → sec-bounty+
Comment 12•12 years ago
|
||
Spoke with Bobby over email, no need to track this meta bug specifically (we're tracking/uplifting related bugs).
Comment 13•12 years ago
|
||
I think this can be closed, as all of the blocking bugs have been marked fixed. This should probably also be verified as fixed.
Comment 15•12 years ago
|
||
Confirmed exploit on FF23, 2013-04-19
Verified fixed on FF22, 2013-05-31
Verified fixed on FF23, 2013-05-31
Verified fixed on FF24, 2013-05-31
Status: RESOLVED → VERIFIED
Keywords: verifyme
Updated•12 years ago
|
Whiteboard: [adv-main22+]
Updated•12 years ago
|
Alias: CVE-2013-1687
Updated•12 years ago
|
Attachment #739893 -
Attachment description: Exploit → Exploit (launches calc.exe on windows)
Attachment #739893 -
Attachment is private: true
Attachment #739893 -
Attachment mime type: text/plain → text/html
Updated•11 years ago
|
status-b2g18:
--- → unaffected
Updated•11 years ago
|
Group: core-security
Comment 16•10 years ago
|
||
Is there any way that I could get access to the attachment testcase? I've been studying older exploits some this week, and I would love to see this work.
Assignee | ||
Comment 17•10 years ago
|
||
(In reply to codyc from comment #16)
> Is there any way that I could get access to the attachment testcase? I've
> been studying older exploits some this week, and I would love to see this
> work.
I have emailed the testcase to cody.
Comment 18•10 years ago
|
||
(In reply to Bobby Holley (:bholley) from comment #17)
> I have emailed the testcase to cody.
Heh. I encrypted it with his new key and did the same...
Updated•10 years ago
|
Attachment #739893 -
Attachment is private: false
Comment 19•10 years ago
|
||
Aww, now I don't feel all super special ;-)
Updated•9 months ago
|
Keywords: reporter-external
You need to log in
before you can comment on or make changes to this bug.
Description
•