SlideShare a Scribd company logo
Attacking Embedded Systems: 
No Axe Required 
Paul Asadoorian 
Special thanks to Allison Nixon, Craig Heffner & Robert Kornmeyer
Copyright 2013 
Paul Asadoorian 
• Day Job: Tenable Network Security Product Evangelist (Primarily Nessus) 
• Founder of Security Weekly(weekly podcast, Internet TV) 
• Gets hands dirty on penetration tests 
• Loves family, embedded devices, cigars, fishing and Kung Fu movies
Attacking Embedded Systems 
FACT: Embedded systems security stinks.
Attacking Embedded Systems 
GOAL: Give you methods to finding 
embedded device vulnerabilities easily.
Copyright 2013 
Topics We Will Cover 
• Why should you care about embedded device 
vulnerabilities? 
• Detection & Enumeration 
• Combat Firmware Analysis 
• Light Reverse Engineering: Ripping apart firmware, 
emulating firmware
Why We Care About Embedded 
Device Vulnerabilities
Hacking Like its 1999 
Copyright 2013 
• Devices ship with all sorts of 
vulnerabilities (buffer overflows, 
command injection, CSRF) 
• Small footprint means security it 
often left out (ASLR, DEP) 
• High occurrence of re-use (esp. 
on Linux devices, someone gets 
it working once and no one 
wants to change)
No One Pays Attention 
Copyright 2013 
• If it ain’t broke... 
• Dedicated devices often just work, 
updates break things 
• They receive a lower priority to 
patching desktops and servers 
• They don’t contain sensitive data 
(dangerous notion!) 
• End users don’t even know they can 
be updated
Critical Path (Direct and 
Copyright 2013 
Indirect) 
• Sensitive data passes through 
devices (printers, WAPs, 
switches, routers) 
• Attackers use them to gain a 
foothold (proxies, sniff passwords, 
scan the network) 
• Easily allows attackers to monitor 
(web cameras, video 
teleconferencing) 
Evil Router
Copyright 2013 
Getting Worse? 
http://securityevaluators.com/content/case-studies/routers/soho_router_hacks.jsp
Doomed To Repeat 
Independent Security Evaluators (ISE), which is a security consultancy based in Baltimore, found that all 
of the routers they tested could be taken over if the hacker had access credentials. The tested products 
came from Linksys, Belkin, Netgear, Verizon and D-Link. (April 2013) 
Phil Perviance, Application Security Consultant, AppSec Consulting, Inc. discloses 5 vulnerabilities in 
Linksys routers. Cisco does not issue fixes (April 2013) 
Unnamed researcher used a simple, binary technique to take control of more than 420,000 insecure 
devices including Webcams, routers, and printers running on the Internet (March 2013) 
In March, 2013, Michael Messner disclosed vulnerabilities ranging from minor to critical in D-Link, TP-Link, 
In January, 2013, HD Moore disclosed that numerous home routers exposed UPnP services, including 
SSDP Discovery and SOAP, to the Internet (WAN) side of the device. 
In January, 2013, DefenseCode released an advisory describing a remote, unauthenticated format string 
vulnerability in the Broadcom UPnP software that escalated to root shell access. 
In May, 2012, it was disclosed that WiFi Protected Setup (WPS) uses an eight-digit PIN for authentication, 
and an attacker can determine if the first four digits of an attempted PIN are correct, without regard to the 
last four 
At BlackHat 2012, Phil Purviance (Superevr) demonstrated a cross-site file upload vulnerability in the 
Linksys WRT54GL. 
At BlackHat 2009, Felix Lindner explored the feasibility and techniques that could be used to attack 
commercial grade routers. 
Copyright 2013 
Netgear, and Linksys routers. 
Primary Source: http://securityevaluators.com/content/case-studies/routers/soho_router_hacks.jsp
Detection & Enumeration
Copyright 2013 
Identify The Device: 
Passive 
• DNS Recon - Zone transfer, brute force forward lookups, 
reverse lookup IPs 
• Look for devices with suspicious names (router, camera, 
video teleconference related) 
• Search public sources of information 
• Forum post: “We just bought a new XYZ device” 
• Public web page 
• Shodan: “net:<cidr range>”
Identify The Device: Active 
• Nessus 
• I wrote an article: Scanning Embedded Systems In The Enterprise With 
Copyright 2013 
Nessus (http://bit.ly/10nRtdT) 
• Nmap 
• nmap -P0 -vv -sS -r -n -p 1-65535 192.168.1.7 
• nmap -P0 -T5 -sU -r -n -p 1-1024 192.168.1.7 
• Peeper.py (https://github.com/invisiblethreat/peeper) 
• Takes screenshots of all web sites in Nessus results 
• recon-ng - General purposes recon tool
Nessus 5.2: Web Screenshot 
Copyright 2013
Other People’s Research 
• Once you identify the device, see if others have reverse 
engineered the firmware 
• Or disclosed vulnerabilities 
• Great resources: 
• http://www.devttys0.com 
• http://this8bitlife.com/adventures-in-linux-reverse-engineering-firmware/ 
• http://www.digitalworldz.co.uk/47718-looking-inside-jffs2-images.html 
• http://bramp.net/blog/2012/01/hacking-linksys-e4200v2-firmware/ 
• http://wiki.securityweekly.com/wiki/index.php/Episode320#Interview:_Crai 
g_Heffner < Interview w/ binwalk author Copyright 2013
Determine Device Type 
Copyright 2013 
• Visit web configuration screen 
• Banners: 
• SNMP 
• FTP 
• TELNET 
• SSH 
• Is it running FOSS that has known vulnerabilities?
Copyright 2013 
TELNET Exposed
Web Interface Exposed 
Copyright 2013
Conference Room Exposed 
Copyright 2013
Copyright 2013 
RTFM
Copyright 2013 
Offline Work 
• Visit manufacturers web site: 
• Read manuals (default passwords? Win!) 
• Review software license (GNU software? Runs Linux!) 
Download firmware - Starts an entirely new process, we won’t cover debugging 
with IDA, but quicker wins
Combat Firmware Analysis
Basic Analysis: strings 
Copyright 2013 
$ strings -8 firmware.bin | grep "^/" | less 
/webauth/login.htm 
/webauth/login_fail.htm 
/webauth/login_fail_held.htm 
/webauth/login_full.htm 
/webauth/login_success.htm 
/webauth/login.htm?oriurl= 
Find all lines with 8 
characters or more that 
begin with “/”.
Find Authentication Bypass 
Copyright 2013 
#!/bin/bash 
PAGES=`cat webfiles` 
for p in $PAGES 
do 
wget http://192.168.1.7$p 
done 
“webfiles” contains all web page URLs dumped from 
firmware
Basic Analysis: hexdump 
File system headers, boot devices, firmware type, etc... 
Copyright 2013
Copyright 2013 
Basic Analysis: grep 
# grep --binary-files=text -bi "vxworks" ram.bin 
# grep –binary-files=text -bi -A 50 "password" ram.bin 
13899779:username admin password 7 
21232f297a57a5a743894a0e4a801fc313899840- 
username guest access-level 
013899870:username guest password 7 
084e0343a0486ff05530df6c705c8bb413899931: 
enable password level 15 7 1b3231655cebb7a1f783eddf27d254ca
Light Firmware Analysis
Firmware Parts 
Flash Device (MTD) 
Boot Loader 
u-boot 
nvram Kernel File system nvram 
Firmware 
nvram(1): used to store information for the BIOS (such as booting 
instructions, e.g. how long to wait) 
Boot Loader: Boots up the kernel, u-boot, redboot, etc.. 
Kernel: Linux, VxWorks or other OS specific kernel. 
File System: Squashfs, CramFS, usually compressed, sometimes more than 
one 
nvram(2) - Stores device settings permanently on MTD 
Reference: http://wiki.openwrt.org/doc/techref/start
Basic Firmware Analysis 
# binwalk DIR-850L_FW_v1.03b02.bin DECIMAL HEX 
DESCRIPTION--------------------------------------------------------------------------- 
---------------------------------------- 
0 0x0 DLOB firmware header, boot partition: "dev=/dev/mtdblock/ 
1"589 0x24D LZMA compressed data, properties: 0x88, dictionary size: 
1048576 bytes, uncompressed size: 65535 bytes10376 0x2888 LZMA compressed 
data, properties: 0x5D, dictionary size: 8388608 bytes, uncompressed size: 5034652 
bytes1638512 0x190070 PackImg section delimiter tag, little endian size: 
12610048 bytes; big endian size: 6995968 bytes1638544 0x190090 Squashfs 
filesystem, little endian, version 4.0, compression: lzma, size: 6992339 bytes, 2435 
inodes, blocksize: 131072 bytes, created: Tue Mar 12 06:45:03 2013 
http://wiki.securityweekly.com/wiki/index.php/Reverse_Engineering_Firmware_Primer 
Copyright 2013
Copyright 2013 
Extract File System 
# binwalk --dd=squashfs:1 DIR-850L_FW_v1.03b02.bin 
# cd _DIR-850L_FW_v1.03b02.bin.extracted/# file 190090.1 
190090.1: Squashfs filesystem, little endian, version 4.0, 
1778655743 bytes, 2435 inodes, blocksize: 0 bytes, created: 
Mon Sep 21 17:59:44 2026 
Apply this method to several types of firmware to extract 
file system and mount it. 
sqaushfs and cramfs are easier. JFFS2 is a PITA.
Copyright 2013 
Firmware Toolkit 
• Now we understand at least one building block 
• Time to automate! 
• Works best with home routers and access points 
• Firmware toolkit is a collection of scripts and tools to 
extract firmware: 
• Firmware headers 
• Kernel 
• File system
Copyright 2013 
Firmware Magic 
# ./extract-ng.sh DIR-850L_FW_v1.03b02.bin 
Firmware Mod Kit (build-ng) 0.78 beta, (c)2011-2012 Craig Heffner, Jeremy Collake 
http://www.bitsum.com 
Scanning firmware... 
DECIMAL HEX DESCRIPTION 
-------------------------------------------------------------------------------------- 
0 0x0 DLOB firmware header, signature=wrgac05_dlob.hans_dir850l, 
dev=/dev/mtdblock/1 
1638544 0x190090 Squashfs filesystem, little endian, version 4.0, compression: 
lzma, size: 6992339 bytes, 2435 inodes, blocksize: 131072 bytes, created: Tue Mar 12 
06:45:03 2013 
Extracting 1638544 bytes of dlob header image at offset 0 
Extracting squashfs file system at offset 1638544 
Extracting squashfs files... 
Firmware extraction successful! 
Firmware parts can be found in 'fmk/*' 
Mounts file systems for you!
File System Treasures 
Copyright 2013 
• Configuration files 
• Password files 
• SSL and SSH keys 
• Web server pages and code 
• Reverse engineer binaries 
• Load binaries in a debugger 
• Run strings against binaries
Copyright 2013 
qemu is Your Friend 
• Run ARM or MIPS binaries on your i386 system 
• Allows you to debug them too 
• And run the web server 
• Then test using something like Burp 
• Test devices without actually having the device! 
• Find vulnerabilities pre-purchase 
# chroot . ./qemu-mips-static sbin/httpd -f 
var/run/httpd.conf 
# ./qemu-mips-static bin/ls
Enumerate The Web Pages 
Copyright 2013 
• root@ubuntu:/usr/src/firmware-mod-kit-read-only/ 
trunk/fmk/rootfs/htdocs# ls 
• cgibin HNAP1 neap phplib 
upnpdevdesc web webinc 
• fileaccess.cgi mydlink parentalcontrols upnp 
upnpinc webaccess widget 
Review source code for vulnerabilities!
Copyright 2013 
Metasploit Payloads 
• Metasploit now has a MIPS payload 
• http://bit.ly/ZE9zVN 
• Several web command execution vulnerabilities 
• Post-exploitation for embedded systems
Copyright 2013 
The Sequel? 
• We didn’t cover: 
• Manually extracting parts from unknown firmware 
• Manually mounting file systems (tips and tricks) 
• Running ARM firmware in full emulation 
• Debugging binaries 
• Stay tuned...
Copyright 2013 
consulting@pauldotcom.com 
Listen: http://securityweekly.com/podcast 
Watch: http://blip.tv/securityweekly 
Read: http://securityweekly.com/wiki 
Participate: http://mail.securityweekly.com

More Related Content

What's hot (20)

PDF
IOT Exploitation
Cysinfo Cyber Security Community
 
PDF
CODE BLUE 2014 : DeviceDisEnabler : A hypervisor which hides devices to prote...
CODE BLUE
 
PPTX
Offence oriented Defence
SensePost
 
PDF
Privacy and Security in the Internet of Things / Конфиденциальность и безопас...
Positive Hack Days
 
PPTX
Fingerprinting and Attacking a Healthcare Infrastructure
Positive Hack Days
 
PPTX
NFC: Naked Fried Chicken / Пентест NFC — вот что я люблю
Positive Hack Days
 
PPTX
Rat a-tat-tat
SensePost
 
PPTX
Exploiting Redundancy Properties of Malicious Infrastructure for Incident Det...
Positive Hack Days
 
PDF
Gone in a flash pdf
AndrewRJamieson
 
PDF
Defcon 22-tim-mcguffin-one-man-shop
Priyanka Aash
 
PDF
Defcon 22-cesar-cerrudo-hacking-traffic-control-systems
Priyanka Aash
 
PPTX
BlueHat v17 || Extracting Secrets from Silicon – A New Generation of Bug Hunt...
BlueHat Security Conference
 
PDF
CODE BLUE 2014 : [Keynote] IDA and digital security by Ilfak Guilfanov
CODE BLUE
 
PDF
Kochetova+osipv atm how_to_make_the_fraud__final
PacSecJP
 
PPTX
[2.2] Hacking Internet of Things devices - Ivan Novikov
OWASP Russia
 
PDF
44CON London 2015 - Inside Terracotta VPN
44CON
 
PDF
Hacker tool talk: kismet
Chris Hammond-Thrasher
 
PDF
CSW2017 Geshev+Miller logic bug hunting in chrome on android
CanSecWest
 
PDF
IoT Security – It’s in the Stars! 16_9 v201605241355
AndrewRJamieson
 
PPTX
Internet Accessible ICS in Japan (English)
Digital Bond
 
CODE BLUE 2014 : DeviceDisEnabler : A hypervisor which hides devices to prote...
CODE BLUE
 
Offence oriented Defence
SensePost
 
Privacy and Security in the Internet of Things / Конфиденциальность и безопас...
Positive Hack Days
 
Fingerprinting and Attacking a Healthcare Infrastructure
Positive Hack Days
 
NFC: Naked Fried Chicken / Пентест NFC — вот что я люблю
Positive Hack Days
 
Rat a-tat-tat
SensePost
 
Exploiting Redundancy Properties of Malicious Infrastructure for Incident Det...
Positive Hack Days
 
Gone in a flash pdf
AndrewRJamieson
 
Defcon 22-tim-mcguffin-one-man-shop
Priyanka Aash
 
Defcon 22-cesar-cerrudo-hacking-traffic-control-systems
Priyanka Aash
 
BlueHat v17 || Extracting Secrets from Silicon – A New Generation of Bug Hunt...
BlueHat Security Conference
 
CODE BLUE 2014 : [Keynote] IDA and digital security by Ilfak Guilfanov
CODE BLUE
 
Kochetova+osipv atm how_to_make_the_fraud__final
PacSecJP
 
[2.2] Hacking Internet of Things devices - Ivan Novikov
OWASP Russia
 
44CON London 2015 - Inside Terracotta VPN
44CON
 
Hacker tool talk: kismet
Chris Hammond-Thrasher
 
CSW2017 Geshev+Miller logic bug hunting in chrome on android
CanSecWest
 
IoT Security – It’s in the Stars! 16_9 v201605241355
AndrewRJamieson
 
Internet Accessible ICS in Japan (English)
Digital Bond
 

Viewers also liked (18)

PDF
How To Do A Podcast - Bsides RI 2013
Security Weekly
 
PPTX
Pwn phone2014 jrs
Security Weekly
 
PDF
Robots, Ninjas, Pirates and Building an Effective Vulnerability Management Pr...
Security Weekly
 
PPT
Give Me Three Things: Anti-Virus Bypass Made Easy
Security Weekly
 
PPTX
Educational justice
aliciamcooper
 
ODP
Impacto web 3.0
Jeffer Ramos
 
ODP
unidad estudio de la web
Jeffer Ramos
 
PPT
PPP for Infrastructure Projects
Sreenath Sreenivasan
 
DOCX
Investigacion2 hoja de calculo
Jeffer Ramos
 
PPTX
Glutamato
Valeria Covarrubias
 
PPT
FINAL PROJECT
Sreenath Sreenivasan
 
PPTX
PACE-IT: Securing the Workstation
Pace IT at Edmonds Community College
 
PPTX
Pace IT - Setting Up a SOHO Network
Pace IT at Edmonds Community College
 
PPTX
Network Security: Protecting SOHO Networks
Jim Gilsinn
 
PPT
Qatar Presentation
guestef71b3
 
PPTX
Simon Ourian
Epione Beverly hills
 
PDF
He thong hochiki fire net
Tuan Vu
 
PPT
Smartphone marketing generic epic
EpicPay
 
How To Do A Podcast - Bsides RI 2013
Security Weekly
 
Pwn phone2014 jrs
Security Weekly
 
Robots, Ninjas, Pirates and Building an Effective Vulnerability Management Pr...
Security Weekly
 
Give Me Three Things: Anti-Virus Bypass Made Easy
Security Weekly
 
Educational justice
aliciamcooper
 
Impacto web 3.0
Jeffer Ramos
 
unidad estudio de la web
Jeffer Ramos
 
PPP for Infrastructure Projects
Sreenath Sreenivasan
 
Investigacion2 hoja de calculo
Jeffer Ramos
 
FINAL PROJECT
Sreenath Sreenivasan
 
PACE-IT: Securing the Workstation
Pace IT at Edmonds Community College
 
Pace IT - Setting Up a SOHO Network
Pace IT at Edmonds Community College
 
Network Security: Protecting SOHO Networks
Jim Gilsinn
 
Qatar Presentation
guestef71b3
 
Simon Ourian
Epione Beverly hills
 
He thong hochiki fire net
Tuan Vu
 
Smartphone marketing generic epic
EpicPay
 
Ad

Similar to Attacking Embedded Devices (No Axe Required) (20)

PDF
Filip palian mateuszkocielski. simplest ownage human observed… routers
Yury Chemerkin
 
PDF
Simplest-Ownage-Human-Observed… - Routers
Logicaltrust pl
 
PPTX
Steelcon 2015 - 0wning the internet of trash
infodox
 
PDF
DEF CON 27 - DANIEL ROMERO and MARIO RIVAS - why you should fear your mundane...
Felipe Prado
 
PDF
Beginners guide on how to start exploring IoT 2nd session
veerababu penugonda(Mr-IoT)
 
PDF
CSI - Poor Mans Guide To Espionage Gear
shawn_merdinger
 
PPTX
Analyzing Vulnerabilities in the Internet of Things
Ike Clinton
 
ODP
Cracking Into Embedded Devices - HACK.LU 2K8
guest441c58b71
 
PDF
CSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoT
CanSecWest
 
PPT
Csi Netsec 2006 Poor Mans Guide Merdinger
shawn_merdinger
 
PPTX
Advanced SOHO Router Exploitation XCON
Lyon Yang
 
PDF
0day hunting a.k.a. The story of a proper CPE test
Balazs Bucsay
 
PDF
0Day Hunting A.K.A. The Story of a Proper CPE Test by Balazs Bacsay
Shakacon
 
PDF
DefCon 2012 - Hardware Backdooring (Slides)
Michael Smith
 
PPTX
The internet of $h1t
Amit Serper
 
PDF
CODE BLUE 2014 : Embedded Security in The Land of the Rising Sun by BEN SCHMI...
CODE BLUE
 
PDF
DefCon 2012 - Rooting SOHO Routers
Michael Smith
 
PDF
44CON 2014 - Switches Get Stitches, Eireann Leverett & Matt Erasmus
44CON
 
PPTX
BSides Hannover 2015 - Shell on Wheels
infodox
 
PDF
Hardware Hacking Chronicles: IoT Hacking for Offence and Defence
Fatih Ozavci
 
Filip palian mateuszkocielski. simplest ownage human observed… routers
Yury Chemerkin
 
Simplest-Ownage-Human-Observed… - Routers
Logicaltrust pl
 
Steelcon 2015 - 0wning the internet of trash
infodox
 
DEF CON 27 - DANIEL ROMERO and MARIO RIVAS - why you should fear your mundane...
Felipe Prado
 
Beginners guide on how to start exploring IoT 2nd session
veerababu penugonda(Mr-IoT)
 
CSI - Poor Mans Guide To Espionage Gear
shawn_merdinger
 
Analyzing Vulnerabilities in the Internet of Things
Ike Clinton
 
Cracking Into Embedded Devices - HACK.LU 2K8
guest441c58b71
 
CSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoT
CanSecWest
 
Csi Netsec 2006 Poor Mans Guide Merdinger
shawn_merdinger
 
Advanced SOHO Router Exploitation XCON
Lyon Yang
 
0day hunting a.k.a. The story of a proper CPE test
Balazs Bucsay
 
0Day Hunting A.K.A. The Story of a Proper CPE Test by Balazs Bacsay
Shakacon
 
DefCon 2012 - Hardware Backdooring (Slides)
Michael Smith
 
The internet of $h1t
Amit Serper
 
CODE BLUE 2014 : Embedded Security in The Land of the Rising Sun by BEN SCHMI...
CODE BLUE
 
DefCon 2012 - Rooting SOHO Routers
Michael Smith
 
44CON 2014 - Switches Get Stitches, Eireann Leverett & Matt Erasmus
44CON
 
BSides Hannover 2015 - Shell on Wheels
infodox
 
Hardware Hacking Chronicles: IoT Hacking for Offence and Defence
Fatih Ozavci
 
Ad

Recently uploaded (20)

PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
July Patch Tuesday
Ivanti
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Biography of Daniel Podor.pdf
Daniel Podor
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 

Attacking Embedded Devices (No Axe Required)

  • 1. Attacking Embedded Systems: No Axe Required Paul Asadoorian Special thanks to Allison Nixon, Craig Heffner & Robert Kornmeyer
  • 2. Copyright 2013 Paul Asadoorian • Day Job: Tenable Network Security Product Evangelist (Primarily Nessus) • Founder of Security Weekly(weekly podcast, Internet TV) • Gets hands dirty on penetration tests • Loves family, embedded devices, cigars, fishing and Kung Fu movies
  • 3. Attacking Embedded Systems FACT: Embedded systems security stinks.
  • 4. Attacking Embedded Systems GOAL: Give you methods to finding embedded device vulnerabilities easily.
  • 5. Copyright 2013 Topics We Will Cover • Why should you care about embedded device vulnerabilities? • Detection & Enumeration • Combat Firmware Analysis • Light Reverse Engineering: Ripping apart firmware, emulating firmware
  • 6. Why We Care About Embedded Device Vulnerabilities
  • 7. Hacking Like its 1999 Copyright 2013 • Devices ship with all sorts of vulnerabilities (buffer overflows, command injection, CSRF) • Small footprint means security it often left out (ASLR, DEP) • High occurrence of re-use (esp. on Linux devices, someone gets it working once and no one wants to change)
  • 8. No One Pays Attention Copyright 2013 • If it ain’t broke... • Dedicated devices often just work, updates break things • They receive a lower priority to patching desktops and servers • They don’t contain sensitive data (dangerous notion!) • End users don’t even know they can be updated
  • 9. Critical Path (Direct and Copyright 2013 Indirect) • Sensitive data passes through devices (printers, WAPs, switches, routers) • Attackers use them to gain a foothold (proxies, sniff passwords, scan the network) • Easily allows attackers to monitor (web cameras, video teleconferencing) Evil Router
  • 10. Copyright 2013 Getting Worse? http://securityevaluators.com/content/case-studies/routers/soho_router_hacks.jsp
  • 11. Doomed To Repeat Independent Security Evaluators (ISE), which is a security consultancy based in Baltimore, found that all of the routers they tested could be taken over if the hacker had access credentials. The tested products came from Linksys, Belkin, Netgear, Verizon and D-Link. (April 2013) Phil Perviance, Application Security Consultant, AppSec Consulting, Inc. discloses 5 vulnerabilities in Linksys routers. Cisco does not issue fixes (April 2013) Unnamed researcher used a simple, binary technique to take control of more than 420,000 insecure devices including Webcams, routers, and printers running on the Internet (March 2013) In March, 2013, Michael Messner disclosed vulnerabilities ranging from minor to critical in D-Link, TP-Link, In January, 2013, HD Moore disclosed that numerous home routers exposed UPnP services, including SSDP Discovery and SOAP, to the Internet (WAN) side of the device. In January, 2013, DefenseCode released an advisory describing a remote, unauthenticated format string vulnerability in the Broadcom UPnP software that escalated to root shell access. In May, 2012, it was disclosed that WiFi Protected Setup (WPS) uses an eight-digit PIN for authentication, and an attacker can determine if the first four digits of an attempted PIN are correct, without regard to the last four At BlackHat 2012, Phil Purviance (Superevr) demonstrated a cross-site file upload vulnerability in the Linksys WRT54GL. At BlackHat 2009, Felix Lindner explored the feasibility and techniques that could be used to attack commercial grade routers. Copyright 2013 Netgear, and Linksys routers. Primary Source: http://securityevaluators.com/content/case-studies/routers/soho_router_hacks.jsp
  • 13. Copyright 2013 Identify The Device: Passive • DNS Recon - Zone transfer, brute force forward lookups, reverse lookup IPs • Look for devices with suspicious names (router, camera, video teleconference related) • Search public sources of information • Forum post: “We just bought a new XYZ device” • Public web page • Shodan: “net:<cidr range>”
  • 14. Identify The Device: Active • Nessus • I wrote an article: Scanning Embedded Systems In The Enterprise With Copyright 2013 Nessus (http://bit.ly/10nRtdT) • Nmap • nmap -P0 -vv -sS -r -n -p 1-65535 192.168.1.7 • nmap -P0 -T5 -sU -r -n -p 1-1024 192.168.1.7 • Peeper.py (https://github.com/invisiblethreat/peeper) • Takes screenshots of all web sites in Nessus results • recon-ng - General purposes recon tool
  • 15. Nessus 5.2: Web Screenshot Copyright 2013
  • 16. Other People’s Research • Once you identify the device, see if others have reverse engineered the firmware • Or disclosed vulnerabilities • Great resources: • http://www.devttys0.com • http://this8bitlife.com/adventures-in-linux-reverse-engineering-firmware/ • http://www.digitalworldz.co.uk/47718-looking-inside-jffs2-images.html • http://bramp.net/blog/2012/01/hacking-linksys-e4200v2-firmware/ • http://wiki.securityweekly.com/wiki/index.php/Episode320#Interview:_Crai g_Heffner < Interview w/ binwalk author Copyright 2013
  • 17. Determine Device Type Copyright 2013 • Visit web configuration screen • Banners: • SNMP • FTP • TELNET • SSH • Is it running FOSS that has known vulnerabilities?
  • 19. Web Interface Exposed Copyright 2013
  • 20. Conference Room Exposed Copyright 2013
  • 22. Copyright 2013 Offline Work • Visit manufacturers web site: • Read manuals (default passwords? Win!) • Review software license (GNU software? Runs Linux!) Download firmware - Starts an entirely new process, we won’t cover debugging with IDA, but quicker wins
  • 24. Basic Analysis: strings Copyright 2013 $ strings -8 firmware.bin | grep "^/" | less /webauth/login.htm /webauth/login_fail.htm /webauth/login_fail_held.htm /webauth/login_full.htm /webauth/login_success.htm /webauth/login.htm?oriurl= Find all lines with 8 characters or more that begin with “/”.
  • 25. Find Authentication Bypass Copyright 2013 #!/bin/bash PAGES=`cat webfiles` for p in $PAGES do wget http://192.168.1.7$p done “webfiles” contains all web page URLs dumped from firmware
  • 26. Basic Analysis: hexdump File system headers, boot devices, firmware type, etc... Copyright 2013
  • 27. Copyright 2013 Basic Analysis: grep # grep --binary-files=text -bi "vxworks" ram.bin # grep –binary-files=text -bi -A 50 "password" ram.bin 13899779:username admin password 7 21232f297a57a5a743894a0e4a801fc313899840- username guest access-level 013899870:username guest password 7 084e0343a0486ff05530df6c705c8bb413899931: enable password level 15 7 1b3231655cebb7a1f783eddf27d254ca
  • 29. Firmware Parts Flash Device (MTD) Boot Loader u-boot nvram Kernel File system nvram Firmware nvram(1): used to store information for the BIOS (such as booting instructions, e.g. how long to wait) Boot Loader: Boots up the kernel, u-boot, redboot, etc.. Kernel: Linux, VxWorks or other OS specific kernel. File System: Squashfs, CramFS, usually compressed, sometimes more than one nvram(2) - Stores device settings permanently on MTD Reference: http://wiki.openwrt.org/doc/techref/start
  • 30. Basic Firmware Analysis # binwalk DIR-850L_FW_v1.03b02.bin DECIMAL HEX DESCRIPTION--------------------------------------------------------------------------- ---------------------------------------- 0 0x0 DLOB firmware header, boot partition: "dev=/dev/mtdblock/ 1"589 0x24D LZMA compressed data, properties: 0x88, dictionary size: 1048576 bytes, uncompressed size: 65535 bytes10376 0x2888 LZMA compressed data, properties: 0x5D, dictionary size: 8388608 bytes, uncompressed size: 5034652 bytes1638512 0x190070 PackImg section delimiter tag, little endian size: 12610048 bytes; big endian size: 6995968 bytes1638544 0x190090 Squashfs filesystem, little endian, version 4.0, compression: lzma, size: 6992339 bytes, 2435 inodes, blocksize: 131072 bytes, created: Tue Mar 12 06:45:03 2013 http://wiki.securityweekly.com/wiki/index.php/Reverse_Engineering_Firmware_Primer Copyright 2013
  • 31. Copyright 2013 Extract File System # binwalk --dd=squashfs:1 DIR-850L_FW_v1.03b02.bin # cd _DIR-850L_FW_v1.03b02.bin.extracted/# file 190090.1 190090.1: Squashfs filesystem, little endian, version 4.0, 1778655743 bytes, 2435 inodes, blocksize: 0 bytes, created: Mon Sep 21 17:59:44 2026 Apply this method to several types of firmware to extract file system and mount it. sqaushfs and cramfs are easier. JFFS2 is a PITA.
  • 32. Copyright 2013 Firmware Toolkit • Now we understand at least one building block • Time to automate! • Works best with home routers and access points • Firmware toolkit is a collection of scripts and tools to extract firmware: • Firmware headers • Kernel • File system
  • 33. Copyright 2013 Firmware Magic # ./extract-ng.sh DIR-850L_FW_v1.03b02.bin Firmware Mod Kit (build-ng) 0.78 beta, (c)2011-2012 Craig Heffner, Jeremy Collake http://www.bitsum.com Scanning firmware... DECIMAL HEX DESCRIPTION -------------------------------------------------------------------------------------- 0 0x0 DLOB firmware header, signature=wrgac05_dlob.hans_dir850l, dev=/dev/mtdblock/1 1638544 0x190090 Squashfs filesystem, little endian, version 4.0, compression: lzma, size: 6992339 bytes, 2435 inodes, blocksize: 131072 bytes, created: Tue Mar 12 06:45:03 2013 Extracting 1638544 bytes of dlob header image at offset 0 Extracting squashfs file system at offset 1638544 Extracting squashfs files... Firmware extraction successful! Firmware parts can be found in 'fmk/*' Mounts file systems for you!
  • 34. File System Treasures Copyright 2013 • Configuration files • Password files • SSL and SSH keys • Web server pages and code • Reverse engineer binaries • Load binaries in a debugger • Run strings against binaries
  • 35. Copyright 2013 qemu is Your Friend • Run ARM or MIPS binaries on your i386 system • Allows you to debug them too • And run the web server • Then test using something like Burp • Test devices without actually having the device! • Find vulnerabilities pre-purchase # chroot . ./qemu-mips-static sbin/httpd -f var/run/httpd.conf # ./qemu-mips-static bin/ls
  • 36. Enumerate The Web Pages Copyright 2013 • root@ubuntu:/usr/src/firmware-mod-kit-read-only/ trunk/fmk/rootfs/htdocs# ls • cgibin HNAP1 neap phplib upnpdevdesc web webinc • fileaccess.cgi mydlink parentalcontrols upnp upnpinc webaccess widget Review source code for vulnerabilities!
  • 37. Copyright 2013 Metasploit Payloads • Metasploit now has a MIPS payload • http://bit.ly/ZE9zVN • Several web command execution vulnerabilities • Post-exploitation for embedded systems
  • 38. Copyright 2013 The Sequel? • We didn’t cover: • Manually extracting parts from unknown firmware • Manually mounting file systems (tips and tricks) • Running ARM firmware in full emulation • Debugging binaries • Stay tuned...
  • 39. Copyright 2013 [email protected] Listen: http://securityweekly.com/podcast Watch: http://blip.tv/securityweekly Read: http://securityweekly.com/wiki Participate: http://mail.securityweekly.com