Beruflich Dokumente
Kultur Dokumente
at
� / ��
www.iaik.tugraz.at
Outline
� / ��
www.iaik.tugraz.at
CPU cache
� / ��
www.iaik.tugraz.at
CPU cache
� / ��
www.iaik.tugraz.at
CPU cache
� / ��
www.iaik.tugraz.at
CPU cache
� / ��
www.iaik.tugraz.at
L� L� L� L�
ring
L� L� L� L� bus
� / ��
www.iaik.tugraz.at
� / ��
www.iaik.tugraz.at
� / ��
www.iaik.tugraz.at
� / ��
www.iaik.tugraz.at
� / ��
www.iaik.tugraz.at
� / ��
www.iaik.tugraz.at
Set-associative caches
� �� �� �� �� ��
Cache
� / ��
www.iaik.tugraz.at
Set-associative caches
� �� �� �� �� ��
Cache set
Cache
� / ��
www.iaik.tugraz.at
Set-associative caches
� �� �� �� �� ��
way � way �
Cache set
Cache
� / ��
www.iaik.tugraz.at
Set-associative caches
� �� �� �� �� ��
way � way �
Cache set
Cache line
Cache
� / ��
www.iaik.tugraz.at
Timing differences
���
���
���
�� ��� ��� ��� ��� ��� ��� ���
Access time [CPU cycles]
� / ��
www.iaik.tugraz.at
� / ��
www.iaik.tugraz.at
� / ��
www.iaik.tugraz.at
� / ��
www.iaik.tugraz.at
� / ��
www.iaik.tugraz.at
Prime�Probe
attacker knows which cache set the victim accessed, not the content
� / ��
www.iaik.tugraz.at
Prime�Probe
attacker knows which cache set the victim accessed, not the content
� / ��
www.iaik.tugraz.at
Prime�Probe
attacker knows which cache set the victim accessed, not the content
� / ��
www.iaik.tugraz.at
Prime�Probe
attacker knows which cache set the victim accessed, not the content
� / ��
www.iaik.tugraz.at
Prime�Probe
� / ��
www.iaik.tugraz.at
Prime�Probe
Step �: Attacker primes, i.e., �lls, the cache (no shared memory)
� / ��
www.iaik.tugraz.at
Prime�Probe
loads data
Step �: Attacker primes, i.e., �lls, the cache (no shared memory)
� / ��
www.iaik.tugraz.at
Prime�Probe
loads data
Step �: Attacker primes, i.e., �lls, the cache (no shared memory)
� / ��
www.iaik.tugraz.at
Prime�Probe
cess
fast ac
Step �: Attacker primes, i.e., �lls, the cache (no shared memory)
� / ��
www.iaik.tugraz.at
Prime�Probe
cess
slow ac
Step �: Attacker primes, i.e., �lls, the cache (no shared memory)
� / ��
www.iaik.tugraz.at
Sender � � � � � �
Receiver � � � � � �
�� / ��
www.iaik.tugraz.at
Sender � � � � � � Sender � � � � � �
Receiver � � � � � � Receiver � � � � � �
�� / ��
www.iaik.tugraz.at
Sender � � � � � � Sender � � � � � �
Receiver � � � � � � Receiver � � � � � �
Sender � � � � � �
Receiver � � � � � � � � �
�� / ��
www.iaik.tugraz.at
Sender � � � � � � Sender � � � � � �
Receiver � � � � � � Receiver � � � � � �
Sender � � � � � � Sender � � � � � �
Receiver � � � � � � � � � Receiver � � �
�� / ��
www.iaik.tugraz.at
physical layer:
data-link layer:
�� / ��
www.iaik.tugraz.at
�� / ��
www.iaik.tugraz.at
�� / ��
www.iaik.tugraz.at
�� / ��
www.iaik.tugraz.at
�� / ��
www.iaik.tugraz.at
need a set of addresses in the same cache set and same slice
�� / ��
www.iaik.tugraz.at
need a set of addresses in the same cache set and same slice
problem: slice number depends on all bits of the physical address
�� / ��
www.iaik.tugraz.at
need a set of addresses in the same cache set and same slice
problem: slice number depends on all bits of the physical address
we can build a set of addresses in the same cache set and same slice
�� / ��
www.iaik.tugraz.at
need a set of addresses in the same cache set and same slice
problem: slice number depends on all bits of the physical address
we can build a set of addresses in the same cache set and same slice
without knowing which slice
�� / ��
www.iaik.tugraz.at
Jamming agreement
sender receiver
eviction sets eviction sets
��
�� Cache Sets
��
��
�� / ��
www.iaik.tugraz.at
Jamming agreement
sender receiver
eviction sets eviction sets
��
�� pri
me Cache Sets
��
�� S S S S S S S S
�� / ��
www.iaik.tugraz.at
Jamming agreement
sender receiver
eviction sets eviction sets
��
�� Cache Sets
e
prim
��
�� S S S S S S S S
R R R R R R R R
�� / ��
www.iaik.tugraz.at
Jamming agreement
sender receiver
eviction sets eviction sets
��
�� pro
be Cache Sets
��
�� S S S S S S S S
R R R R R R R R
�� / ��
www.iaik.tugraz.at
Jamming agreement
sender receiver
eviction sets eviction sets
��
�� Cache Sets
e
prob
��
�� S S S S S S S S
R R R R R R R R
�� / ��
www.iaik.tugraz.at
Jamming agreement
sender receiver
eviction sets eviction sets
��
�� pri
me Cache Sets
��
�� S S S S S S S S
�� / ��
www.iaik.tugraz.at
Jamming agreement
sender receiver
eviction sets eviction sets
��
�� Cache Sets
��
e
prim
�� S S S S S S S S
R R R R R R R R
�� / ��
www.iaik.tugraz.at
Jamming agreement
sender receiver
eviction sets eviction sets
��
�� pro
be Cache Sets
��
�� S S S S S S S S
R R R R R R R R
�� / ��
www.iaik.tugraz.at
Jamming agreement
sender receiver
eviction sets eviction sets
��
�� Cache Sets
��
e
prob
�� S S S S S S S S
R R R R R R R R
�� / ��
www.iaik.tugraz.at
Jamming agreement
sender receiver
eviction sets eviction sets
��
�� pri
me Cache Sets
��
�� S S S S S S S S
�� / ��
www.iaik.tugraz.at
Jamming agreement
sender receiver
eviction sets eviction sets
��
�� Cache Sets
prime
�� R R R R R R R R
�� S S S S S S S S
�� / ��
www.iaik.tugraz.at
Jamming agreement
sender receiver
eviction sets eviction sets
��
�� pro
be Cache Sets
�� R R R R R R R R
�� S S S S S S S S
�� / ��
www.iaik.tugraz.at
Jamming agreement
sender receiver
eviction sets eviction sets
��
�� Cache Sets
probe
�� R R R R R R R R
�� S S S S S S S S
�� / ��
www.iaik.tugraz.at
Jamming agreement
sender receiver
eviction sets eviction sets
��
�� pri
me Cache Sets
��
�� S S S S S S S S
�� / ��
www.iaik.tugraz.at
Jamming agreement
sender receiver
eviction sets eviction sets
��
�� Cache Sets
��
prime
�� R R R R R R R R
�� / ��
www.iaik.tugraz.at
Jamming agreement
sender receiver
eviction sets eviction sets
��
�� pro
be Cache Sets
��
�� S S S S S S S S
�� / ��
www.iaik.tugraz.at
Jamming agreement
sender receiver
eviction sets eviction sets
��
�� Cache Sets
��
probe
�� R R R R R R R R ��
�� / ��
www.iaik.tugraz.at
Jamming agreement
sender receiver
eviction sets eviction sets
�� 3
�� Cache Sets
��
�� ��
�� / ��
www.iaik.tugraz.at
Jamming agreement
sender receiver
eviction sets eviction sets
�� 3
�� Cache Sets
��
�� ��
�� / ��
www.iaik.tugraz.at
Jamming agreement
sender receiver
eviction sets eviction sets
�� 3
�� repeat!
��
�� ��
�� / ��
www.iaik.tugraz.at
Jamming agreement
sender receiver
eviction sets eviction sets
�� 3
�� 3 repeat!
�� ��
�� ��
�� / ��
www.iaik.tugraz.at
Jamming agreement
sender receiver
eviction sets eviction sets
�� 3
�� 3 repeat! ��
�� 3 ��
�� ��
�� / ��
www.iaik.tugraz.at
Jamming agreement
sender receiver
eviction sets eviction sets
�� 3 ��
�� 3 repeat! ��
�� 3 ��
�� 3 ��
�� / ��
www.iaik.tugraz.at
�� / ��
www.iaik.tugraz.at
�� / ��
www.iaik.tugraz.at
�� / ��
www.iaik.tugraz.at
�� / ��
www.iaik.tugraz.at
Synchronization (before)
�� / ��
www.iaik.tugraz.at
Synchronization (after)
�� / ��
www.iaik.tugraz.at
Synchronization (after)
�� / ��
www.iaik.tugraz.at
Synchronization (after)
�� / ��
www.iaik.tugraz.at
�� / ��
www.iaik.tugraz.at
�� / ��
www.iaik.tugraz.at
�� / ��
www.iaik.tugraz.at
Evaluation
�� / ��
www.iaik.tugraz.at
Evaluation
�� / ��
www.iaik.tugraz.at
Evaluation
�� / ��
www.iaik.tugraz.at
Evaluation
�� / ��
www.iaik.tugraz.at
VM � VM �
TCP Client TCP Server
(e.g. ssh) (e.g. sshd)
Socket Socket
TCP$File TCP$File
File System File System
Covert Channel Covert Channel
Hypervisor
Prime�Probe Prime�Probe
Last Level Cache (LLC)
�� / ��
www.iaik.tugraz.at
SSH evaluation
Between two instances on Amazon EC�
Noise Connection
No noise 3
stress -m 8 on third VM 3
Web server on third VM 3
Web server on SSH server VM 3
Web server on all VMs 3
stress -m 1 on server side unstable
�� / ��
www.iaik.tugraz.at
SSH evaluation
Between two instances on Amazon EC�
Noise Connection
No noise 3
stress -m 8 on third VM 3
Web server on third VM 3
Web server on SSH server VM 3
Web server on all VMs 3
stress -m 1 on server side unstable
Conclusion
�� / ��
www.iaik.tugraz.at
Conclusion
�� / ��
www.iaik.tugraz.at
Conclusion
�� / ��
www.iaik.tugraz.at
Conclusion
�� / ��
www.iaik.tugraz.at
Conclusion
�� / ��
www.iaik.tugraz.at
Conclusion
�� / ��
www.iaik.tugraz.at
�� / ��