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 EVENT DRIVEN PROGRAMMING SO HOT RIGHT NOW EVENT DRIVEN PROGRAMMING SO HOT RIGHT NOW Source:


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

  2. EVENT DRIVEN PROGRAMMING SO HOT RIGHT NOW

  3. EVENT DRIVEN PROGRAMMING SO HOT RIGHT NOW

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

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

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

  7. 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:

  8. 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

  9. 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

  10. 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

  11. Shared Event Loop FIFO queue Dispatcher time

  12. Shared Event Loop FIFO queue e 0 Dispatcher time

  13. Shared Event Loop FIFO queue Dispatcher time e 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  31. 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

  32. 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

  33. SYSTEM/INTERNET

  34. SYSTEM/INTERNET HOST PROCESS

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

  36. SYSTEM/INTERNET • NETWORK REQUESTS HOST PROCESS • IPC COMMUNICATION • DISPATCHES USER ACTIONS SHARED BETWEEN ALL RENDERERS

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

  38. SYSTEM/INTERNET HOST PROCESS SANDBOXED 
 PROCESSES RENDERER 1 RENDERER N tab1 | trusted.com tab 2 |

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

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

  41. 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 some smarter techniques we obtain <100 μ s 
 (see the paper)

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

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

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

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

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

  47. 
 
 Duration of Events μ -arch Mouse GC JS event events ? loop() movement scavenge handlers <5 μ s … 25 μ s 100 μ s <1 ms >2 ms

  48. 
 
 Duration of Events μ -arch Mouse GC JS event events ? loop() movement scavenge handlers <5 μ s … 25 μ s 100 μ s <1 ms >2 ms Good vs. badly coded web pages

  49. Web Page Identification & Inter-keystroke Timing

  50. Web Page Identification Monitor the EventLoop while page loading

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

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

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

  54. 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

  55. 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

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

  57. 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.

  58. Countermeasures • Reduce clock resolution • Site Isolation Project • CPU Throttling

  59. Countermeasures • Reduce clock resolution • Site Isolation Project • CPU Throttling

  60. 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

  61. Thank you! :) Questions? 62

  62. You can visualise the congestion of event loops with our LoopScan tool https://github.com/cgvwzq/loopscan

Recommend


More recommend