(c) SAUMIL SHAH
@DC11332
DEEP DIVE INTO
SAUMIL SHAH
@therealsaumil
15 June 2021
DC11332 meetup
(c) SAUMIL SHAH
@DC11332
# WHO AM I
Saumil Shah
CEO, Net Square
@therealsaumil
educating, entertaining
and exasperating
audiences since 1999
(c) SAUMIL SHAH
@DC11332
A Word From
Our Sponsors
KEEP
CALM
AND
NAMASTE
!
(c) SAUMIL SHAH
@DC11332
Introducing ARMX
• An ARM Firmware Emulation Framework.
• Ultimate Goal - create an IoT VM!
• A Virtual IoT device makes for easy
– runtime analysis
– reverse engineering
– fuzzing
– exploit development
• Gain insight into embedded hardware by
trying to emulate it.
(c) SAUMIL SHAH
@DC11332
(c) SAUMIL SHAH
@DC11332
Inside an IoT device…
(c) SAUMIL SHAH
@DC11332
CPU and
Hardware
Kernel
Drivers
File System
nvram
User Processes
API
UI
libnvram
…same same but different
(c) SAUMIL SHAH
@DC11332
compressed FS
CPU
Kernel
Boot Loader
mounted
FS
nvram
init
scripts
Services
Apps
libnvram
The IoT Boot Up Process
conf
conf
conf
conf
firmware
Loads Kernel.
Uncompresses FS to ramdisk,
invokes init process.
ramdisk
userland
Reads config from nvram.
Builds system config files on
the fly.
Starts up system services.
Invokes Applications and
Application services.
READY
POWER ON
(c) SAUMIL SHAH
@DC11332
QEMU
CPU and
Limited
Hardware
Kernel
Drivers
uncompressed
Filesystem
emulated
nvram
init scripts
Services
Apps
libnvram
Emulation: Goals and Challenges
x
x
x
x
BUILDROOT
Match the kernel with the
one on the device
chroot environment
Implemented as an INI file,
preloaded before "boot up"
conf
conf
Fix to match QEMU environment
Not all drivers load successfully
(c) SAUMIL SHAH
@DC11332
JUST RELEASED!
(c) SAUMIL SHAH
@DC11332
ARMX docker container
(c) SAUMIL SHAH
@DC11332
ARMX directory layout
(c) SAUMIL SHAH
@DC11332
Starting an ARMX device
(c) SAUMIL SHAH
@DC11332
(c) SAUMIL SHAH
@DC11332
QEMU
CPU and
Limited
Hardware
Kernel
Kernel and hostfs ready
hostfs NFS /armx
(c) SAUMIL SHAH
@DC11332
(c) SAUMIL SHAH
@DC11332
QEMU
CPU and
Limited
Hardware
Kernel
Drivers
NFS /armx
emulated
nvram
nvram and userland init scripts
conf
conf
init scripts
libnvram
(c) SAUMIL SHAH
@DC11332
(c) SAUMIL SHAH
@DC11332
QEMU
CPU and
Limited
Hardware
Kernel
Drivers
NFS /armx
emulated
nvram
init scripts
Services
Apps
libnvram
ARM-X: Device "booted up"
x
x
x
x
conf
conf
(c) SAUMIL SHAH
@DC11332
(c) SAUMIL SHAH
@DC11332
(c) SAUMIL SHAH
@DC11332
EYOD
(c) SAUMIL SHAH
@DC11332
Firmware
Firmware
.bin file
from
Web/FTP
UART
Serial
Console
Direct
from
Flash
memory
(c) SAUMIL SHAH
@DC11332
1: Web/FTP site
(c) SAUMIL SHAH
@DC11332
2: Hidden UART interfaces
(c) SAUMIL SHAH
@DC11332
3: Take it directly from the chip!
(c) SAUMIL SHAH
@DC11332
DEMO TIME!
(c) SAUMIL SHAH
@DC11332
HERE BE THE GOODS
https://github.com/therealsaumil/armx
!
Announcements: @therealsaumil
(c) SAUMIL SHAH
@DC11332
Thank you
and … QUESTIONS?
@therealsaumil

Announcing ARMX Docker - DC11332