I am learning IoT security these days and just set up an environment for router file system analysis. So I will write a tutorial for you to save some time.

I am using Ubuntu 16.04 here.

First, we will install the qemu.

1
2
3
sudo apt-get install qemu 
sudo apt-get install qemu-user-static
sudo apt-get install qemu-system

Then we have to install some network tools and configure the interface.

1
sudo apt-get install bridge-utils uml-utilities

Change these two files.

One thing to note here. The enp0s3 is the interface on my system. You need to change it to your interface’s name otherwise it won’t work.

You can restart the system now to make the changes take effect. Then we are going to download the qemu mirror. We can get it from here.

I download the Debian_squeeze_mips_standard.qcow2 and the vmlinux-2.6.32-5-4kc-malta.

After we finish this, we can use this command to start the qemu.

1
Sudo qemu-system-mips -M malta -kernel vmlinux-2.6.32-5-4kc-malta -had Debian_squeeze_mips_standard.qcow2 -append “root=/dev/sda1 console=tty0” -net nic, macaddr=[your interface’s mac] -net tap

Use root/root to login. Then you may realize that your interface here is eth1 so change the /etc/network/interfaces file. Make it like this.

You can use ctrl+alt to escape the window. Restart the virtual machine here and you can use ssh to login the qemu to make your life easier.

Any question, email me at xudong_shao@hotmail.com