Top Banner
Emission Security and Side-channel Attacks By Andrey Leshenko Comp Sec Seminar 2017 (With Orr Dunkelman) 5/11/2017
41

Emission Security and Side-channel Attacks

Dec 18, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Emission Security and Side-channel Attacks

Emission Security

and Side-channel Attacks

By Andrey Leshenko

Comp Sec Seminar 2017(With Orr Dunkelman)

5/11/2017

Page 2: Emission Security and Side-channel Attacks

PULSE

SWEATING

BREATHING

BLOOD PRESSURE

“…I was at home, sleeping…”

TEXT

Page 3: Emission Security and Side-channel Attacks

The Polygraph

https://i0.wp.com/www.panelsonpages.com/wp-content/uploads/2013/12/polygraphmachine.jpg

Page 4: Emission Security and Side-channel Attacks

A Side-channel Attack

• Any attack based on information gained from the physical implementation of a cryptosystem.

http://evrikak.ru/wp-content/uploads/2015/07/sheriff_okno1.jpg

Page 5: Emission Security and Side-channel Attacks

“PASSWORD INCORRECT”

INPUT/OUTPUT

???????

??????

???????

??????

???????

??????

???????

??????

???????

??????

Page 6: Emission Security and Side-channel Attacks

TIME CHANNEL

Page 7: Emission Security and Side-channel Attacks

Comparing Secret Keys

char *key = “SECRET”;

char *input = get_input();

memcmp(key, input, KEY_LEN)

Page 8: Emission Security and Side-channel Attacks

Likely Implementation (Simplified)

int memcmp(char *a, char *b, int len)

{

for (int i = 0; i < len; i++) {

if (a[i] != b[i])

return 1;

}

return 0;

}

Page 9: Emission Security and Side-channel Attacks

Guessing the First Byte

0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

Time

Page 10: Emission Security and Side-channel Attacks

Guessing the Second Byte

0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

Time

Page 11: Emission Security and Side-channel Attacks

Timing Attacks

1. Timing depends on secret data

2. Attacker measures timing

3. Attacker recovers secret data

Page 12: Emission Security and Side-channel Attacks

OpenSSL Implementation (Simplified)

int CRYPTO_memcmp(char *a, char *b, int len)

{

char bit_diff = 0;

for (int i = 0; i < len; i++) {

bit_diff |= a[i] ^ b[i];

}

return bit_diff;

}

Page 13: Emission Security and Side-channel Attacks

Examples

• 2006: Recover AES-256 secret key of Linux’s dmcrypt in just 65 ms (Osvik, Shamir, Tromer)

• 2013: “Lucky13” recovers plaintext of CBC-mode encryption in most TLS implementations (AlFardan, Paterson)

• 2014: Attack against RSA-2048 in GnuPG 1.4.13: “On average, the attack is able to recover 96.7% of the bits of the secret key by observing a single signature or decryption round.” (Yarom, Falkner)

Page 14: Emission Security and Side-channel Attacks

Further Complications

• Compiler optimizations

• Time dependence of multiplication

• Code branching

• Cache misses and page faults

Page 15: Emission Security and Side-channel Attacks

ELECTRO MAGNETIC EMISSIONSCHANNEL

Page 16: Emission Security and Side-channel Attacks

Magnetic field from electric current

Page 17: Emission Security and Side-channel Attacks

A Small Demo

Page 18: Emission Security and Side-channel Attacks

World War I

Page 19: Emission Security and Side-channel Attacks

Van Eck Phreaking

• 1985: Win van Eck showed the picture on a computer monitor could be reconstructed from EM emissions

https://i.stack.imgur.com/7Bxqb.png

Page 20: Emission Security and Side-channel Attacks

Software Protection

• Most of the emissions are from the high frequencies

• Ross Anderson, Markus Kuhn, filter them using software methods

Ross Anderson, Security Engineering

Page 21: Emission Security and Side-channel Attacks

Voting Machines

http://www.kansas.com/news/politics-government/z0y19f/picture27951307/alternates/LANDSCAPE_1140/voting%20machine%20filer

Page 22: Emission Security and Side-channel Attacks

TEMPEST

• Codename for EM emission based attack and defense

• Protection standards exist:

– Shielding

– RED/BLACK separation

– Distance of equipment from walls and pipes

• Hardware complying with these standards exists, but it very expensive

Page 23: Emission Security and Side-channel Attacks

POWER CONSUMPTION CHANNEL

Page 24: Emission Security and Side-channel Attacks

Smartcards

• A small chip

• Power is externally supplied

• Often contains secret keys

Page 25: Emission Security and Side-channel Attacks

Power Analysis

Power usage of RSA algorithm

htt

ps:

//en

.wik

iped

ia.o

rg/w

iki/

Fil

e:P

ow

er_a

ttac

k_f

ull

.pn

gh

ttp

://m

.eet

.co

m/m

edia

/11

80

27

1/f

2xl

.jpg

Page 26: Emission Security and Side-channel Attacks

Differential Power Analysis

• (Paul Kocher, 1998)

• If an attacker collects many samples of encryptions using a knows plaintext,

• He can use statistical methods to test hypotheses about the key,

• Resulting in a very robust attack

Page 27: Emission Security and Side-channel Attacks

Solutions

• Adding randomness to the protocols

• Adding randomness to the computations

• Processors that add dummy operations and change clock speed every few cycles

Page 28: Emission Security and Side-channel Attacks

AUDIO CHANNEL

Page 29: Emission Security and Side-channel Attacks

Keyboard Noises

• Typed text can be reconstructed from an audio recording (2004, Asonov and Agrawal. 2005, Zhuang, Zhou, and Tygar)

Page 30: Emission Security and Side-channel Attacks

Acoustic Crypto-analysis

• Electric current causes vibrations

Page 31: Emission Security and Side-channel Attacks

• 2004, Eran Tromer and Adi Shamir

Acoustic Crypto-analysis

https://www.cs.tau.ac.il/~tromer/papers/acoustic-20131218.pdf

Page 32: Emission Security and Side-channel Attacks

Cross-device Tracking

• Audio beacons can be embedded in TV ads or placed in stores

• Mobile apps can then listen, and track the user and his habits

• The field is still developing as of 2017. SilverPush is a major player.

Page 33: Emission Security and Side-channel Attacks

VISIBLE LIGHT CHANNEL

Page 34: Emission Security and Side-channel Attacks

• Joe Loughry and David Umphress

Informative LEDs

Data

LED

Page 35: Emission Security and Side-channel Attacks

Monitor Illumination

• 2002 Markus Kuhn

Page 36: Emission Security and Side-channel Attacks

Results

Displayed image

After some processing

Light sensor output

https://www.cl.cam.ac.uk/~mgk25/ieee02-optical.pdf

• 2002 Markus Kuhn

Page 37: Emission Security and Side-channel Attacks

“PASSWORD INCORRECT”

INPUT/OUTPUT

TIME CHANNEL

EM CHANNEL

LIGHTCHANNEL

POWER USAGE

CHANNEL

AUDIO CHANNEL

?????

????

Page 38: Emission Security and Side-channel Attacks

Conclusions

• Computer are physical machines. Be aware of the different channels

• Deny physical access when possible

• Use battle-tested crypto libs

• Shielded hardware and buildings may sometimes be the solution

Page 39: Emission Security and Side-channel Attacks

Questions?

Page 40: Emission Security and Side-channel Attacks

THE END

Page 41: Emission Security and Side-channel Attacks

Sources

• Ross Anderson, Security Engineering

• Original papers which presented the attacks

• Graphics sources are written in the presentation notes

• http://www.edn.com/Home/PrintView?contentItemId=4410267

• https://en.wikipedia.org/wiki/Cross-device_tracking

• https://en.wikipedia.org/wiki/Van_Eck_phreaking