Module 5.4: Browser Isolation
Module 5.4: Browser Isolation
4: Browser Isolation
Frame and iFrame
Window may contain frames from different sources
Frame: rigid division as part of frameset
iFrame: floating inline frame
iFrame example
<iframe src="hello.html" width=450 height=100>
If you can see this, your browser doesn't understand IFRAME.
</iframe>
http://www.w3schools.com/tags/tryit.asp?
Windows Interact
3
Analogy
Operating system Web browser
Primitives
Primitives Document object model
System calls Frames
Processes Cookies / localStorage
Disk Principals: Origins
Principals: Users Mandatory access control
Discretionary access Vulnerabilities
control Cross-site scripting
Vulnerabilities Cross-site request forgery
Buffer overflow Cache history attacks
Root exploit
Policy Goals
Safe to visit an evil web site
VeriSign
www.facebook.com
www.facebook.com
facebook.com facebook.com
chat.facebook.com
Access-Control-Allow-Origin: *
Share contacts
postMessage syntax
frames[0].postMessage("Attack at dawn!",
"http://b.com/");
Attack at dawn!
Facebook
Facebook
Anecdote
Anecdote
Why include targetOrigin?
What goes wrong?
frames[0].postMessage("Attack at dawn!");
21
NAVIGATION
22
A Guninski Attack
awglogin
window.open("https://attacker.com/", "awglogin");
What should the policy be?
Sibling
Frame Bust
Child
Descendant
24
Legacy Browser Behavior
Browser Policy
IE 6 (default) Permissive
IE 6 (option) Child
IE7 (no Flash) Descendant
IE7 (with Flash) Permissive
Firefox 2 Window
Safari 3 Permissive
Opera 9 Window
HTML 5 Child
Window Policy Anomaly
top.frames[1].location = "http://www.attacker.com/...";
top.frames[2].location = "http://www.attacker.com/...";
...
Legacy Browser Behavior
Browser Policy
IE 6 (default) Permissive
IE 6 (option) Child
IE7 (no Flash) Descendant
IE7 (with Flash) Permissive
Firefox 2 Window
Safari 3 Permissive
Opera 9 Window
HTML 5 Child
Adoption of Descendant
Policy
Browser Policy
IE7 (no Flash) Descendant
IE7 (with Flash) Descendant
Firefox 3 Descendant
Safari 3 Descendant
Opera 9 (many policies)
HTML 5 Descendant