Common Attacks On IoT Devices Christina Quast PDF
Common Attacks On IoT Devices Christina Quast PDF
on IoT devices
Why you can not win
@binarychrysh
Agenda
● What is IoT? And why is security important?
● Software attacks
● Hardware attacks
● Take-aways
What is IoT?
What is IoT?
• Embedded device connected to the internet
• Often power constrained, small, connected
over some kind of wireless technology
• Often memory-constrained
• E.g. PLC, SSD-Controller,
Temperature-control
• Often easy to hack
Analyse firmware
* See Talk “Hardware Hacking - Extracting Information From Chips” by Dmitry Nedospasov (@nedos)
Hardware
Non-invasive attacks
● Side Channel Attacks (2)
○ Hardware Glitching
■ very high/low voltage
■ alter clock period during execution
○ Power Analysis
■ Power consumption of a chip depends
on the secret data that is computed on
the chip):
● SPA (Simple power analysis)
● DPA (Differential power analysis)
■ EM Radiation channel
■ Acoustic channel [Visible and infrared light emitted by switching
transistors/ by Dmitry Nedospasov]
* See Talk “Hardware Hacking - Extracting Information From Chips” by Dmitry Nedospasov (@nedos)
Hardware
Semi-invasive attacks
● Decapping package
● Infrared light/photon emission analysis of
backside to find location for attack
● Then use laser to flip bits and break crypto
Fully-invasive attacks
● Much effort, but 100% success rate
● Modify chip with FIB (Focused Ion Beam)
● Microprobing
● Linear code extraction (LCE)
[Yamaha audio IC decapsulated by Olli Niemitalo/ CC0 1.0]
* See Talk “Hardware Hacking - Extracting Information From Chips” by Dmitry Nedospasov (@nedos)
Attacker Tools
● Hardware:
○ Oscilloscope
○ Logic Analyzer (e.g. Salae)
○ JTAG:
■ GoodFET, BusBlaster, BusPirate,
JTAGulator, JTAGenum, Black Magic
Probe
○ Side Channel Attacks:
■ ChipWhisperer (power analysis, glitching
ChipWhisperer
attacks)
○ USB:
■ Facedancer
○ SDR:
■ HackRF
BusPirate HackRF
Real world attacks
Real world attacks*
● UART (populated or not): Usually device boots into special console/root console
Recovery mode: Shorting BGA pins with [CC by 4.0 34C3 media.ccc.de}
aluminium foil
* See Talk “34C3 - Unleash your smart-home devices: Vacuum Cleaning Robot Hacking” by Dennis Giese, Daniel Wegemer from TU Darmstadt
Real attack stories: PLC*
● Downgrading to older firmware
● Physical mapping of JTAG not easy to
find
● Injecting code into firmware update
* See Paper “Off-the-shelf Embedded Devices as Platforms for Security Research” by L.Cojocar, K.Razavi, H.Bos (see References)
Real attack stories: Electronic Safe Lock*
● Resistor in series to battery and lock
● Amplified current => Power analysis Side
channel attack (high current consumption
=> 0 read from EEPROM, low current => 1
read from EEPROM
● Mitigate: Don’t store secret in EEPROM
[by Plore]
* See Talk “DEF CON 24 - Plore - Side channel attacks on high security electronic safe locks” by Plore
Real attack stories: Electronic Safe Lock*
● Timing attack: The correct key will have a
longer delay
● Problem: 5 tries, then locked out for 10
minutes
● Counter of tries stored in EEPROM
● Reset counter by turning off MCU shortly
after write of counter started, where cell is
erased but not written yet
● Mitigate: Constant time for comparison,
S&G Titan PivotBolt [by Plore]
hashed secrets
[by Plore]
* See Talk “DEF CON 24 - Plore - Side channel attacks on high security electronic safe locks” by Plore
Protection
Protection*
○ Buffer/Stack Overflow Protection, heap overflow protection
■ Use safe equivalent functions (gets()->fgets())
■ Verify buffer bounds
■ Secure compiler flags (-fPIE, -fstack-protector-all, -Wl,-z,noecexstack,
-Wl,-z,noexecheap,..)
■ See https://wiki.debian.org/Hardening#Using_Hardening_Options
* See Talk “AppSec EU 2017 Don't Get Caught Em-bed” by Aaron Guzman
Protection*
○ Firmware Updates with cryptographic signatures, update over TLS
■ Force updates for high critical bugs
■ Anti-rollback protection
■ Infrastructure with pub-priv key for verifying signed packages
■ Don't Roll Your Own Crypto!
* See Talk “AppSec EU 2017 Don't Get Caught Em-bed” by Aaron Guzman
Protection*
○ Identity Management
■ Separate accounts for internal/remote web management, internal/remote console access
■ No sessionIDs/Tokens/Cookies in URL (can be replayed)
■ Tokens should be randomized, and invalidated on logout
■ Secure and complex password for accessing UART, EEPROM, ssh
■ Each device: individual secret (one device’s gets hacked, the others stay safe)
* See Talk “AppSec EU 2017 Don't Get Caught Em-bed” by Aaron Guzman
Protection*
○ Keep kernel, frameworks & libraries up to date
■ Use package managers opkg, ipkg
■ Check against vulnerabilities DBs
■ Load tools to check third party code and components (retirejs, libscanner, nsp, lynis, owasp
zap, ..),
○ Threat modeling
* See Talk “AppSec EU 2017 Don't Get Caught Em-bed” by Aaron Guzman
Take-aways
● There is always a way to hack a system, just a matter of cost and time
Questions?
Ressources
● https://www.owasp.org/index.php/OWASP_Embedded_Application_Security
● http://www.sharcs-project.eu/m/documents/papers/a01-cojocar.p df (Off-the-shelf Embedded
Devices as Platforms for Security Research)
● https://www.handymanhowto.com/how-to-fix-a-bricked-hikvision-ip-camera-firmware/
● http://jcjc-dev.com/2016/06/08/reversing-huawei-4-dumping-flash/
● http://konukoii.com/blog/2018/02/16/5-min-tutorial-root-via-uart/
Recommended Talks
● “34C3 - Unleash your smart-home devices: Vacuum Cleaning Robot Hacking” by Dennis Giese,
Daniel Wegemer from TU Darmstadt
● “Hardware Hacking - Extracting Information From Chips“ by Dmitry Nedospasov
● “Lockpicking in the IoT...or why adding BTLE to a device sometimes isn't smart at all“ by Ray
● “DEF CON 24 - Plore - Side channel attacks on high security electronic safe locks” by Plore
● Hack All The Things: 20 Devices in 45 Minutes
● “Black Hat 2013 - Exploiting Network Surveillance Cameras Like a Hollywood Hacker” by Craig
Heffner