40
Pwning IoT via Hardware Attacks Chase Schultz, Senior Security Consultant [email protected]

Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

Embed Size (px)

Citation preview

Page 1: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

P w n i n g I o T v i a H a r d w a r e A t t a c k s

Chase Schultz, Senior Security Consultant [email protected]

Page 2: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

About ISE

Analysts• White boxPerspective

• Hackers; Cryptographers; RE

Research• Routers; NAS; HealthcareCustomers• Companies with high value assets

Exploits• iPhone; Android; Ford; Exxon; Diebold

Page 3: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

whoami• Chase Schultz• Senior Security Consultant • Independent Security Evaluators• Twitter – @f47h3r_b0• Interests:

– Reverse Engineering, Hardware, SDR, Fuzzing, Embedded Systems, Python & Go

Page 4: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

Agenda① Importance of Hardware Hacking & IoT Research② Scope of Workshop③ Hardware Hacking Background④ Tools of the Trade⑤ Methodology⑥ Examples⑦ Photo Journal⑧ Hands On!!⑨ Resources / Further Reading⑩ Open it up to attendee’s. What do you want to

see?

Page 5: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

Why is this important?

Page 6: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

A Journey of Pwnage

• Started getting interested in Hardware Hacking & IoT

• Software guy goes to school …

• Great way to get access and leverage for further research.

Page 7: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

IoT?• IoT is a buzzword (duh) …

– Lots of embedded devices doing all the things …

– Smart Homes– Medical Devices / Entertainment /

Health Fitness / Toys / Sensors etc

Page 8: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

Hardware Hacking• Interfaces

– UART (Universal Asynchronous Receive & Transmit)

– JTAG (Joint Test Action Group) – HW Debug

– SPI (Serial Peripheral Interface) – I2C (Inter-Integrated Circuit)

Page 9: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23
Page 10: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

Tools of the Trade

Page 11: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23
Page 12: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

ISE Confidential - not for distribution

Page 13: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23
Page 14: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23
Page 15: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23
Page 16: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23
Page 17: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

ISE Confidential - not for distribution

Page 18: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

Hardware Attacks (Methodology)0) Open the device, void your warranty, and join the exploitation party.1) Identify Device, hardware revisions, document hardware

components2) Research chip datasheets - figure out features3) Identify hardware communication interfaces possibilities4) Continuity Testing and Electrical Pinout Reversing5) Identifying wireline protocol logic (How the hell do I talk to these

chips?)6) Hardware tools for accessing interfaces7) Wiring up to to the board8) Device Interrogation9) Firmware Reverse Engineering10) Vulnerability Research / Exploitation

Page 19: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

Void Some Warranties

Page 20: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

RTFM• Datasheets are your friend!

Page 21: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

Identifying HW Interfaces

Page 22: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23
Page 23: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23
Page 24: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23
Page 25: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

Pinout Reversing

Page 26: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

ISE Confidential - not for distribution

Page 27: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23
Page 28: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

• VCC Pin – Steady Voltage (Also chirps)

• GND Pin – Metal Piece & Pin• Tx Pin – Fluctuation upon boot

• Baudrate

Page 29: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

UART to Root Shells

Page 30: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

ISE Confidential - not for distribution

Page 31: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

ISE Confidential - not for distribution

Page 32: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

• JTAG – Joint Test Action Group– Finding TDI (Test Data In), TDO (Test

Data Out), TCK (Test Clock), TMS (Test Mode Select), TRST (Test Reset) optional.

– Hardware Debugging via OpenOCD / GDB

– Jtagulator is awesome for brute-forcing pinout

ISE Confidential - not for distribution

Page 33: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

Dumping Flash w/ Flashrom

Page 34: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

Resources to Learn• Trainings:

– SexViaHex.com – Software Exploitation Via Hardware Exploitation - Xipiter

– Hands on Hardware Hacking – Joe Grand

• Blogs– http://www.devttys0.com/ – https://

dontstuffbeansupyournose.com

Page 35: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

HANDS ON!!• If anyone would like to try wiring up a

shikra to a UART interface and playing around with a device.

• Presoldered SOHO Routers & Home Automation Hubs

Page 36: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23
Page 37: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

Accessing Shikra via Screenscreen /dev/cu.usbserial-145 115200

^ ^^

cmd device namebaudrate

ISE Confidential - not for distribution

Page 38: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

Your Turn!• Enable yourself as a security

researcher.

• Initial access for further research.

• You can do it too! Its fun!

ISE Confidential - not for distribution

Page 39: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

Thank You!• DEF CON / @IoTVillage / You!• Contact ISE --

https://securityevaluators.com/

https://github.com/f47h3r/firmware_collection

@f47h3r_b0

Page 40: Pwning Iot via Hardware Attacks - Chase Schultz - IoT Village - Defcon 23

Get Involved