Browser Security I (Slides)
Browser Security I (Slides)
Browser Security I (Slides)
Attacks:
8 Using Components with Known Vulnerabilities
7 Missing Function Level Access Control
5 Sensitive Data Exposure Descriptions:
6 Security Misconfiguration
1. Modifies back-end statement through user input.
4 Insecure Direct Object References
2. Inserts Javascript into trusted sites.
2 Cross Site Scripting
3. Program flaws allow bypass of authentication
3 Broken Authentication and Session
methods.
1 Injection
4. Attackers modify file names.
5. Abuses lack of data encryption.
6. Exploits misconfigured servers.
7. Privilege functionality is hidden rather than
enforced through access controls.
8. Uses unpatched third party components.
Goals of Web Security:
Web Attacker:
Control attacker.com
Can obtain SSL/TLS certificate for attacker.com
User visits attacker.com
Or: runs attacker’s Facebook app, etc.
Web Threat Models
Network Attacker:
Network Attacker
Third-party
API’s
Third-party
Libraries
Acting parties on a website:
Specifically:
Specifically:
Users: Origins:
Principles Discretionary access Mandatory Access
Control Control
Cross-scripting
Vulnerabilities Buffer Overflow
Root Exploit Cross-site request forgery
Cache history attacks
Basic Execution Model
Each browser window or frame:
1. Loads content
2. Renders
Processes HTML and scripts to display the page.
May involve images, subframes, etc.
3. Responds to events
Basic Execution Model
Events:
Frame iFrame
Rigid division as part floating inline frame
of frameset
Frame Security
iFrame example:
<iFrame src=‘hello.html” width=“450”height=“100”>
</iFrame>
Frame Security
A B
A
Frame Security
Each frame of a page has an origin
Origin= protocol://host:port
canNavigate(A,B)
Can Frame A change the origin of content for
Frame B?
Frame Security
Frame-Principle Relationships:
readCookie(A,S), writeCookie(A,S)
Can Frame A read/write cookies from site S?
See: https://code.google.com/p/browsersec/wiki/Part 1
https://code.google.com/p/browsersec/wiki/Part 2
Browsing Context
A browsing context may be:
Process 1 Process 2
Skype keypassx
Filesystem
Comparing Process Context and
Browsing Context
Outcome:
Directive: Ensures iframe has unique origin
and cannot execute JavaScript,
Sandbox no form submission, disable API’s,
prevent content from using
plugins, etc.
Sandbox
Ensures iframe has unique origin.
allow-scripts
Modern Structuring Mechanisms
Sandbox example
self.addEventListener(‘message’, function(e) {
doWork self.postMessage(e.data); // Return message it is sent
}, false);
SubResource Integrity
Idea:
page author specifies has a (sub) resource they are
loading; browser checks integrity.
Idea:
page author specifies has a (sub) resource they are
loading; browser checks integrity.
amazon.com evil.biz
Cross Origin Resource Sharing
amazon.com
evil.biz