FirmAE is a fully-automated framework that performs emulation and vulnerability analysis. FirmAE significantly increases the emulation success rate (From Firmadyne's 16.28% to 79.36%) with five arbitration techniques. We tested FirmAE on 1,124 wireless-router and IP-camera firmware images from top eight vendors.
We also developed a dynamic analysis tool for 0-day discovery, which infers web service information based on the filesystem and kernel logs of target firmware. By running our tool on the succesfully emulation firmware images, we discovered 12 new 0-days which affect 23 devices.
Note that we tested FirmAE on Ubuntu 18.04.
- Clone
FirmAE
$ git clone --recursive https://github.com/pr0v3rbs/FirmAE
- Run
download.sh
script.
$ ./download.sh
- Run
install.sh
script.
$ ./install.sh
- Execute
init.sh
script.
$ ./init.sh
- Prepare a firmware.
$ wget https://github.com/pr0v3rbs/FirmAE/releases/download/v1.0/DIR-868L_fw_revB_2-05b02_eu_multi_20161117.zip
- Check emulation
$ sudo ./run.sh -c <brand> <firmware>
-
Analyze the target firmware
- Analysis mode uses the FirmAE analyzer
$ sudo ./run.sh -a <brand> <firmware>
- Run mode helps to test web service or execute custom analyzer
$ sudo ./run.sh -r <brand> <firmware>
After run.sh -c
finished.
- User-level basic debugging utility. (Useful when an emulated firmware is network reachable)
$ sudo ./run.sh -d <brand> <firmware>
- Kernel-level boot debugging.
$ sudo ./run.sh -b <brand> <firmware>
Check the five arbitrations environment variable in the firmae.config
$ head firmae.config
#!/bin/sh
FIRMAE_BOOT=true
FIRMAE_NETWORK=true
FIRMAE_NVRAM=true
FIRMAE_KERNEL=true
FIRMAE_ETC=true
if (${FIRMAE_ETC}); then
TIMEOUT=240
First, prepare a docker image.
$ ./docker-init.sh
Then, run one of the below commands. -ec
checks only the emulation, and -ea
checks the emulation and analyzes vulnerabilities.
$ ./docker-helper.py -ec <brand> <firmware>
$ ./docker-helper.py -ea <brand> <firmware>
After a firmware image successfully emulated.
$ ./docker-helper.py -ed <firmware>
Google spreadsheet - view
Google drive - download
- ASUS: CVE-2019-20082
- Belkin: Belkin01
- D-Link: CVE-2018-20114, CVE-2018-19986, CVE-2018-19987, CVE-2018-19988, CVE-2018-19989, CVE-2018-19990, CVE-2019-6258, CVE-2019-20084
- TRENDNet: CVE-2019-11399, CVE-2019-11400
This research project has been conducted by SysSec Lab at KAIST.
We would appreciate if you consider citing our paper when using FirmAE.
@inproceedings{kim:2020:firmae,
author = {Mingeun Kim and Dongkwan Kim and Eunsoo Kim and Suryeon Kim and Yeongjin Jang and Yongdae Kim},
title = {{FirmAE}: Towards Large-Scale Emulation of IoT Firmware for Dynamic Analysis},
booktitle = {Annual Computer Security Applications Conference (ACSAC)},
year = 2020,
month = dec,
address = {Online}
}