loophole timing attacks on shared event loops in chrome
play

Loophole: Timing Attacks on Shared Event Loops in Chrome Pepe Vila - PowerPoint PPT Presentation

Loophole: Timing Attacks on Shared Event Loops in Chrome Pepe Vila and Boris Kpf vwzq.net @cgvwzq github.com/cgvwzq DISCLAIMER: CRYPTACUS DISCLAIMER: CRYPTACUS DISCLAIMER: CRYPTACUS (its funny because its very ubiquitous)


  1. Loophole: Timing Attacks on Shared Event Loops in Chrome Pepe Vila and Boris Köpf vwzq.net @cgvwzq github.com/cgvwzq

  2. DISCLAIMER: CRYPTACUS

  3. DISCLAIMER: CRYPTACUS

  4. DISCLAIMER: CRYPTACUS (it’s funny because it’s very ubiquitous…)

  5. DISCLAIMER: CRYPTACUS (it’s funny because it’s very ubiquitous…)

  6. Event-driven programming

  7. Source: http://berb.github.io/diploma-thesis/original/042_serverarch.html

  8. Shared Event Loop FIFO queue Dispatcher time

  9. Shared Event Loop FIFO queue e 0 Dispatcher time

  10. Shared Event Loop FIFO queue Dispatcher time e 0

  11. Shared Event Loop FIFO queue e 1 Dispatcher time e 0

  12. Shared Event Loop FIFO queue e 1 e 0 Dispatcher time

  13. Shared Event Loop FIFO queue e 0 Dispatcher time e 1

  14. Shared Event Loop FIFO queue e 2 e 0 Dispatcher time e 1

  15. Shared Event Loop FIFO queue e 2 e 0 e 1 Dispatcher time

  16. Shared Event Loop FIFO queue e 2 e 0 e 1 Dispatcher time

  17. Shared Event Loop FIFO queue e 0 e 1 Dispatcher time e 2

  18. Shared Event Loop FIFO queue e 0 e 1 Dispatcher time e 2

  19. Shared Event Loop FIFO queue e 3 e 0 e 1 Dispatcher time e 2

  20. Shared Event Loop FIFO queue e 3 e 0 e 1 e 2 Dispatcher time

  21. Shared Event Loop FIFO queue e 3 e 0 e 1 e 2 Dispatcher time

  22. Shared Event Loop FIFO queue e 3 e 0 e 1 e 2 Dispatcher time

  23. Shared Event Loop FIFO queue e 0 e 1 e 2 Dispatcher time e 3

  24. Shared Event Loop FIFO queue e 4 e 0 e 1 e 2 Dispatcher time e 3

  25. Shared Event Loop FIFO queue e 4 e 0 e 1 e 2 e 3 Dispatcher time

  26. Shared Event Loop FIFO queue e 0 e 1 e 2 e 3 Dispatcher time e 4

  27. Shared Event Loop FIFO queue e 0 e 1 e 2 e 3 e 4 Dispatcher time

  28. Shared Event Loop FIFO queue d 0 d 1 d 2 d 3 e 0 e 1 e 2 e 3 e 4 Dispatcher time

  29. Shared Event Loop Event-delay trace FIFO queue d 0 d 1 d 2 d 3 e 0 e 1 e 2 e 3 e 4 Dispatcher time

  30. We exploit 2 different shared Event Loops in Chrome:

  31. We exploit 2 different shared Event Loops in Chrome: I/O’s of the Host Process Main thread’s of Renderers

  32. We exploit 2 different shared Event Loops in Chrome: I/O’s of the Host Process Main thread’s of Renderers And implement 3 different attacks:

  33. We exploit 2 different shared Event Loops in Chrome: I/O’s of the Host Process Main thread’s of Renderers And implement 3 different attacks: Page Identification

  34. We exploit 2 different shared Event Loops in Chrome: I/O’s of the Host Process Main thread’s of Renderers And implement 3 different attacks: Page Identification Inter-keystroke Timing 10.00 4.00 2.00 1.00 0.40 0.20 0.10 0.06 0.04 0.02 19780.000 19785.000 19790.000 19795.000 19800.000

  35. We exploit 2 different shared Event Loops in Chrome: I/O’s of the Host Process Main thread’s of Renderers And implement 3 different attacks: Page Identification Covert Channel Inter-keystroke Timing 10.00 4.00 2.00 1.00 0.40 0.20 0.10 0.06 0.04 0.02 19780.000 19785.000 19790.000 19795.000 19800.000

  36. SYSTEM/INTERNET

  37. SYSTEM/INTERNET HOST PROCESS

  38. SYSTEM/INTERNET • NETWORK REQUESTS HOST PROCESS • IPC COMMUNICATION • DISPATCHES USER ACTIONS

  39. SYSTEM/INTERNET HOST PROCESS SHARED BETWEEN ALL RENDERERS RENDERER 1 RENDERER 2 tab1 | trusted.com tab 2 |

  40. SYSTEM/INTERNET HOST PROCESS RENDERER 1 RENDERER 2 tab1 | trusted.com tab 2 |

  41. SYSTEM/INTERNET HOST PROCESS RENDERER 1 RENDERER 2 tab1 | trusted.com tab 2 | evil.com

  42. Spying on the Host <script> 
 function loop () { save(performance.now()); fetch( new Request("http://0/")) . catch (loop); } loop(); </script> Timing resolution of ~500 μ s

  43. Spying on the Host <script> 
 function loop () { save(performance.now()); fetch( new Request("http://0/")) . catch (loop); } loop(); </script> Timing resolution of ~500 μ s With SharedWorkers we obtain <100 μ s

  44. SYSTEM/INTERNET HOST PROCESS RENDERER 1 tab1 | trusted.com

  45. SYSTEM/INTERNET HOST PROCESS RENDERER 1 tab1 | trusted.com • JAVASCRIPT EXECUTION • RESOURCE PARSING • LAYOUT & RENDERING

  46. SYSTEM/INTERNET HOST PROCESS RENDERER 1 tab1 | trusted.com SHARED BETWEEN IFRAMES, POPUPS, iframe | MAX #RENDERER EXCEEDED…

  47. SYSTEM/INTERNET HOST PROCESS RENDERER 1 tab1 | trusted.com iframe | evil.co

  48. Spying on the Renderer <script> 
 function loop() { save(performance.now()); self.postMessage(0, "*"); } self.onmessage = loop; loop(); </script> Timing resolution of <25 μ s

  49. LoopScan Tool https://github.com/cgvwzq/loopscan

  50. Web Page Identification & Inter-keystroke Timing

  51. Web Page Identification Monitor the EventLoop while page loading

  52. Dynamic Time Warping DTW is resistant to delays in the occurrence of events

  53. Dynamic Time Warping DTW is resistant to delays in the occurrence of events 2-4 seconds of measuring

  54. Dynamic Time Warping DTW is resistant to delays in the occurrence of events 2-4 seconds of One trace for measuring training

  55. Web Page Identification 500 pages x 30 traces x 3 machines x 2 event loops 75% Renderer’s main thread: (Linux desktop) 23% Host’s I/O thread: (Macbook Pro) (recognition rates below 5% across machines) R-library and datasets: 
 https://github.com/cgvwzq/rlang-loophole

  56. Inter-keystroke Timing 10.00 4.00 2.00 1.00 0.40 0.20 0.10 0.06 0.04 0.02 19780.000 19785.000 19790.000 19795.000 19800.000 19805.000 We obtain the password length and 
 time between consecutive pressed keys

  57. Inter-keystroke Timing 10.000 passwords 90% accuracy precision: σ = 6.1 ms

  58. Inter-keystroke Timing 10.000 passwords 90% accuracy precision: σ = 6.1 ms More precision than network based attacks. Less noise than in micro-architectural attacks. No privileges. No training.

  59. Countermeasures • Reduce clock resolution • Site Isolation Project • CPU throttling • Rate limiting

  60. Countermeasures • Reduce clock resolution • Site Isolation Project • CPU throttling • Rate limiting

  61. Conclusions • Shared event loops in Chrome are vulnerable to timing side-channels • We systematically study how this channel can be used for different attacks • Fundamental design issues that need to be addressed

  62. Thank you! :) Questions? 62

Recommend


More recommend