Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save syncom/56ed4ec21793f1bf59a41d4fe3c6137d to your computer and use it in GitHub Desktop.
Save syncom/56ed4ec21793f1bf59a41d4fe3c6137d to your computer and use it in GitHub Desktop.
How to Create QEMU ARM Guest on x86_64 Linux Host

How to Create QEMU ARM Guest on x86_64 Linux Host

This document describes how I created a QEMU ARM (A32) guest on an x86_64 host (Ubuntu on Dell XPS developer edition). The process relies heavily on the arm_now tool. The commands are as follows.

Install dependencies on host Ubuntu machine

mkdir arm-qemu
cd arm-qemu/
sudo apt install python3-venv
sudo apt install e2tools
python3 -m venv env
source env/bin/activate
pip3 install wheel
pip3 install https://github.com/nongiach/arm_now/archive/master.zip --upgrade
arm_now start armv5-eabi

The ARM guest should start. When you see

Welcome to arm_now
buildroot login:

enter 'root' to get a root shell on the guest.

# uname -a
Linux buildroot 4.11.3 #1 SMP Sun Mar 4 00:49:28 UTC 2018 armv7l GNU/Linux

Poweroff the guest. On the host, do arm_now resize +10G to resize the virtual machine. You may need to do so to install more packages.

How to run an ARM exploitation tutorial

First start the guest again by arm_now start armv5-eabi.

To run the ROP on ARM tutorial, do the following on the guest.

wget https://github.com/syncom/rop-on-arm-rpi3-tutorial/archive/master.zip
unzip -x master.zip
cd rop-on-arm-rpi3-tutorial-master/
opkg install vim
opkg install gdb
opkg install make
opkg install gcc
opkg install python
cd src/
make # You may need to tweak the Makefile a bit, because execstack is not available on the platform
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment