35
 Hardware Hacking for Software Geeks David Gustin and Ab3nd

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

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

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

   

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

   

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

   

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

   

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

   

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

   

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

   

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

   

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

   

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

   

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

   

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

   

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

   

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

   

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

   

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

   

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

   

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

   

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

   

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

   

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

   

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

   

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

   

GNU Toolchains

● Allows cross­compilation● 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

   

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

   

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

   

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

   

Communication

● CAN bus● SPI / 2­Wire / 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

   

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

   

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

   

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

   

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

   

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

   

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

   

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

   

The End

● Thanks to the Hacker Foundation, etc...