百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

stm32f0-pico-dump

> 包管理
开源

STM32F0x 有Raspberry Pi Pico保护的软件 Dumper

192 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

STM32F0x 有Raspberry Pi Pico保护的软件 Dumper

STM32F0x Protected Firmware Reader with Pi Pico

This is a proof of concept protected firmware extractor which uses a bus race-condition in SWD readouts. For exploiting it you need to avoid "talking too much" with the MCU (like the SWD Probes do) and just get direct to the point. Then it's possible to extract a single 32 bit DWORD from the firmware before the protection mechanism triggers. The proof of concept needs to control both reset and power for the target device, since the read out protection on SWD requires a power-cycle to be reset.

There are several PoC over the internet for this debug mode exploit, but most of them use STM32 with the MBED SDK which makes necessary a ton of stuff to compile. I like simple stuff so I choose platform.io which makes everything to you. I also ported over Raspberry Pi Pico (RP2040) which is more accessible nowadays.

This will only work for Level 1 Readout Protection, since it requires SWD active and Level 2 Readout Protection totally blocks it. It might work with other STM32 variants but haven't been tested (if you test a different series than STM32F0x let me know!)

Building it

For building it you need platform.io installed:

bash
pip install platformio

Or check it out specifics for different platforms at https://platformio.org/

To build you just run:

bash
pio run

The firmware will be at .pio/pico/firmware.uf2.

You can also use platform.io vscode plugin which allows you do to everything in a GUI environment.

Usage

The pinouts are defined at include/main.h by default as:

c
#define TARGET_RESET_Pin 27
#define TARGET_PWR_Pin 26
#define SWDIO_Pin 14
#define SWCLK_Pin 15

The pico should be able to completely turn off the device by using the TARGET_PWR_Pin, if your target board is just the STM32 or it has few stuff on it, you can just use the TARGET_PWR_Pin directly as 3.3V power supply for the board. Keep in mind that the current sink of the pico is very low, but should be enough for the attack. If you're unsure, you can use a relay/mosfet to power on/off the target power supply.

If your STM32 target has different than 32KB flash memory, you should also edit in main.cpp the parameter size.

After powering everything up, the pico will repeat the message Send anything to start... on the serial port, that means it is ready. Press up any key and it will start dumping the content:

Send anything to start...
Starting
0x08000000: deadbeef
0x08000004: deadbeef
0x08000008: deadbeef
0x0800000C: deadbeef
0x08000010: deadbeef
0x08000014: deadbeef
0x08000018: deadbeef

You can also use the dump.py script to dump to a file.

Disclaimer

This work is heavily based on Johanes Obermaier paper Shedding too much Light on a Microcontroller's Firmware Protection. I also used portions of its Proof of Concept to migrate this to a Raspberry Pi Pico and Platform.IO so I released in the same license as the original PoC: MIT.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Carduinopipicoprotectedprotected-firmware

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类包管理
定价开源

> 相关工具

N
npm
Node.js 默认包管理器
P
pnpm
高效节省磁盘的 Node 包管理器
I
is-gif
Check if a Buffer/Uint8Array is a GIF image