Setting up FirmWire for vulnerability validation
Now, we will proceed with setting up the harness for the FirmWire emulator, which emulates the CP (baseband processor) of a Samsung device. The setup instructions, as taken from the web page, are straightforward:
$ sudo apt-get -y install docker docker.io $ git clone https://github.com/FirmWire/FirmWire.git $ cd FirmWire #fix for afl crash $ sudo su # this command must be run as root $ echo core >/proc/sys/kernel/core_pattern # we go out from the root command line $ exit $ git clone https://github.com/FirmWire/panda.git # This will take some time docker build -t firmwire . # Now enter the docker with docker run --rm -it -v $(pwd):/firmwire firmwire
The following command will start QEMU+Avatar2 with the Samsung Exynos baseband. It will also directly download the modem binary:
# Within the container you can run the firmware like this $ ./firmwire.py https://github.com/grant-h/ShannonFirmware/raw/master/modem_files/CP_G973FXXU3ASG8_CP13372649_CL16487963_QB24948473_REV01_user_low_ship...