How multi-fault injection breaks the security of smart cards
Sep. 12, 2017•0 likes•1,403 views
Download to read offline
Report
Technology
At RSA Conference 2010 Riscure's Marc Witteman presented an essential overview of fault injection attacks theory and showed a number of practical attacks at hardware using FI.
How multi-fault injection breaks the security of smart cards
1. Title of Presentation
Marc Witteman
Riscure
Session ID: RR-201
Session Classification: Advanced
How multi-fault injection
breaks the security
of smart cards
2. Imagine you could turn your
BART EZ Rider fare card
into a military CAC card…
2
3. Objectives
• Get an overview of fault injection threats
• Learn about countermeasures
• Discover the possibilities of next generation
fault injection methods
3
11. Double checking
11
short pin_check(byte* buffer) {
if(pin_ctr > 0) {
pin_ctr--;
if(array_compare(pin,buffer,4) == 0) {// PIN ok at first check
if(array_compare(pin,buffer,4) != 0) {
auth = FALSE; // PIN not ok at second check
return 0x6986; }
else { // PIN ok
… }
} else { // PIN not ok at first check
… }
12. Double checking
12
short pin_check(byte* buffer) {
if(pin_ctr > 0) {
pin_ctr--;
if(array_compare(pin,buffer,4) == 0) {// PIN ok at first check
if(array_compare(pin,buffer,4) != 0) {
auth = FALSE; // PIN not ok at second check
return 0x6986; }
else { // PIN ok
… }
} else { // PIN not ok at first check
… }
Second check detects fault
Glitch forces acceptance of false PIN
21. Limitations of common equipment
• Standard signal generators lack flexibility
• Laser cutters are coarse
• Diode lasers are divergent and weak
• Process control inefficient
21
???
22. Improvements in design
• Flexible glitch control hardware
• Smart triggering
• Effective diode lasers
• Efficient control software
22
23. Glitch control hardware requirements and design
23
Multi channel
• Clock,
• VCC (supply voltage)
• Optical
Precise
• low latency
• short pulses
• exact timing
Adaptive
• configure remotely
• diverse triggers
• Monitor side channel
ControlUSB
Trigger in
LaserContact
smart card
LCD
Display
Trigger out
Smart card RST
Smart card I/O
Smart card VCC
Smart card CLK
Glitch
circuit
with smart
card
Glitch generatorCPU+ memory
Switch
Power monitor
mode
CLK
VCC
vcc/clk/laser
24. Glitch control hardware implementation
General-purpose high speed FPGA board mounted on top of
dedicated PCB with analog and digital drivers and interfaces
24
25. Smart triggering, what for?
Variable delays stop time based glitch triggers
25
Instruction to hit
29. Spectrum of noisy signals
• Spectrum reveals signals obscured by noise
• High frequencies include distinguishing features
29
30. Frequency conversion of noisy signals
• High frequencies are difficult to sample
• Pattern matching easiest on DC components
• Frequency mixing and demodulation makes high
frequent features detectable
30
32. Smart triggering architecture and implementation
FPGA board combined with dedicated electronics
32
Control
Filter
Reference signal (2x)
Acquisition SAD processor (2×)
USB
Trigger in
Filter in
Filter out Signal in
Trigger out (2×)
SAD out
33. Diode laser requirements
Lasers must support
• fast switching
• power control
• multiple colors
33
33
Source: Sergei Skorobogatov
34. Diode laser system requirements
System requirements
• Camera view
• Motorized XY stage
Optics requirements
• Correct beam divergence
• Small spot size (~1 µm)
Remote controllable parameters
• XY position
• Glitch timing & amplitude
34
35. Fault Injection Software
Fault injection process requirements
• Configurable and repeatable
• Automated execution and logging
35
43. Real time multi glitch process
short pin_check(byte* buffer) {
if(pin_ctr > 0) {
random_delay();
if(pin_ctr <= 0) suicide();
pin_ctr--;
if(array_compare(pin,buffer,4) == 0) {// PIN ok at first check
random_delay();
if(array_compare(pin,buffer,4) != 0) suicide();
else { … } // PIN ok
} else { … } // PIN not ok at first check
Find end with smart triggering
43
44. Real time multi glitch process
short pin_check(byte* buffer) {
if(pin_ctr > 0) {
random_delay();
if(pin_ctr <= 0) suicide();
pin_ctr--;
if(array_compare(pin,buffer,4) == 0) {// PIN ok at first check
random_delay();
if(array_compare(pin,buffer,4) != 0) suicide();
else { … } // PIN ok
} else { … } // PIN not ok at first check
Glitch condition
44
45. Real time multi glitch process
short pin_check(byte* buffer) {
if(pin_ctr > 0) {
random_delay();
if(pin_ctr <= 0) suicide();
pin_ctr--;
if(array_compare(pin,buffer,4) == 0) {// PIN ok at first check
random_delay();
if(array_compare(pin,buffer,4) != 0) suicide();
else { … } // PIN ok
} else { … } // PIN not ok at first check
Find begin with smart triggering
and force power down
45
46. Real time multi glitch process
short pin_check(byte* buffer) {
if(pin_ctr > 0) {
random_delay();
if(pin_ctr <= 0) suicide();
pin_ctr--;
if(array_compare(pin,buffer,4) == 0) {// PIN ok at first check
random_delay();
if(array_compare(pin,buffer,4) != 0) suicide();
else { … } // PIN ok
} else { … } // PIN not ok at first check
Glitch condition
46
47. Real time multi glitch process
short pin_check(byte* buffer) {
if(pin_ctr > 0) {
random_delay();
if(pin_ctr <= 0) suicide();
pin_ctr--;
if(array_compare(pin,buffer,4) == 0) {// PIN ok at first check
random_delay();
if(array_compare(pin,buffer,4) != 0) suicide();
else { … } // PIN ok
} else { … } // PIN not ok at first check
Find end with smart triggering
47
48. Real time multi glitch process
short pin_check(byte* buffer) {
if(pin_ctr > 0) {
random_delay();
if(pin_ctr <= 0) suicide();
pin_ctr--;
if(array_compare(pin,buffer,4) == 0) {// PIN ok at first check
random_delay();
if(array_compare(pin,buffer,4) != 0) suicide();
else { … } // PIN ok
} else { … } // PIN not ok at first check
Glitch condition
48
49. Real time multi glitch process
short pin_check(byte* buffer) {
if(pin_ctr > 0) {
random_delay();
if(pin_ctr <= 0) suicide();
pin_ctr--;
if(array_compare(pin,buffer,4) == 0) {// PIN ok at first check
random_delay();
if(array_compare(pin,buffer,4) != 0) suicide();
else { … } // PIN ok
} else { … } // PIN not ok at first check
Find begin with smart triggering
and force power down
49
52. Multi glitch practical limitations
• Evaluation of many parameters is time consuming
(timing, amplitude, xy position, etc)
• Sensors and traps slow down analysis
careful tuning of equipment needed
• Navigation without design is cumbersome
crypto core is needle in hay-stack
52
53. Impact
• So can I turn my BART card into a CAC card?
• No, for dictating instructions and operands, you
would need multiple controlled beams (32)
• But, an attacker wouldn’t even want that:
just shake out the keys and clone a victim
53
54. Analysis & Mitigation
• How do I know if my smart card is vulnerable?
– Risk analysis
– Source code review
– Security testing
• How can I protect my smart cards?
– Use newest and certified chips
– Harden your code (OS & application)
http://www.riscure.com/fileadmin/images/Docs/Paper_Side_Channel_Patterns.pdf
54
55. Future research
Automation
• Can we further automate the analysis and
reduce user intervention?
• Can we reverse engineer code by analyzing
fault impact?
Multi beam attacks
• Can we by-pass multiple defenses if separate
laser beams are used?
• Can we push specific values on a data bus?
55
56. Summary and conclusion
• Fault injection is most significant threat for smart
cards
• Diode laser systems generate fast and precise
pulses that modify CPU instructions
• Sophisticated new fault injection equipment
defeats countermeasures
• Best defense by mix of strong hardware and
software countermeasures
56
57. 57
Questions & Discussion
Marc Witteman
Chief Technology Officer
witteman@riscure.com
Riscure B.V.
Frontier Building
Delftechpark 49
2628 XJ Delft
The Netherlands
Phone: +31 (0)15 251 4090
www.riscure.com
Thank you
57