Cross-Origin State Inference (COSI) Attacks: Your Browser is Leaking Your Secrets
Avinash Sudhodanan Soheil Khodayari Juan Caballero
24/02/2020, NDSS 2020
Cross-Origin State Inference (COSI) Attacks: Your Browser is Leaking - - PowerPoint PPT Presentation
Cross-Origin State Inference (COSI) Attacks: Your Browser is Leaking Your Secrets Avinash Sudhodanan Soheil Khodayari Juan Caballero 24/02/2020, NDSS 2020 COSI Attack A malicious web site infers the state of a user (the victim) at another web
24/02/2020, NDSS 2020
2
Alice (victim)
3
Alice (victim) Web Browser
4
Alice (victim) Web Browser foo.hotcrp.com
5
Alice (victim) Web Browser foo.hotcrp.com Paper #997 Paper #278
6
Alice (victim) Web Browser Malice (Attacker) foo.hotcrp.com Paper #997 Paper #278
7
Alice (victim) Web Browser Malice (Attacker) foo.hotcrp.com Paper #997 Paper #278
8
Alice (victim) Web Browser Malice (Attacker) foo.hotcrp.com Paper #997 Paper #278 Hi Alice, Click here to finalize your reviews for FOO con
9
Alice (victim) Web Browser Malice (Attacker) foo.hotcrp.com Paper #997 Paper #278 Hi Alice, Click here to finalize your reviews for FOO con mal-site.com
10
Alice (victim) Web Browser Malice (Attacker) foo.hotcrp.com Paper #997 Paper #278 Hi Alice, Click here to finalize your reviews for FOO con mal-site.com
infer state
11
Alice (victim) Web Browser Malice (Attacker) foo.hotcrp.com Paper #997 Paper #278 Hi Alice, Click here to finalize your reviews for FOO con mal-site.com
infer state
What does it mean by inferring state at foo.hotcrp.com
12
Login
Alice (victim)
Logged In Logged Out Account Type Reviewer Author Content Ownership Owns a review of paper #278 Does not own a review of paper #278 Account Ownership Owns the account user217 Does not own the account user217 Admin
foo.hotcrp.com mal-site.com infer state Web Browser
Login Detection, Login Oracle Deanonymization COSI Attack:
13
SD-URL: https://foo.hotcrp.com/api.php/review?p=278
14
State Response SD-URL: https://foo.hotcrp.com/api.php/review?p=278
State Response
15
Logged In Reviewer Reviews paper #278 SD-URL: https://foo.hotcrp.com/api.php/review?p=278
State Response code = 200
16
Logged In Reviewer Reviews paper #278 SD-URL: https://foo.hotcrp.com/api.php/review?p=278
State Response code = 200 code = 403
17
Logged In Reviewer Reviews paper #278 SD-URL: https://foo.hotcrp.com/api.php/review?p=278 Logged In Reviewer Not review paper #278
18
State Response code = 200 code = 403 SD-URL: https://foo.hotcrp.com/api.php/review?p=278
Alice (victim) foo.hotcrp.com mal-site.com infer state Web Browser foo.hotcrp.com State-dependent response foo.hotcrp.com/api.php/review?p=278
Logged In Reviewer Reviews paper #278 Logged In Reviewer Not review paper #278 SOP
19
Leak Type References
Events-Fired [Grossman2006Blog, Goethem2015CCS, Cardwell2011Blog, ..] Object-Properties [Grossman2012Blog, Schwenk2017USENIX, Masas2018Blog..] JS-Error [Grossman2006Blog, Shiflett2006Blog] CSS-Properties [Evans2008Blog] CSP-Violation [Homakov2013Blog, Gulyas2018WPES] Timing [Bortz2007WWW, Evans2009Blog, Goethem2015CCS, ..] AppCache [Lee2015NDSS]
20
State Response code = 200 code = 403 SD-URL: https://foo.hotcrp.com/api.php/review?p=278
Alice (victim) foo.hotcrp.com mal-site.com infer state Web Browser foo.hotcrp.com code = 200 foo.hotcrp.com/api.php/review?p=278
Logged In Reviewer Reviews paper #278 Logged In Reviewer Not review paper #278
<embed src=SD-URL
>
21
State Response code = 200 code = 403 SD-URL: https://foo.hotcrp.com/api.php/review?p=278
Alice (victim) foo.hotcrp.com mal-site.com infer state Web Browser foo.hotcrp.com code = 403 foo.hotcrp.com/api.php/review?p=278
Logged In Reviewer Reviews paper #278 Logged In Reviewer Not review paper #278
<embed src=SD-URL
>
22
State Response code = 200 code = 403 SD-URL: https://foo.hotcrp.com/api.php/review?p=278 Logged In Reviewer Reviews paper #278 Logged In Reviewer Not review paper #278
23
State Response code = 200 code = 403 code = 200 SD-URL: https://foo.hotcrp.com/api.php/review?p=278 Logged In Reviewer Reviews paper #278 Logged In Reviewer Not review paper #278 Logged Out
24
State Response code = 200 code = 403 code = 200 SD-URL: https://foo.hotcrp.com/api.php/review?p=278
Alice (victim) foo.hotcrp.com mal-site.com infer state Web Browser foo.hotcrp.com Response foo.hotcrp.com/api.php/review?p=278
Logged In Reviewer Reviews paper #278 Logged In Reviewer Not review paper #278
<embed src=SD-URL
>
Logged Out
25
Alice (victim) foo.hotcrp.com mal-site.com infer state foo.hotcrp.com 200 foo.hotcrp.com/api.php/review?p=278 <embed src=SD-URL
>
Alice (victim) foo.hotcrp.com mal-site.com infer state foo.hotcrp.com 200 foo.hotcrp.com/api.php/review?p=278 <link href=SD-URL
rel = stylesheet>
26
27
Name :
28
Name SD-URL Responses Response A Response B :
29
Name SD-URL Responses XS-Leak Response A Response B Inclusion Manifest. :
30
Name SD-URL Responses XS-Leak Browser Support Response A Response B Inclusion Manifest. Chrome Firefox Edge :
31
Name SD-URL Responses XS-Leak Browser Support Response A Response B Inclusion Manifest. Chrome Firefox Edge EF- StatusErro rScript code = 200 content-type = text/javascript code = 4xx || 5xx <script>
✓ ✓ ✓ :
32
Name SD-URL Responses XS-Leak Browser Support Response A Response B Inclusion Manifest. Chrome Firefox Edge EF- StatusErro rScript code = 200 content-type = text/javascript code = 4xx || 5xx <script>
✓ ✓ ✓ :
33
Name SD-URL Responses XS-Leak Browser Support Response A Response B Inclusion Manifest. Chrome Firefox Edge EF- StatusErro rScript code = 200 content-type = text/javascript code = 4xx || 5xx <script>
✓ ✓ ✓
34
Alice (victim) foo.hotcrp.com mal-site.com infer state
State Response A Broadcasts message “x” B Broadcasts message “y”
window.open(SDURL)
35
Alice (victim) foo.hotcrp.com mal-site.com infer state
window.open(SDURL)
mal-site.com
postmessage(“x”, *)
State Response A Broadcasts message “x” B Broadcasts message “y”
36
Alice (victim) foo.hotcrp.com mal-site.com infer state
State Response A Broadcasts message “x” B Broadcasts message “y”
window.open(SDURL)
mal-site.com
postmessage(“x”, *) if rcvMsg === “x”{ state = “A” }
state = A
37
Attack References
Events-Fired [Grossman2006Blog, Goethem2015CCS, Cardwell2011Blog, ..] Object-Properties [Grossman2012Blog, Schwenk2017USENIX, Masas2018Blog..] JS-Error [Grossman2006Blog, Shiflett2006Blog] CSS-Properties [Evans2008Blog] CSP-Violation [Homakov2013Blog, Gulyas2018WPES] Timing [Bortz2007WWW, Evans2009Blog, Goethem2015CCS, ..] AppCache [Lee2015NDSS]
: :
detection, login oracle, URL status identification, etc.
○ need to handle multiple states ○ support for multiple browsers ○ automatic detection of COSI attacks and automatic creation
38
39
40
41
Selenium scripts to load states in browsers
42
Web app crawler to identify SD-URLs
43
Identifies attack vectors for the SD-URLs
44
Combine attack vectors and generate pages
45
46
47
Web Site Vendor Top Vulnerabilities Deanonymize reviewer
48
Web Site Vendor Top Vulnerabilities Deanonymize reviewer Deanonymize blog/file owner Deanonymize channel owner
49
Web Site Vendor Top Vulnerabilities Deanonymize reviewer Deanonymize blog/file owner Deanonymize channel owner Deanonymize user
50
Web Site Vendor Top Vulnerabilities Deanonymize reviewer Deanonymize blog/file owner Deanonymize channel owner Deanonymize user Deanonymize users and role Ethics: All tests were performed
○ does not prevent window based attacks (postMessage, frame count) ○ reported and Tor is planning to fix this
51
52
53
54
Alice (victim) Web Browser Malice (Attacker) foo.hotcrp.com Paper #997 Paper #278 Hi Alice, Click here to finalize your reviews for FOO con mal-site.com