Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and...
Transcript of Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and...
![Page 1: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/1.jpg)
Hardware Hacking for Software Geeks
David Gustin and Ab3nd
![Page 2: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/2.jpg)
Introduction
● Why this talk?● Building a lab● Tools● Forward Engineering● Reverse Engineering
![Page 3: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/3.jpg)
Building a Lab
● Space● Ventilation● Lighting● Work surfaces● Grounding
![Page 4: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/4.jpg)
Soldering
● Iron selection● Solder selection● Practicing● Limits of human ability
![Page 5: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/5.jpg)
Advanced Soldering Tricks
● Toaster oven reflow soldering● Skillet reflow soldering● Hot air tools
![Page 6: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/6.jpg)
Toaster Oven Refow
● Toaster oven as heat source● Temperature controlled by computer
![Page 7: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/7.jpg)
Skillet Reflow
● Electric skillet as heat source ● Easier to watch progress
![Page 8: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/8.jpg)
Hot Air Tools
● Heat gun● Hot air pencil
![Page 9: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/9.jpg)
Tools
● Volt/Ohm meter (VOM)● Oscilloscope● Logic probe● Logic analyzer
![Page 10: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/10.jpg)
Volt/Ohm Meter
● Analog vs. digital● Bells and whistles
![Page 11: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/11.jpg)
Oscilloscopes
● Analog vs. digital● DIY or buy?● Secondhand or new?
![Page 12: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/12.jpg)
Logic Probes
● Display the state of a single logic signal● DIY or buy?
![Page 13: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/13.jpg)
Logic Analyzers
● Display the state of multiple logic signals● Usually can record signals● DIY versions
![Page 14: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/14.jpg)
USB tools
● Portable, can be cheaper● May be OS constrained
![Page 15: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/15.jpg)
DIY tools
● XOScope● Parallel port logic analyzers● JTAG wigglers● Flash Dumpers
![Page 16: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/16.jpg)
Sources
● The Internet– Harbor Freight, Ebay (also has bio lab gear)
● Hamfests● Dumpster Diving● Colleges
– Befriend some real scientists
![Page 17: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/17.jpg)
Autodiadacticism!
● Engineer's Notebook series– Forrest Mims
● The Art of Electronics (aka The Bible)– Horowitz and Hill
● Application Notes
![Page 18: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/18.jpg)
Forward Engineering
As opposed to...the other kind.
![Page 19: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/19.jpg)
Process
● Gather requirements● Research resources● Assemble solution● Test and refine
![Page 20: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/20.jpg)
Chip Selection
● Architecture● Speed● Storage space● I/O● Embedded peripherals
![Page 21: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/21.jpg)
Embedded Architectures
● PowerPC● ARM● MIPS● X86● HC91S12● ARM● PIC
![Page 22: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/22.jpg)
Evaluation Boards
● Purpose● Sources
![Page 23: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/23.jpg)
GNU Toolchains
● Allows crosscompilation● Availability highly variable
![Page 24: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/24.jpg)
Embedded OSs
● OS or not?● Embedded Linux● FreeRTOS● DOS (No, really)
![Page 25: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/25.jpg)
No OS
● Task loop● Data storage● Interrupts● I/O● Timers
![Page 26: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/26.jpg)
Building Blocks
● Pluggable functionality● Object Oriented hardware!
![Page 27: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/27.jpg)
Communication
● CAN bus● SPI / 2Wire / I2C● RS232's not dead
![Page 28: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/28.jpg)
Reverse Engineering
Live by the soldering iron, die by the DMCA
![Page 29: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/29.jpg)
Process
● Start with a product● Figure out the subsystems● Determine the parts of interest● Figure out what each part does
![Page 30: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/30.jpg)
Reading PCBs
● Parts● Traces● Silkscreen
![Page 31: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/31.jpg)
Filling in the Blanks
● Datasheet searches● Recognizing common subsystems
![Page 32: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/32.jpg)
Protocol Reversing
● Snooping● Fuzzing
![Page 33: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/33.jpg)
Dumping Code
● BDM● JTAG● Flash Dumpers● EPROMS
![Page 34: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/34.jpg)
Decompiling
● IDA Pro● Learn assembly, microcontroller organization
![Page 35: Hardware Hacking for Software Geeks - DEF CONHardware Hacking for Software Geeks David Gustin and Ab3nd ... DIY versions USB tools Portable, can be cheaper May be OS constrained DIY](https://reader031.fdocuments.in/reader031/viewer/2022011816/5e6bb134e32db54ed223ef10/html5/thumbnails/35.jpg)
The End
● Thanks to the Hacker Foundation, etc...