一个有趣的发现:STM32 RDP1 解密器
An Interesting Find: STM32 RDP1 Decryptor

原始链接: https://carlossless.io/stm32-rdp1-decryptor/

一种易于获取、低成本的设备,用于绕过STM32微控制器的读出保护等级1 (RDP1),正在中国闲鱼市场上销售,价格约为19欧元。该设备是一个带有适配板的USB加密狗,声称可以解密F0、F1、F2和F4系列芯片。 作者购买并使用该设备测试了STM32F205RBT6,成功转储了其完整的闪存内容,即使启用了RDP1保护,也无需冷却或故障注入等技术。虽然该软件需要Windows系统,最初会触发安全警告,并且需要调整区域设置,但它确实如广告宣传的那样工作。 观察到一点小问题:该软件会过度读取闪存,但正确大小范围内的有效数据是准确的。虽然绕过RDP1的方法已经存在,但该设备提供了一个简单、即用的解决方案,引发了安全问题和可访问性,方便逆向工程。其内部工作原理在很大程度上未知,核心芯片的身份被隐藏,但进一步分析是可能的。

黑客新闻 新的 | 过去的 | 评论 | 提问 | 展示 | 工作 | 提交 登录 一个有趣的发现:STM32 RDP1 解密器 (carlossless.io) 33 分,由 carlossless 1 小时前发布 | 隐藏 | 过去的 | 收藏 | 1 条评论 帮助 MrBuddyCasino 4 分钟前 [–] 一些背景:“STM32 读出保护 (RDP) 通过配置在选项字节中的三个级别 (0, 1, 2) 来保护闪存。级别 0 允许完全访问(默认)。级别 1 限制调试和闪存访问,允许通过擦除闪存降级到级别 0。级别 2 永久锁定设备,禁用调试功能,并且无法恢复。” 我实际上有一个半损坏的设备,其中包含一个 STM32 MCU,我想转储它。它是一个噪声机器,其中包含声音的闪存卡,但内容已加密。我想获取解密密钥来抢救它。 级别 2 已经被破解了吗?回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

Recently while browsing Xianyu (闲鱼) looking for BYK-series chips (Sinowealth 8051 MCUs) for another project I'm working on, I stumbled across something peculiar: a device claiming to bypass STM32 RDP1 (Read-Out Protection Level 1) on F0, F1, F2 and F4 series chips. As it turns out, there's a whole market for these if you search for "STM32解密" (STM32 decryption).

Xianyu listing photo showing the decryptor kit with USB dongle, multiple adapter PCBs and SWD pinout reference cards
a picture from one of the many STM32 decryptor listings on Xianyu

At about 150 yuan, roughly 19 EUR plus shipping and forwarding on top, I decided to bite the bullet and just buy one to see if it actually works.

What arrived§

The package contained a blue USB dongle (the programmer), two green adapter PCBs, a row of double and a row of single 2.54mm pin headers and a couple of 10K resistors.

All components laid out on a cutting mat: USB dongle, two adapter PCBs, pin headers and connector
everything that came in the package

The adapter boards have footprints for the various packages of F0, F1 and F2/F4 chips, along with pads for decoupling capacitors on the necessary VCAP pins and a resistor pulling BOOT1 down. I had to supply the 0.1uF caps for the VCAP pads myself.

Close-up of the blue USB programmer dongle

Testing with an STM32F205RBT6§

I had an STM32F205RBT6 lying around, so I desoldered it and placed it on the adapter board.

STM32F205RBT6 soldered onto the adapter board and plugged into the USB dongle
STM32F205RBT6 soldered onto the adapter board and plugged into the dongle

The device comes with a Windows utility. Before I could even get it running, I had to deal with a couple of hurdles. First, the software immediately triggers Windows Defender, probably for good reason. Since I was running this in a throwaway VM anyway, I just turned it off. Second, the application wouldn't launch until I changed the system encoding for non-Unicode programs to Chinese Simplified in the Windows 11 regional settings (Settings > Time & language > Language & region > Language for non-Unicode programs > Chinese (Simplified, Mainland China)).

The instructions that came with the device recommended using freeze spray on the chip during the read process. I was ready for that, but it turned out to be unnecessary in my case. It read just fine at room temperature.

F0124 Series Decryptor V5.1 Windows utility showing a hex dump of flash contents read from an STM32F2/F4 chip
the host Windows application showing a successful flash readout. The failed validation message at the bottom is probably related to the overshoot and can be ignored.

One quirk: the software would always overshoot when reading. A STM32F205RB has 128KB of flash, but the tool would happily read past that boundary, padding everything beyond it with 0xFF. The actual flash contents within the valid 128KB region were correct though, so it's easy enough to just trim the output to the right size.

Conclusion§

This thing actually works. It successfully dumped the full flash contents of an RDP1-protected STM32F205RBT6 without needing to introduce any external faults like cooling the chip down.

To be clear, this device is not the first to allow circumventing RDP1. There have already been documented ways for most of these devices: voltage glitching on STM32F4, the Exception(al) Failure debug interface exploit on STM32F1, Cold-Boot Stepping on STM32F0, and reproducible glitching setups with open-source tooling. But all of these require understanding the attack, building or buying a glitching rig, and tuning parameters. A turnkey product like this one just lets you solder the chip onto the adapter and click a button. It's both concerning and exciting.

Finally, other than glancing at the PCB, which has an SOP-16 IC with the label scraped off (presumably the microcontroller), I haven't tried analyzing how this device works yet. The Windows-only host app is not great either, but shouldn't be too hard to recreate it if someone wanted to. Might have to take a closer look at what's going on under the hood sometime. Or hopefully someone else will!


Comments

联系我们 contact @ memedata.com