Emulator plugin to emulate MCU based firmware. It discovers hidden memory mappings between peripheral registers.
For more details, please refer to our paper What You See is Not What You Get: Revealing Hidden Memory Mapping for Peripheral Modeling
There are three MCUs, NRF52832, STM32F103, and STM32F429. To emulate NRF52832, it requires JLinkGDBServer. You can download it from the website. To emulate STM32F103 and STM32F429, it reuiqes the tool named openocd. You can install openocd through the below command.
sudo apt-get install openocd
Open two terminals and execute the below command in one terminal.
/usr/bin/JLinkGDBServer -If SWD -Speed 4000 -Device Cortex-M4
Then, in another terminal, execute the below command after adding your target firmware in the add.sh
file.
./add.sh
Open two terminals and execute the below command in one terminal based on your target MCU.
openocd -f interface/stlink-v2-1.cfg -f target/stm32f1x_stlink.cf
openocd -f interface/stlink-v2-1.cfg -f target/stm32f4x_stlink.cfg
Then, in another terminal, execute the below command after adding your target firmware in the add.sh
file.
./add.sh
If you create a research work that uses our work, please cite our paper:
@inproceedings{won2022you,
title={What You See is Not What You Get: Revealing Hidden Memory Mapping for Peripheral Modeling},
author={Won, Jun Yeon and Wen, Haohuang and Lin, Zhiqiang},
booktitle={25th International Symposium on Research in Attacks, Intrusions and Defenses},
pages={200--213},
year={2022}
}