Getting started with Firmware Emulation for IoT Devices

. 4 min read

In this post, we will have a look at how we can perform Firmware Emulation of a given IoT device.

Firmware Emulation can serve a number of different purposes such as analyzing the firmware in a better way, performing exploitation, performing remote debugging and so on.

With this technique, you can emulate a Firmware originally meant to be run on a different architecture, and interact with it, even without having a physical IoT device.

One of the earlier ways of performing Firmware Emulation was to create a Qemu image and then copy the firmware file system's contents on to the Qemu image and then launch the image.

However, there exists a much simpler alternative which is also prone to give you lesser issues while emulating firmware. Let's have a look.

Tools that you would require:

Setting things up

Once you have all three of the above components, the first step is to set up Firmware Analysis Toolkit.

Firmware Analysis Toolkit is simply a wrapper around the actual project Firmadyne and automates the process of emulating a new firmware.

To download and install FAT, simply clone the git repository recursively as shown below:

git clone --recursive


Next, we will need to setup the individual tools such as Binwalk, Firmadyne and Firmware-Mod-Kit.

Set up Binwalk

To Set Up Binwalk, simply install the dependencies as below and then go ahead and install the tool :

cd firmware-analysis-toolkit/binwalk
sudo ./
sudo python install 

If everything went well, you would be able to run binwalk and receive an output as shown below.


Set up Firmadyne

To setup Firmadyne, navigate to the Firmadyne folder and open up firmadyne.config. It should look as shown in the picture below.


Uncomment the line saying FIRMWARE_DIR=/home/vagrant/firmadyne/ and modify the address to the current path of Firmadyne. The updated line in my case looks like as shown below.


Once you have updated the path, the next step is to download the additional binaries required for Firmadyne to work. This might take a while (1-2 mins on a good internet connection) - so have a coffee (or beer) at this point of time.


Once it is done, the next step is to install the remaining depencies for Firmadyne to function properly:

sudo -H pip install git+
sudo -H pip install git+
sudo apt-get install qemu-system-arm qemu-system-mips qemu-system-x86 qemu-utils

Also set up a PostgreSQL database at this point following the instructions from the official Firmadyne wiki:

sudo apt-get install postgresql
sudo -u postgres createuser -P firmadyne
sudo -u postgres createdb -O firmadyne firmware
sudo -u postgres psql -d firmware < ./firmadyne/database/schema

The password for the database when prompted should be firmadyne (to avoid any later issues).

That is all for the setup of Firmadyne.

Set up Firmware Analysis Toolkit

The first thing that we will do is move the and to inside firmadyne folder.

Once that is done, open up and modify the root password (so that it won't ask you for password while running the script) and specify the path of firmadyne as shown below.


That's all for the setup. Make sure that your postgresql database is up and running


.. and we are good to go.

Emulating a firmware image

All you need to do in order to now emulate a firmware is run ./ and specify the firmware name. In this case, we are running the firmware, so we will specify that.

For the Brand, you can specify any brand, as that is used for purely database purposes.

Your output should be as shown below:


Once it has completed the initial setup process for the firmware, it will provide you with an IP address. In case the firmware runs a web server, you should be able to access the web interface, as well as interact with the firmware over SSH and perform additional network based exploitation.


Let's now open up Firefox and see if we are able to access the web interface.


Congratulations!!! - we have successfully emulated a firmware (which was originally meant for MIPS Big Endian architecture) and even have the web server from within the firmware accessible!

That is all for this blog post. For any further queries, feel free to reach out to us using our contact page .

IoT Penetration Testing and Exploitation training


You can also now sign up for one of our public training bootcamps where you can learn all about IoT Exploitation (Embedded, Firmware, Radio, BLE, ZigBee, Binary etc.) -

Get IoT Security Training

IoT Pentesting Exploitation Training


Android android application security android hands on security and exploitation training android security Apktool application auditing application security auditing appsec usa appwatch attify attify badge attify training binwalk blackberry pentesting blackhat ble BLE hacking and exploitation BLE sniffing box brut Exception chroot cloud based mobile application security scanner consulting CTF Damn Vulnerable iOS App devops dumping memory embedded hacking exploitation exploiting smart devices Firmware hacking frida hackfest hacking smart devices how to secure iot device IDA internet of things Internet of Things Security ios application security ios security iot iot device IoT Exploitation iot hacking iot pentest iot pentesting iot security iot security training iotsecurity jtag jtag debugging mobile app mobile application security mobile application security testing mobile security ninja recon technique offensive iot exploitation ola cabs owasp owasp appsec penetration testing pentesting pentesting mobile apps powerofcommunity PrinterSecurity qemu quizup radio communication protocol radio coomunication Reversing sdr secure coding guidelines security security issue security services security training security vulnerability smart devices social networking spi threat modeling training uart vulnerability writeups xposed hooking zigbee zigbee exploitation zigbee security zwave firmware reverse engineering firmware emulation firmware analysis toolkit firmadyne getting started with firmware hacking iot penetration testing iot attacks recent iot attacks cyber attacks iot hacks biggest iot attacks of all time hacked smart devices iot bots, malwares latest iot attacks BtleJuice bleah retail iot challenges in iot retail security issues faced by e-retailers network security in retail DDoS attacks phishing attacks how retail can prevent cyber attacks security challenges in retail IoT Flare-on radio waves hacking arduino nano how to hack radio waves analog modulation digital modulation capture radio traffic bluetooth technology BLE vulnerabilities BLE attacks BLE dangers BLE security issues exploiting ble how to exploit ble tools to exploit ble privacy protection iot threats protect against iot threats dangers of iot smart user security how to protect iot devices monitor iot devices internet security safety measures to protect privacy healthcare iot iot threats to healthcare industry how can healthcare fight iot threats healthcare cyber security prevent cyber attacks on healthcare measures to prevent cyber attacks on healthcare organisations steps to prevent iot attacks on healthcare healthcare business protection against iot threats security in healthcare iot recent cyber attacks recent ARM attacks ARM course ARM Training ARM binaries Exploit ARM devices IoT hacks on ARM devices ARM gadgets learn ARM exploitation Mirai Botnet vulnerable ARM devices arm ARM exploitation book ARM exploitation video training guide to ARM exploitation cybersecurity why you should be a cybersecurity expert professional expert career in cybersecurity why choose career in cybersecurity growth potential penetration testers hackers profession What is a Mirai Botnet? virus How Mirai botnet infects your device Understanding Mirai Botnet How Mirai works setup mirai history IoT Devices What is mirai botnet? IP cameras security cameras CCTV cameras hacked security IP cameras surveillance cameras hijacked vulnerabilities in internet connected cameras recent security camera attacks vulnerabilities discovered in popular IoT IP cameras IoT security guidelines Mozilla NIST GSMA best security practices automotive security V2V V2I Car security ECU hacking GozNym Bank account hack customer privacy banking malware