Foreword |
|
xix | |
Acknowledgments |
|
xxi | |
Introduction |
|
xxiii | |
What Embedded Devices Look Like |
|
xxiv | |
Ways of Hacking Embedded Devices |
|
xxv | |
What Does Hardware Attack Mean? |
|
xxv | |
Who Should Read This Book? |
|
xxvi | |
About This Book |
|
xxvii | |
|
1 Dental Hygiene: Introduction To Embedded Security |
|
|
1 | (34) |
|
|
2 | (2) |
|
|
4 | (1) |
|
|
5 | (1) |
|
|
5 | (1) |
|
Trusted Execution Environment OS and Trusted Applications |
|
|
6 | (1) |
|
|
7 | (1) |
|
Main Operating System Kernel and Applications |
|
|
7 | (1) |
|
|
7 | (1) |
|
|
7 | (3) |
|
|
10 | (1) |
|
|
10 | (2) |
|
|
12 | (1) |
|
Software Attacks on Hardware |
|
|
12 | (3) |
|
|
15 | (1) |
|
|
16 | (2) |
|
|
18 | (1) |
|
|
18 | (4) |
|
Assets and Security Objectives |
|
|
22 | (1) |
|
Confidentiality and Integrity of Binary Code |
|
|
23 | (1) |
|
Confidentiality and Integrity of Keys |
|
|
23 | (1) |
|
|
24 | (1) |
|
Confidentiality and Integrity of Personally Identifiable Information |
|
|
24 | (1) |
|
Sensor Data Integrity and Confidentiality |
|
|
25 | (1) |
|
Content Confidentiality Protection |
|
|
25 | (1) |
|
|
25 | (1) |
|
|
26 | (1) |
|
|
26 | (1) |
|
|
26 | (1) |
|
|
27 | (1) |
|
|
27 | (3) |
|
Identification vs. Exploitation |
|
|
30 | (1) |
|
|
30 | (1) |
|
Analyzing the Attack Tree |
|
|
30 | (1) |
|
Scoring Hardware Attack Paths |
|
|
31 | (2) |
|
Disclosing Security Issues |
|
|
33 | (1) |
|
|
34 | (1) |
|
2 Reaching Out, Touching Me, Touching You: Hardware Peripheral Interfaces |
|
|
35 | (36) |
|
|
36 | (1) |
|
|
36 | (1) |
|
|
36 | (1) |
|
|
37 | (1) |
|
|
37 | (1) |
|
|
37 | (1) |
|
|
37 | (1) |
|
|
38 | (1) |
|
Interface with Electricity |
|
|
39 | (1) |
|
|
39 | (2) |
|
High Impedance, Pullups, and Pulldowns |
|
|
41 | (1) |
|
Push-Pull vs. Tristate vs. Open Collector or Open Drain |
|
|
42 | (1) |
|
Asynchronous vs. Synchronous vs. Embedded Clock |
|
|
43 | (2) |
|
|
45 | (1) |
|
Low-Speed Serial Interfaces |
|
|
46 | (1) |
|
Universal Asynchronous Receiver/Transmitter Serial |
|
|
46 | (2) |
|
Serial Peripheral Interface |
|
|
48 | (2) |
|
|
50 | (3) |
|
Secure Digital Input/Output and Embedded Multimedia Cards |
|
|
53 | (2) |
|
|
55 | (1) |
|
JTAG and Other Debugging Interfaces |
|
|
56 | (3) |
|
|
59 | (1) |
|
|
60 | (1) |
|
High-Speed Serial Interfaces |
|
|
61 | (1) |
|
|
62 | (1) |
|
|
63 | (1) |
|
|
63 | (1) |
|
|
64 | (1) |
|
|
64 | (1) |
|
|
65 | (1) |
|
|
65 | (4) |
|
|
69 | (1) |
|
|
70 | (1) |
|
3 Casing The Joint: Identifying Components And Gathering Information |
|
|
71 | (48) |
|
|
72 | (1) |
|
Federal Communications Commission Filings |
|
|
72 | (3) |
|
|
75 | (2) |
|
Datasheets and Schematics |
|
|
77 | (2) |
|
Information Search Example: The USB Armory Device |
|
|
79 | (7) |
|
|
86 | (1) |
|
Identifying ICs on the Board |
|
|
86 | (2) |
|
Small Leaded Packages: SOIC, SOP, and QFP |
|
|
88 | (3) |
|
No-Lead Packages: SO and QFN |
|
|
91 | (1) |
|
|
91 | (3) |
|
|
94 | (1) |
|
DIP, Through-Hole, and Others |
|
|
95 | (1) |
|
Sample IC Packages on PCBs |
|
|
95 | (3) |
|
Identifying Other Components on the Board |
|
|
98 | (4) |
|
|
102 | (4) |
|
Using the JTAG Boundary Scan for Mapping |
|
|
106 | (3) |
|
Information Extraction from the Firmware |
|
|
109 | (1) |
|
Obtaining the Firmware Image |
|
|
109 | (2) |
|
Analyzing the Firmware Image |
|
|
111 | (7) |
|
|
118 | (1) |
|
4 Bull In A Porcelain Shop: Introducing Fault Injection |
|
|
119 | (28) |
|
Faulting Security Mechanisms |
|
|
120 | (1) |
|
Circumventing Firmware Signature Verification |
|
|
121 | (1) |
|
Gaining Access to Locked Functionality |
|
|
121 | (1) |
|
Recovering Cryptographic Keys |
|
|
121 | (1) |
|
An Exercise in OpenSSH Fault Injection |
|
|
122 | (1) |
|
Injecting Faults into C Code |
|
|
122 | (1) |
|
Injecting Faults into Machine Code |
|
|
123 | (2) |
|
|
125 | (1) |
|
Target Device and Fault Goal |
|
|
126 | (1) |
|
|
126 | (1) |
|
Target Preparation and Control |
|
|
127 | (4) |
|
|
131 | (1) |
|
Discovering Fault Primitives |
|
|
132 | (3) |
|
Searching for Effective Faults |
|
|
135 | (7) |
|
|
142 | (2) |
|
|
144 | (2) |
|
|
146 | (1) |
|
5 Don't Lick The Probe: How To Inject Faults |
|
|
147 | (42) |
|
|
148 | (3) |
|
|
151 | (3) |
|
Fault Sensitivity Analysis |
|
|
154 | (1) |
|
|
154 | (1) |
|
|
155 | (2) |
|
Clock Fault Injection Parameters |
|
|
157 | (1) |
|
|
158 | (1) |
|
Generating Voltage Glitches |
|
|
158 | (1) |
|
Building a Switching-Based Injector |
|
|
159 | (4) |
|
|
163 | (1) |
|
Raspberry Pi Fault Attack with a Crowbar |
|
|
164 | (7) |
|
Voltage Fault Injection Search Parameters |
|
|
171 | (1) |
|
Electromagnetic Fault Injection |
|
|
171 | (2) |
|
Generating Electromagnetic Faults |
|
|
173 | (2) |
|
Architectures for Electromagnetic Fault Injection |
|
|
175 | (1) |
|
EMFI Pulse Shapes and Widths |
|
|
176 | (1) |
|
Search Parameters for Electromagnetic Fault Injection |
|
|
177 | (1) |
|
|
178 | (1) |
|
|
178 | (2) |
|
Front-Side and Back-Side Attacks |
|
|
180 | (1) |
|
|
181 | (2) |
|
Optical Fault Injection Setup |
|
|
183 | (1) |
|
Optical Fault Injection Configurable Parameters |
|
|
183 | (1) |
|
|
184 | (2) |
|
Parameters for Body Biasing Injection |
|
|
186 | (1) |
|
Triggering Hardware Faults |
|
|
186 | (1) |
|
Working with Unpredictable Target Timing |
|
|
187 | (1) |
|
|
188 | (1) |
|
6 Bench Time: Fault Injection Lab |
|
|
189 | (34) |
|
|
190 | (1) |
|
|
191 | (3) |
|
Act 2 Inserting Useful Glitches |
|
|
194 | (1) |
|
Crowbar Glitching to Fault a Configuration Word |
|
|
195 | (15) |
|
|
210 | (5) |
|
Act 3 Differential Fault Analysis |
|
|
215 | (1) |
|
|
215 | (3) |
|
Getting a Correct Signature from the Target |
|
|
218 | (4) |
|
|
222 | (1) |
|
7 X Marks The Spot: Trezor One Wallet Memory Dump |
|
|
223 | (22) |
|
|
224 | (1) |
|
Trezor One Wallet Internals |
|
|
224 | (2) |
|
USB Read Request Faulting |
|
|
226 | (2) |
|
|
228 | (1) |
|
Building Firmware and Validating the Glitch |
|
|
229 | (4) |
|
USB Triggering and Timing |
|
|
233 | (3) |
|
Glitching Through the Case |
|
|
236 | (1) |
|
|
236 | (1) |
|
Reviewing the Code for Fault Injection |
|
|
237 | (3) |
|
|
240 | (1) |
|
|
241 | (1) |
|
|
242 | (1) |
|
Tuning Timing Based on USB Messages |
|
|
242 | (1) |
|
|
243 | (2) |
|
8 I've Got the Power: Introduction to Power Analysis |
|
|
245 | (20) |
|
|
246 | (3) |
|
|
249 | (3) |
|
Power Measurements for Timing Attacks |
|
|
252 | (1) |
|
|
253 | (1) |
|
|
254 | (2) |
|
Applying SPA to RSA, Redux |
|
|
256 | (2) |
|
|
258 | (6) |
|
|
264 | (1) |
|
9 Bench Time: Simple Power Analysis |
|
|
265 | (28) |
|
|
266 | (1) |
|
Building a Basic Hardware Setup |
|
|
266 | (3) |
|
|
269 | (2) |
|
Preparing the Target Code |
|
|
271 | (1) |
|
|
272 | (3) |
|
Pulling It Together: An SPA Attack |
|
|
275 | (1) |
|
|
275 | (2) |
|
Preparing the Oscilloscope |
|
|
277 | (1) |
|
|
278 | (1) |
|
Scripting the Communication and Analysis |
|
|
279 | (3) |
|
|
282 | (2) |
|
ChipWhisperer-Nano Example |
|
|
284 | (1) |
|
Building and Loading Firmware |
|
|
284 | (1) |
|
A First Glance at the Communication |
|
|
285 | (1) |
|
|
285 | (2) |
|
|
287 | (4) |
|
|
291 | (2) |
|
10 Splitting the Difference: Differential Power Analysis |
|
|
293 | (30) |
|
Inside the Microcontroller |
|
|
294 | (1) |
|
Changing the Voltage on a Capacitor |
|
|
295 | (2) |
|
From Power to Data and Back |
|
|
297 | (2) |
|
|
299 | (1) |
|
Differential Power Analysis Attack |
|
|
300 | (1) |
|
Predicting Power Consumption Using a Leakage Assumption |
|
|
301 | (4) |
|
|
305 | (3) |
|
Know Thy Enemy: An Advanced Encryption Standard Crash Course |
|
|
308 | (2) |
|
Attacking AES-128 Using DPA |
|
|
310 | (1) |
|
Correlation Power Analysis Attack |
|
|
311 | (1) |
|
|
312 | (4) |
|
Attacking AES-128 Using CPA |
|
|
316 | (5) |
|
Communicating with a Target Device |
|
|
321 | (1) |
|
Oscilloscope Capture Speed |
|
|
321 | (1) |
|
|
322 | (1) |
|
11 Gettin' Nerdy With It: Advanced Power Analysis |
|
|
323 | (38) |
|
|
324 | (1) |
|
|
325 | (1) |
|
|
326 | (1) |
|
Success Rate-Based Metrics |
|
|
327 | (1) |
|
|
328 | (1) |
|
Correlation Peak Progression |
|
|
329 | (1) |
|
|
330 | (1) |
|
Measurements on Real Devices |
|
|
331 | (1) |
|
|
331 | (3) |
|
|
334 | (3) |
|
Determining Sensitive Nets |
|
|
337 | (1) |
|
|
338 | (1) |
|
|
339 | (3) |
|
Trace Set Analysis and Processing |
|
|
342 | (1) |
|
|
342 | (10) |
|
|
352 | (3) |
|
Deep Learning Using Convolutional Neural Networks |
|
|
355 | (3) |
|
|
358 | (3) |
|
12 Bench Time: Differential Power Analysis |
|
|
361 | (26) |
|
|
362 | (1) |
|
Bootloader Communications Protocol |
|
|
362 | (1) |
|
|
363 | (1) |
|
|
364 | (1) |
|
Obtaining and Building the Bootloader Code |
|
|
365 | (1) |
|
Running the Target and Capturing Traces |
|
|
366 | (1) |
|
|
366 | (1) |
|
Communicating with the Bootloader |
|
|
367 | (1) |
|
Capturing Overview Traces |
|
|
367 | (2) |
|
Capturing Detailed Traces |
|
|
369 | (1) |
|
|
369 | (1) |
|
|
370 | (1) |
|
|
371 | (3) |
|
|
374 | (1) |
|
|
374 | (1) |
|
|
375 | (1) |
|
Getting the Rest of the Traces |
|
|
376 | (1) |
|
|
377 | (3) |
|
|
380 | (1) |
|
|
380 | (1) |
|
|
381 | (1) |
|
|
381 | (1) |
|
|
382 | (1) |
|
Peeping at the Bootloader Source Code |
|
|
383 | (1) |
|
Timing of Signature Check |
|
|
384 | (2) |
|
|
386 | (1) |
|
13 No Kiddin': Real-Life Examples |
|
|
387 | (14) |
|
|
387 | (1) |
|
|
388 | (3) |
|
|
391 | (2) |
|
|
393 | (1) |
|
|
393 | (5) |
|
|
398 | (3) |
|
14 Think Of The Children: Countermeasures, Certifications, and Goodbytes |
|
|
401 | (24) |
|
|
402 | (1) |
|
Implementing Countermeasures |
|
|
402 | (15) |
|
Verifying Countermeasures |
|
|
417 | (3) |
|
|
420 | (3) |
|
|
423 | (1) |
|
|
423 | (2) |
|
A MAXING OUT YOUR CREDIT CARD: SETTING UP A TEST LAB |
|
|
425 | (42) |
|
Checking Connectivity and Voltages: $50 to $500 |
|
|
426 | (1) |
|
Fine-Pitch Soldering: $50 to $1,500 |
|
|
427 | (2) |
|
Desoldering Through-Hole: $30 to $500 |
|
|
429 | (2) |
|
Soldering and Desoldering Surface Mount Devices: $100 to $500 |
|
|
431 | (3) |
|
Modifying PCBs: $5 to $700 |
|
|
434 | (1) |
|
Optical Microscopes: $200 to $2,000 |
|
|
435 | (1) |
|
Photographing Boards: $50 to $2,000 |
|
|
436 | (1) |
|
Powering Targets: $10 to $1,000 |
|
|
437 | (1) |
|
Viewing Analog Waveforms (Oscilloscopes): $300 to $25,000 |
|
|
437 | (2) |
|
|
439 | (1) |
|
|
439 | (2) |
|
|
441 | (2) |
|
|
443 | (1) |
|
Viewing Logic Waveforms: $300 to $8,000 |
|
|
443 | (2) |
|
Triggering on Serial Buses: $300 to $8,000 |
|
|
445 | (1) |
|
Decoding Serial Protocols: $50 to $8,000 |
|
|
445 | (2) |
|
CAN Bus Sniffing and Triggering: $50 to $5,000 |
|
|
447 | (1) |
|
|
447 | (1) |
|
Interacting Through JTAG: $20 to $10,000 |
|
|
447 | (1) |
|
General JTAG and Boundary Scan |
|
|
447 | (1) |
|
|
448 | (1) |
|
PCIe Communication: $100 to $1,000 |
|
|
449 | (1) |
|
USB Sniffing: $100 to $6,000 |
|
|
450 | (1) |
|
USB Triggering: $250 to $6,000 |
|
|
451 | (1) |
|
|
452 | (1) |
|
SPI Flash Connections: $25 to $1,000 |
|
|
452 | (1) |
|
Power Analysis Measurements: $300 to $50,000 |
|
|
453 | (3) |
|
Triggering on Analog Waveforms: $3,800+ |
|
|
456 | (1) |
|
Measuring Magnetic Fields: $25 to $10,000 |
|
|
457 | (2) |
|
Clock Fault Injection: $100 to $30,000 |
|
|
459 | (1) |
|
Voltage Fault Injection: $25 to $30,000 |
|
|
460 | (1) |
|
Electromagnetic Fault Injection: $100 to $50,000 |
|
|
461 | (1) |
|
Optical Fault Injection: $1,000 to $250,000 |
|
|
461 | (1) |
|
Positioning Probes: $100 to $50,000 |
|
|
462 | (1) |
|
Target Devices: $10 to $10,000 |
|
|
463 | (4) |
|
B ALL YOUR BASE ARE BELONG TO US: POPULAR PINOUTS |
|
|
467 | (4) |
|
|
467 | (1) |
|
|
468 | (1) |
|
|
468 | (1) |
|
|
469 | (1) |
|
|
469 | (1) |
|
|
469 | (1) |
|
Ember Packet Trace Port Connector |
|
|
470 | (1) |
Index |
|
471 | |