Web Platform Security
PhD Summit: Munich, June 2018
Threats. Mitigations. More.
[email protected], @mikewest
Slide 2
Slide 2 text
Fundamentals
Slide 3
Slide 3 text
https://[host]:[port]
An Origin.
https://example.com https://news.example https://ads.example https://shop.example
Slide 4
Slide 4 text
A Site is a set of origins that
share a registrable domain.
https://example.com https://mikewest.github.io
https://www.example.com
https://sub.example.com
https://sub.sub.example.com https://w3c.github.io
Slide 5
Slide 5 text
Same Origin Policy
https://news.example
https://ads.example
https://shop.example
(More details from
Sebastian Lekies this
afternoon at 16:30)
Slide 9
Slide 9 text
XSSI
// https://victim.example/script
var isLoggedIn = true;
if (isLoggedIn) {
// ...
}
(function () {
var sekritData = 12345;
globallyAccessibleFunction(sekritData);
})();
// Or, JSONP
callback({"sekritData": 12345});
Slide 10
Slide 10 text
XSSI
Status-Quo
Mitigations
Serve static JavaScript.
Make dynamic secrets difficult to execute, by:
1.
Prefixing responses with )]}'\n.
2.
Serving non-script responses (like HTML
documents) with a non-script MIME type and
X-Content-Type-Options: nosniff.
Framing
Both
and
window.open()
variants
allows DOM access
Slide 16
Slide 16 text
Loading
Side-Effects
Explicit Risks
Slide 17
Slide 17 text
Loading
Side-Effects
Implicit Risks
Slide 18
Slide 18 text
Render
Timing
Slide 19
Slide 19 text
Turns out...
(More details from clever
V8 folks, tomorrow
morning at 10:40)
Slide 20
Slide 20 text
https://goo.gl/p5UrKw
Slide 21
Slide 21 text
So, what's the plan?
https://www.arturjanc.com/cross-origin-infoleaks.pdf
Slide 22
Slide 22 text
Site Isolation
(More details in the
aforementioned talk
tomorrow
morning at 10:40, and in
Parisa's closing keynote
at 10:50 Wednesday) https://goo.gl/1p44Yt
Slide 23
Slide 23 text
Why "Site"?
https://goo.gl/NRCngd
Slide 24
Slide 24 text
That's... going to take a
while. What should we be
doing today?
https://www.arturjanc.com/cross-origin-infoleaks.pdf
Slide 25
Slide 25 text
SameSite
Cookies
Mike West (Google)
Mark Goodwin (Mozilla)
https://goo.gl/tseFAa
Slide 26
Slide 26 text
SameSite
Cookies
https://goo.gl/tseFAa
HTTP/1.1 200 OK
Date: Fri, 26 May 2018 10:02:11 GMT
Content-Length: 1234
Content-Type: text/html; charset=utf-8
Set-Cookie: sekrit=12345; SameSite=Strict
Slide 27
Slide 27 text
Cross-Origin
Read Blocking
Ćukasz Anforowicz (Google)
Charlie Reis (Google)
https://goo.gl/Pth6Kz
Slide 28
Slide 28 text
Cross-Origin
Resource
Policy
John Wilander (Apple)
Anne van Kesteren (Mozilla)
https://goo.gl/vBwgoh