Hardware is the New SoftwareJoe Grand aka, Grand Idea Studio, Inc.

/me๏Electrical engineer๏Hardware hacker๏Product designer๏Member of the L0pht hackerthink-tank in 1990s๏Co-host of Prototype This onDiscovery Channel๏Security work includes breaking smartparking meters, authentication tokens,and early PDAs

We Are Controlled By Technology๏Electronics are embedded into nearlyeverything we use on a daily basisOften taken for granted and inherently trusted H/W is not voodoo, but people treat it that way๏ Hardware has largely been ignored in thesecurity field Many products susceptible to compromise via simple,๏ practical classes of attackVendors mostly respond to security problems by blowingthem off (like S/W in the 90s!) .or it is blown completely out of proportion

The Time is Now.๏The tools are available๏The information is available๏All you need is the confidence to approach theproblem.

Why Hardware Hacking?For Good?Security competency Test hardware security schemes for failures/weaknesses๏ Consumer protection I don't trust glossy marketing you?๏ Military intelligence What is that hardware? How was it designed? By whom?๏ Education and curiosity To simply see how things work Do something new, novel, and/or unique๏

Why Hardware Hacking?For Evil?Theft of service Obtaining a service for free that normally costs ๏ Competition/cloning Specific theft of information/data/IP to gain a marketplace๏advantage๏User authentication/spoofing Forging a user's identity to gain access to a system

Easy Access to Tools๏Cost of entry can be less than setting up asoftware development environment!๏Pre-made, entry-level packages available Ex.: Ladyada's Electronics Toolkit, page product info&cPath 8&productsid 136 Ex.: Deluxe Make: Electronics Toolkit, MKEE2

Easy Access to Tools 2๏Soldering Iron From a simple stick iron to a full-fledged rework station ( 10 to 5k)Fine tip, 700 degree F, 50W soldering stick ironis recommendedEx.: Weller WP25 or W60P Controlled-Output, 67.95

Easy Access to Tools 3๏Soldering accessories Solder: No-clean flux, thin gauge (0.032" or 0.025"diameter), 60/40 Rosin core or Lead-free Desoldering Tool ("Solder Sucker"): Manual vacuumdevice that pulls up hot solder, useful for removingcomponents from circuit boards (Radio Shack #64-2098, 7.99) Desoldering Braid: Wicks up hot solder (Radio Shack#64-2090, 3.99) IC Extraction Tool: Helps lift ICs from the board duringremoval/desoldering (Radio Shack #276-1581, 8.39)

Easy Access to Tools 4๏Soldering accessories (continued) ChipQuik SMD Removal Kit: Allows the quick and easyremoval of surface mount components Tip cleaner: Helps to keep the solder tip clean for evenheat distribution. Ex.: Sponge, lead-free tip tinner

Easy Access to Tools 5๏Multimeter Provide a number of precision measurement functions: AC/DC voltage, resistance, capacitance,current, and continuityEx.: Fluke Model 115, 129.00

Easy Access to Tools 6๏Oscilloscope Provides a visual display of electrical signals and how they change over timeAvailable in analog, digital, and mixed-mode versionsGood introductory guide: XYZs of Oscilloscopes, Notes/XYZs/index.html Approximate price range 100 (used) - 20k US Ex.: USBee, 295- 1495, Ex.: PicoScope, 250- 1500,

Easy Access to Tools 7๏Microscope Useful for careful inspection of circuit boards, reading small part numbers, etc.Human hands have more resolution than the naked eyecan resolve Greatly aids in soldering surface mount devices You'll be amazed at what fine-pitch components you can solderwhen using a decent microscope! Approximate price range 100 - 5k US Ex.:Vision Engineering, Ex.: AmScope/Precision World,

Easy Access to Tools 8๏PCB Design Many low-cost, open source, or captive solutions Ex.: EAGLE, Ex.: gEDA, Ex.: Kicad, au lis/kicad Ex.: PCB123,

Easy Access to ManufacturingPCB Fabrication Can get professional prototype PCBs for 20 US each Many production houses available online Ex.: Advanced Circuits, Ex.: BatchPCB, Ex.: e-Teknet,๏ PCB Assembly Have someone else build your๏ complicated surface-mount boardsEx.: Advanced Assembly, www.aapcb.comEx.: Screaming Circuits,

Easy Access to Manufacturing 2๏Rapid Prototyping Laser cutter CNC PCB prototype machine Ex.: T-Tech, LPKF 3D printing Open-source solutions now existEx.: MakerBot, www.makerbot.comEx.: RepRap, www.reprap.orgEx.: [email protected],

Easy Access to Information๏Open source hardware and DIY sitesbecoming commonplacePeople are publishing their new work daily Pictures, videos, source code, schematics, Gerber plots๏ G00gle & YouTube๏๏hack a day,๏Instructables,๏Adafruit Industries,๏Harkopen,

Easy Access to Other PeopleYou don't have to live in a bubble anymore(if you don't want to)๏ Can outsource tasks to people with specific/specialized skills๏ Hackerspaces Local venues for sharing equipment and resources Much different than the hacker groups of the 80s and 90s๏ that paved the wayHundreds exist all over the worldEx.: HackerspaceWiki, http://hackerspaces.orgEx.: HacDC, www.hacdc.orgEx.: Noisebridge (SF),

Easy Access to Other People 2๏Workshops Public, membership-based organizations (like a health club)Classes and training availableLike hackerspaces, but more focused/directed to servea specific purposeEx.: Techshop, www.techshop.wsEx.: The Crucible, ๏ Various Forums & Cons Black Hat, DEFCON, ToorCon, HOPE, ShmooCon,CCC, HAR, Hack in the Box, etc.

Hardware Hacking MethodologyThere's never only one correct process๏ Major subsystems: Information gathering Hardware teardown External interface analysis Silicon die analysis Firmware reversing๏

Hardware Hacking Methodology 2๏General guidelines: the productObtain the productExamine product for external attack areasOpen the productReverse engineer circuitry, silicon, and/or firmwareIdentify potential attack areasPerform attackIf not successful, repeat steps 6-7

Information Gathering๏Crawling the Internet for specific information Product specifications, design documents, marketing ๏materialsCheck forums, blogs, Twitter, Facebook, etc.Acquire target hardware Purchase, borrow, rent, steal, or ask the vendor Ex.: eBay, surplus๏Dumpster diving๏Social engineering

Hardware TeardownHardware and electronics disassembly andreverse engineering๏ Get access to the circuitry๏ Component and subsystem identification๏ Gives clues about design techniques,potential attacks, and system functionality๏ Typically there are similarities between olderand newer designs Even between competing products๏

External Interface AnalysisCommunications monitoring๏ Protocol decoding and/or emulation๏ Ex.: Smartcard, Serial, USB, JTAG, I2C, SPI,Ethernet, CAN๏ Any interface accessible to the outsideworld may be an avenue for attack Especially program/debug connections: If a legitimate๏designer has access to the interface, so do we๏Using oscilloscope, logic analyzer, dedicatedsniffers, software tools, etc. Ex.: Bus Pirate,

Silicon Die Analysis๏Supremely useful depending on attack goals Simple imaging to gather clues Key/algorithm extraction from ICs Retrieve contents of Flash, ROM, FPGAs, other non- ๏volatile devicesCutting or repairing silicon structures (security fuses,traces, etc.)Like reversing circuitry, but at a microscopiclevel

Silicon Die Analysis 2๏"Real" equipment still fairly expensive, but canfind in academic environment, get fromsurplus, or go low-tech: Fuming Nitric Acid (HNO3) Acetone Microscope Micropositioner w/ sewing, Hack a Sat-TV Smart Card

Silicon Die Analysis 3๏Required reading/viewing: "Hack a Sat-TV Smart Card," 7610 Chris Tarnovsky/Flylogic Engineering's Analytical Blog, "Hacking Silicon: Secrets from Behind the EpoxyCurtain," Bunnie Huang, ToorCon 7, pdf "Hardware Reverse Engineering," Karsten Nohl, 25C3, "Deep Silicon Analysis," Karsten Nohl, HAR 2009,

Firmware Reversing๏Extract program code/data from on-boardmemory devices Using off-the-shelf device programmer or productspecific toolYou'll end up with a binary or hex dumpEx.: Flash, ROM, RAM, EEPROM, FPGA ๏ Quick run through w/ strings and hexeditor to pick most interesting area tobegin with๏Gives clues to possible entry/access pointsto administrative menus or ideas of furtherattacks

Firmware Reversing 2๏Disassembly and reverse engineeringusing IDA, etc.๏Modify, recompile, and reprogram device,if desired๏Now pure software hackers can get intothe game Using tools and techniques they are already familiar withElectronic/embedded systems are typically nothingmore than a general purpose computerprogrammed to perform a specific task

Common Themes๏Most product design engineers not familiarwith security๏Many products based on publicly availablereference designs provided by chip vendors๏Components easy to access, identify, andprobe๏Engineers and manufacturers want easy accessto product for testing and debugging๏Even the simplest attacks can have hugerepercussions

Lots of High Profile Attacks๏e-Voting Machines Massive security problems with devices around the world Casting multiple votes, tampering with electionconfigurations and data, easily changing firmware, remotedetection of voting via TEMPEST monitoringEx.: ๏ ATM "cash dispensing" bug (pulled from BlackHat US halts Ex.:talk/

Lots of High Profile Attacks 2๏Smart power meters Wireless and peer-to-peer capabilities, no authenticationfor in-the-field firmware updates, can sever customer frompower gridEx.: BHUSA09-Davis-AMI-SLIDES.pdfNorth County Times, Jan. 10, 2010 http:// npritchett/2440979828/Source unknown

Lots of High Profile Attacks 3๏Boston MBTA Fare Collection Stored value and/or time-based pass (unlimited rides during a given time period)CharlieTicket: Magnetic stripe, can be rewritten for valueup to 655.36 by changing 16-bits corresponding to valueCharlieCard: RFID-based smartcard using MIFARE Classic Weak encryption leading to key recovery and full access to cardMIFARE Classic proprietary Crypto-1 algorithm previouslybroken by Karsten Nohl, et. al. 2007-2008 MBTA launched assault on researchers to try and squelch release of information (only temporarily successful)Ex.:

Smart Parking Meters๏Parking industry generates 28 billion annuallyworldwide๏Where there's money, there's risk for fraudand abuse๏Attacks/breaches can have serious fiscal, legal,and social implications๏Collaboration w/ Jake Appelbaum and ChrisTarnovsky to analyze San Franciscoimplementation๏Full details at ters/

Parking Meter Technology๏Pure mechanical replaced with hybridelectromechanical in early 1990s Mechanical coin slot Minimal electronics used for timekeeping andadministrator access (audit, debug, programming?)๏Now, we're seeing pure electronic"smart" systems Microprocessor, memory, user interface US is late to the game, other countries have beendoing this for years

Parking Meter Technology 2User Interfaces Coin Smartcard Credit card๏ Administrator Interfaces Coin Smartcard Infrared Wireless (RF, GPRS) Other (Serial via key, etc.)๏

Prior Problems and/or Failures๏New York City reset via infrared (universalremote control), 2001,๏San Diego stored value card by H1kari, 2004,๏Chicago multi-space failures, June 2009 Firmware bug or intentional social disobedience? 1&a 6&t txt๏Lots of other smartcard hacking has been donein the past Ex.: Dutch phone cards (Hack-Tic), FedEx/Kinko's, satelliteTV (DirecTV/DISH)

San Francisco MTA๏Part of a 35 million pilot program to replace23,000 mechanical meters with "smart"parking meters in 2003๏Infrastructure currently comprised ofMacKay Guardian XLE meters๏Stored value smart card 20 or 50 quantities Can purchase online with credit cardor in cash from selected locations

San Francisco MTA 2๏Easy to replay transaction w/ modified datato obtain unlimited parking Determined solely by looking at oscilloscope captures of smartcard transactionsSucceeded in three days

Meter Disassembly:MacKay Guardian

Meter Disassembly:MacKay Guardian 2

Meter Disassembly:MacKay Guardian 3

Meter Disassembly:MacKay Guardian 4

Meter Disassembly:MacKay Guardian 5

Information Gathering๏A chance encounter w/ Department ofParking & Transportation technician on thestreets of SF Ask smart, but technically awkward questions to elicitcorrections๏Crawling the Internet for specific information Product specifications, design documents, etc. What is the core business competency? Do they have technical troubles?

Information Gathering 2# From: xxx xxx at jjmackay dot ca # Date: Wed, 14 Mar 2001 10:27:29 -0400I am learning how to use CVS and as part of this process I set up a testreposi