28
Browser Security Beyond Sandboxing JORDAN RABET, MICROSOFT OSR

Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

  • Upload
    lykhue

  • View
    222

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

Browser Security Beyond SandboxingJORDAN RABET, MICROSOFT OSR

Page 2: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

Who am I

Computer Science, Applied Math, AI, CV

Formerly

Presently

OSRExploit things, Mitigate things

[email protected]

@smealum

Page 3: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

What I’m going to talk about

Browser Security Beyond Sandboxing…?

Live demo halfway through!

Page 4: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

A difference in security strategy

- Justin Schuh, Chrome security lead

Page 5: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

The result: a strong sandbox…

Renderer process

#0

Renderer process

#1Renderer process

#...GPU process

PPAPI processBrowser process

Page 6: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

The result: …and a soft RCE target

Page 7: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

Finding a bug: fuzzing!Ran a JavaScript fuzzer written by the Chakra team…

…using a fuzzing harness put together by the Security Assurance team…

…on Azure!

=> got an exploitable bug after less than a day of fuzzing

Page 8: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

Figuring out the bugvar func0 = function(f)

{

var o =

{

a: {},

b:

{

ba: { baa: 1.2, bab: [] },

bb: {},

bc: { bca: { bcaa: 0, bcab: 0, bcac: this } },

}

};

o.b.bc.bca.bcab = 0;

o.b.bb.bba = Object.toString(o.b.ba.bab);

};

while(true) func0()

Page 9: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

Object.toString(o.b.ba.bab)

Object.toString(o.b.ba.bab)

while(true)

Page 10: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

var o = { a: {}, b: {...} }b: { ba: {...}, bb: {}, bc: {...} }

ba: { baa: 1.2, bab: [] }

o.b.ba.bab

Object.toString(o.b.ba.bab)

Page 11: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

o.b.ba.bab

Object.toString(o.b.ba.bab)

b: { ba: {...},

bb: {},

bc: {...}

}

Page 12: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

Bug modifier #1: attribute type

Page 13: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

Bug modifier #2: attribute offset

Page 14: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

Bug modifier #3: local variable spray

Page 15: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

Resulting bug capabilities

Type being sprayed Type being loaded Result

JavaScript object Double value Infoleak

Double value Double value Arbitrary read primitive

Double value JavaScript object Arbitrary JavaScript object manufacturing

Page 16: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

Achieving code executionWe can manufacture arbitrary JavaScript objects

Create a fake ArrayBuffer object and use that to read/write arbitrary memory

Use read/write to load a overwrite RWX code…

Page 17: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds
Page 18: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

Recap so far

Renderer process

#0

Renderer process

#1Renderer process

#...GPU process

PPAPI processBrowser process

WE ARE HERE

Page 19: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

DEMO TIME

Page 20: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

Multiple origins in the same process

Page 21: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

“Immortal” pop-undersUser interaction checks are renderer-side

window.onbeforeunload

Page 22: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

JS backdoor for advanced shenanigans

Page 23: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

UXSS

Page 24: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

AftermathBug was reported to Google

Bug was fixed by disabling old escape analysis implementation in just 4 days!

Fix made it to stable channel 3 days later

=> Impressive response time and agility from Google

Page 25: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

Servicing procedureSecurity bug fixes are published before they make it into official builds

Fixes often come with regression tests, giving a PoC

Lack of RCE mitigations makes many bugs easy to exploit

The fix didn’t ship to stable channel Chrome until 30 days later

=> Google regularly 0-days itself, which is not great

Page 26: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

Site isolation

Page 27: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

ConclusionBrowser RCE is still a serious threat

How bugs are serviced matters

Page 28: Browser Security Beyond Sandboxing - bluehatil.com Security Beyond Sandboxing.pdf · Servicing procedure Security bug fixes are published before they make it into official builds

Thank you for your time!CONTACT: [email protected]

@smealum