designing trustworthy user-agents for a hostile web · mime-sniffing no upsniff from image/*...

87
Designing Trustworthy User-Agents for a Hostile Web Usenix Security 2009

Upload: others

Post on 12-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Designing Trustworthy User-Agents for a Hostile WebUsenix Security 2009

Page 2: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

IE8 Program Manager - Security

IE7 PM – Networking & Trust

Developer of Fiddler, TamperIE, IEToys

Page 3: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

IE 7 significantly reduced attack surface

against the browser and local machine…

Page 4: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

• WebApp attacks (CSRF, XSS, ClickJacking, splitting) could become the next big vector of exploit.

• More high-value information is moving to the web.

• Social Engineering and exploitation of add-ons continues to grow.

• The Web platform itself is getting richer.

• and the next generation of attackers is coming out of grade school.

but…

Page 5: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Worst of all, it turns out that crime

does pay (quite well) after all.

Page 6: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Why is browser security so elusive?

Page 7: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Complexity.

Page 8: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

The security

architecture of

the current web

platform was

largely an

afterthought.

Page 9: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Maybe there’s a shortcut?

Page 10: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

We could block nearly 100% of exploits by removing just one component from the system…

Page 11: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

The Network cable

Page 12: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Or, we could block a majority of

exploits by removing a different

component from the system…

Page 13: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

The user

Page 14: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

So, if we re-architect everything, or get

rid of the users, or get rid of the network,

then security might be easy.

FAIL

Page 15: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Tradeoffs are complicated.

Security is straightforward.

Page 16: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Yes, Microsoft is a big,

influential company...

Page 17: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

…but the

Internet is

bigger.

Page 18: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

•Many hundreds of millions of users…

•From all over the world…

•Visiting billions of web pages…

•And most don’t really even know what a

“browser” is!

Page 19: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

The Web is surprisingly

fragile.

Page 20: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

For most web users, it’s

all about value.

Page 21: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

The browser that most users will ask for…

Race car

Page 22: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

The browser that meets users security expectations…

Amphibious assault tank

Page 23: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Bad guys only need to find oneway in…

Page 24: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Security Team’s Investments

Security Feature ImprovementsCreate security features that address the top vulnerabilities today and in the future

Secure FeaturesReduce attack surface of existing code by closing legacy holes

Apply security-focused rigors against new code

Provide Security and CompatibilityUsers understand that improved security is a reason to upgrade

Page 25: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Social

Engineering

Web App

Vulnerabilities

Browser &

Add-on

Vulnerabilities

Address the evolving threat landscape

Threat Focus Areas

Page 26: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

ActiveXBrowser/Add-on Vulnerabilities

Page 27: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Is control

permitted to

run in browser

without

prompt?

AX Opt–in

Is control

permitted to

run on this

site?

PerSite AX

Has control

been

flagged as

unsafe?ActiveX

Killbits

ActiveX GauntletBrowser/Add-on Vulnerabilities

Safe for

scripting /

initialization

IObjectSafety

Page 28: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Per-site ActiveX

Helps prevent repurposing of ActiveX controls

Browser/Add-on Vulnerabilities

Page 29: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Data Execution Prevention

Mitigates many memory-related vulnerabilities by blocking code execution

Other protections like ASLR, SAFESEH, GS, etc

Browser/Add-on Vulnerabilities

Page 30: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Protected ModeBrowser/Add-on Vulnerabilities

Page 31: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Protected Mode

Loosely-coupled IE enables one frame to host both Low and Medium tabs

Intranet Zone moved to Medium Integrity by default

Silent Elevation List split

Minor API improvements

DWebBrowserEvents2::NewProcess

IE[Get|Set]ProtectedModeCookie

IERefreshElevationPolicy (IE7 GDR)

Other registry/filesystem helpers.

Browser/Add-on Vulnerabilities

Page 32: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

What’s the best way to

develop secure, performant,

and reliable C/C++ code?

Page 33: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Don’t.

Page 34: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Non-Binary Extensibility

Page 35: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Accelerators

Page 36: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

WebSlices

Page 37: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Visual Search Suggestions

Page 38: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;
Page 39: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Sometimes, threats

are obvious…

Page 40: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

…but bad guys are

getting smarter…

Page 41: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Fake codecs and add-ons

Page 42: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Fake antivirus

scanners & utilities

Page 43: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Try as we might…

…we haven’t figured out how to patch the user.

Page 44: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Group Policy ControlsSocial

Engineering

“Don’t ask my users to make security decisions.”

Policies include:

• Treat certificate errors as fatal

• Block insecure content

• Prevent bypass of SmartScreen Filter warnings

• Regulate ActiveX control install & availability

IE8 includes over 1400 group policy controls.

Page 45: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

What if we can’t get rid of the user?

Page 46: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;
Page 47: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;
Page 48: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;
Page 49: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

A more

effective

warning?

Page 50: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

SmartScreen Download Block

Page 51: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

SmartScreen Block Page

Page 52: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Domain Highlighting

Page 53: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

HTTPS - Extended Validation• Supported by all modern browsers.

• Over 10,000 sites with extended validation certificates.

Page 54: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

International Domain Names

Protects against homograph style phishing attacks

Unicode display restricted to user’s configured languages

Social Engineering

Page 55: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

HTTPS Mistakes

Page 56: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Insecure Login Form

Page 57: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Certificate Mismatch

Page 58: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Mixed Content - Prompt

Page 59: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Mixed Content Blocked

Page 60: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Mixed Content shown – No lock

Page 61: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Mitigating XSS

Page 62: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

XSS Statistics

XSS70%

Info Leakage4%

Content Spoofing

6%

SQL Leakage5%

Predictable Resource

Location 5%

HTTP Response Splitting

5%Other 6%

Source: WhiteHat Security, August 2008

Page 63: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

XSS ThreatsResearcher Bryan Sullivan: “XSS is the new buffer overflow.”

Page 64: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

IE8 XSS Filter

Page 65: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Comprehensive XSS Protection

Page 66: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Securing Mashups

Page 67: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

How are mashups built today?

• Cross-domain script inclusion

• IFRAMEs

Page 68: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

XDomainRequest

• Enables web developers to more securely communicate between domains

• Provides a mechanism to establish trust between domains through an explicit acknowledgement of cross domain access

• Access-Control-Allow-Origin syntax standardized

Page 69: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

HTML5 postMessage()

• Enables two domains to establish a trust relationship to exchange object messages

• Provides a web developer a more secure mechanism to build cross-domain communication

• Part of the HTML5 specification; supported by all latest-version browsers.

Page 70: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

postMessage – Sending

// Find target frame

var oFrame =

document.getElementsByTagName('iframe')[0];

// postMessage will only deliver the 'Hello’

// message if the frame is currently

// at the expected target site

oFrame.contentWindow.postMessage('Hello',

'http://recipient.example.com');

Page 71: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

postMessage – Listening

// Listen for the event. For non-IE, use

// addEventListener instead.

document.attachEvent('onmessage',

function(e){

if (e.domain == 'expected.com') {

// e.data contains the string

// We can use it here. But how?

}

});

Page 72: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

JavaScript Object Notation

{"Weather":

{

"City": "Seattle",

"Zip": 98052,

"Forecast": {

"Today": "Sunny",

"Tonight": "Dark",

"Tomorrow": "Sunny"

}

}}

Page 73: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Native JSON Support

• JSON.stringify()

• JSON.parse()

Based on ECMAScript 3.1; natively supported by modern browsers.

Page 74: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

window.toStaticHTML()

Client-side string sanitization, based on the Microsoft Anti-XSS Library.

window.toStaticHTML("This is some <b>HTML</b> with embedded script following... <script> alert('bang!'); </script>!“);

returns:

This is some <b>HTML</b> with embedded script following... !

Page 75: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Putting it all together…

if (window.XDomainRequest){

var xdr = new XDomainRequest();

xdr.onload = function(){

var objWeather = JSON.parse(xdr.responseText);

var oSpan = window.document.getElementById("spnWeather");

oSpan.innerHTML = window.toStaticHTML(

"Tonight it will be <b>" +

objWeather.Weather.Forecast.Tonight +

"</b> in <u>" + objWeather.Weather.City + "</u>."

);

};

xdr.open("POST", "http://evil.example.com/getweather.aspx");

xdr.send("98052");

}

Page 76: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

MIME-SniffingNo upsniff from image/*

X-Content-Type-Options: nosniff

Option to force file save:Content-Disposition: attachment;filename=“file.htm”; X-Download-Options: NoOpen

Page 77: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Best Practices

• Filter content using the Microsoft Anti-Cross Site Scripting Library.

• Use JSON, toStaticHTML for local content sanitization

• Specify encoding using in the Content-Type header:Content-Type: text/html; charset=UTF-8

• Use XDomainRequest and postMessage() rather than using <SCRIPT SRC=>

• Use HTTPOnly cookiesSet-Cookie: secret=value; httponly

Page 78: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Design Flaws in the Web Platform

Page 79: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Privacy

Page 80: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

File Upload Control

Text input control now read-only

Server no longer gets full filename:

Content-Disposition: form-data; name="file1"; filename="File.zip“

Local JavaScript sees a fixed path for

compatibility:

file1.value == “C:\fakepath\File.zip”

Page 81: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Enhanced Cleanup

Page 82: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

InPrivate™ Browsing

Shared PC privacy

Browsing leaves no tracks locally (cookies, DOMStorage, cache, history, etc)

InPrivate™ Filtering

Awareness and control of web profile aggregation

Assess, on an ongoing basis, user exposure to third-party content.

Helps to prevent information disclosure by automatically blocking high-frequency third-party content from sites users visit.

InPrivate™

Page 83: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

InPrivate™ Browsing

Bonus: Helps mitigate CSS “Visited Links” History theft vector

Page 84: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

Background on 3rd Party Aggregation

Over time, users’ history and profiles can be surreptitiously aggregated

Any third-party content can be used like a tracking cookieThere is little end-user notification or control today

Syndicated photos, weather, stocks, news articles; local analytics, etc….

Unclear accountability with third party security & privacy policies

User Visits

Unique Sites3 4

12 5

1

6 7 81

Contoso.com Tailspin.comWoodgrovebank.comExample.com Farbrican.comSouthridge1-1.com Litware-final.comadventureworks.com

Prosware-sol.com

3rd party Syndicator

Web server

Page 85: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;
Page 86: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

[email protected]

Questions?

http://blogs.msdn.com/ie/archive/tags/Security/default.aspx

Page 87: Designing Trustworthy User-Agents for a Hostile Web · MIME-Sniffing No upsniff from image/* X-Content-Type-Options: nosniff Option to force file save: Content-Disposition: attachment;filename=“file.htm”;

XSS Filter

HTML MIME

Type?YES

Different

Referer?

Heuristic match on

GET/POST Data?

Build a signature

for each heuristic

match

HTTP Response

Signature match on

HTTP response body?

Neuter appropriate

characters for

each signature

match

Log results and

inform the user

that a XSS attack

has been blocked

YES

YES YES

YES

Provide HTTP

Response to Web

BrowserYES

NONO

NO

NO