Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could GD32F103 support be possible ? #32

Open
cxgth opened this issue Jun 16, 2024 · 12 comments
Open

Could GD32F103 support be possible ? #32

cxgth opened this issue Jun 16, 2024 · 12 comments
Labels
enhancement New feature or request

Comments

@cxgth
Copy link

cxgth commented Jun 16, 2024

Hey, thanks for your work and implementation.

I'm facing the same problem as described in #27.
I tried to dump the firmware of an STM32 clone (GD32F103).
Due to multiple failed attempts, I ordered a genuine STM32 blue pill and built a rig to be able to quickly swap microcrontrollers for testing.

The first attempt with a STM32F103 worked flawlessly.
So my guess is, right now it will not work with a GD32F103, but:

I found the CVE and original paper, the conference presentation @ WOOT '20 and another repository with an exploit for CKS and GD32 clones.

The attack between STM32F103 and GD32F103 seems to be similar.
Do you think it could be implemented ?

@yangzs001
Copy link

I also want to know how to extract the firmware of GD32F103

@CTXz CTXz added the enhancement New feature or request label Jun 24, 2024
@CTXz
Copy link
Owner

CTXz commented Jun 24, 2024

Thanks for the CVE references.

I'll take a look when I find the time. If they seem doable with an RP2040, I might get my hands on a GD32!

@curcius
Copy link

curcius commented Jun 24, 2024

I would be very happy if it were possible to dump the GD32f103 and thank you very much for your effort in making it work @CTXz

@chupalt
Copy link

chupalt commented Jun 28, 2024

GD32F103 doesn't require glitching
https://github.com/JohannesObermaier/f103-analysis.git

@curcius
Copy link

curcius commented Jul 7, 2024

GD32F103 doesn't require glitching https://github.com/JohannesObermaier/f103-analysis.git

Do you have any tutorials?

@curcius
Copy link

curcius commented Jul 7, 2024

😭

@dolphin22
Copy link

FPB doesn't work on GD32F103. D2 method from Johannes's research doesn't work for me as well.

@Kiprus
Copy link

Kiprus commented Jul 29, 2024

I tried using method D2 on the GD32F103, but only zeros were written to the RAM. The PC register has a value of 0, which suggests that there is no code execution, meaning the memory bus might be locked. I think the issue could be with the programmer or OpenOCD, as they might be accessing the core during initialization, which is causing us to get Debug_En.

@dolphin22
Copy link

I tried using method D2 on the GD32F103, but only zeros were written to the RAM. The PC register has a value of 0, which suggests that there is no code execution, meaning the memory bus might be locked. I think the issue could be with the programmer or OpenOCD, as they might be accessing the core during initialization, which is causing us to get Debug_En.

I can load image to SRAM with BOOT0 and BOOT1 HIGH. I also facing the same issue with openocd 12-dev to load_image to flash, both with stlink and jlink. But it works with st-flash not sure why.

@Kiprus
Copy link

Kiprus commented Jul 31, 2024

I tried using method D2 on the GD32F103, but only zeros were written to the RAM. The PC register has a value of 0, which suggests that there is no code execution, meaning the memory bus might be locked. I think the issue could be with the programmer or OpenOCD, as they might be accessing the core during initialization, which is causing us to get Debug_En.

I can load image to SRAM with BOOT0 and BOOT1 HIGH. I also facing the same issue with openocd 12-dev to load_image to flash, both with stlink and jlink. But it works with st-flash not sure why.

Do you mean that you were able to read the firmware with RDP in this way? Can you describe how you did this?

@dolphin22
Copy link

I tried using method D2 on the GD32F103, but only zeros were written to the RAM. The PC register has a value of 0, which suggests that there is no code execution, meaning the memory bus might be locked. I think the issue could be with the programmer or OpenOCD, as they might be accessing the core during initialization, which is causing us to get Debug_En.

I can load image to SRAM with BOOT0 and BOOT1 HIGH. I also facing the same issue with openocd 12-dev to load_image to flash, both with stlink and jlink. But it works with st-flash not sure why.

Do you mean that you were able to read the firmware with RDP in this way? Can you describe how you did this?

I am unable to dump flash firmware using this method because FPB doesn't work on GD32 families. I can load firmware to SRAM (BOOT0=BOOT1=HIGH) when security protection is enabled, see photo
chrome_yTJ88qVulQ

@curcius
Copy link

curcius commented Oct 31, 2024

News about gd32? 🥹

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants