Fantastic Timers and Where to Find Them: High-Resolution Microarchitectural Attacks in JavaScript
Team - sleep(10);
Ajay Jain
203050036
Outline
Introduction
Is your browser safe?
Hi Chrome, I can read your secrets
Are you kidding me, Lol
You have no clue? I can use performance.now() to perform Row-hammer and Covert channel attacks.
It’s a quick fix
We will decrease performance.now() resolution of from ns to ms.
You think you are safe now. I can still access in ns using implicit timers. 😂
Resolution in microseconds
High Resolution Timers in Javascript
Clock Interpolation
Clock interpolation
Function
T2
T3
T4
T5
T6
T7
T1
X units
Y units
Y-7x units
Calibrating time taken by one count operation
It will help to align to the start edge of the clock
It increments the count until next clock cycle
Edge thresholding
What’s Intuition?
F1
F2
Relative time
Attacker just need to find whether F1 is slower than f2
Function F1
Function F2
Edge Thresholding
Padding is multiple constant time operations
Message Passing
Main Thread
subworker
subworker2
Request time
Counter 0 1 2 3 4 5 6 7 8 9 10 11 12
Request time
Request time
Request time
0
3
6
9
SharedArrayBuffer
Thread
SharedArrayBuffer
Counting Thread
CSS Animation
Evaluation and Results
DRAM Attack and Counter-Measures
Covert Channel
DRAM Organisation
Channel 1
Channel 2
back of DIMM: Rank 1
Front of DIMM :
Rank 0
Chip
DRAM Organisation
Bank 0
Row 0 |
Row 1 |
Row 2 |
… |
Row 32767 |
|
Row buffer |
Chip
64k cells
1 capacitor,
1 transistor each
Reading from DRAM
Reading from DRAM
Reading from DRAM
Reading from DRAM
Reading from DRAM
DRAM covert channel
Bank 0
Row 0 |
Row 1 |
Row 2 |
Row 3 |
… |
Row 32767 |
|
Row buffer |
Sender and
receiver decide
on one bank
Bank 0
Row 0 |
Row 1 |
Row 2 |
Row 3 |
… |
Row 32767 |
|
Row buffer |
Receiver measures access time to
its address
Activate
Copy
Bank 0
Row 0 |
Row 1 |
Row 2 |
Row 3 |
… |
Row 32767 |
|
Row buffer |
Return
Bank 0
Row 0 |
Row 1 |
Row 2 |
Row 3 |
… |
Row 32767 |
|
Row buffer |
Return
Repeated access
always has low
access times
Bank 0
Row 0 |
Row 1 |
Row 2 |
Row 3 |
… |
Row 32767 |
|
Row buffer |
Return
Bank 0
Row 0 |
Row 1 |
Row 2 |
Row 3 |
… |
Row 32767 |
|
Row buffer |
Sender accesses
its address
Activate
Copy
Bank 0
Row 0 |
Row 1 |
Row 2 |
Row 3 |
… |
Row 32767 |
|
Row buffer |
Return
Bank 0
Row 0 |
Row 1 |
Row 2 |
Row 3 |
… |
Row 32767 |
|
Row buffer |
On next access
of receiver, there
is a row miss
Activate
Copy
Bank 0
Row 0 |
Row 1 |
Row 2 |
Row 3 |
… |
Row 32767 |
|
Row buffer |
Return
Receiver has
high access time
Countermeasures
Conclusion
THANK YOU
Any Questions?