Hacking Hardware Picofly - a HWFLY switch modchip

renoob

Active Member
Newcomer
Joined
Feb 6, 2023
Messages
42
Trophies
0
XP
157
Country
France
I have found where the unique_id of the current rp2040 is stored in the original firmware:
0x20025978
$1 = 0x20025978 "\346aA\004\003y\247\071W\003"
(gdb) x/8x $r0
0x20025978: 0xe6 0x61 0x41 0x04 0x03 0x79 0xa7 0x39

and this is the output of micropython:
MPY: soft reboot
e6 61 41 4 3 79 a7 39
MicroPython v1.19.1-841-g3446d440f on


Cross Referenced unique_id example code in ghidra with firmware,found where it is,little this and little that and here we are
(rp2040 was live debuged)
 

vittorio

Well-Known Member
Member
Joined
May 12, 2014
Messages
243
Trophies
0
Age
26
XP
962
Country
Italy
This is the ID of the chip, not stored one for encryption, still finding where its compared

Anyway. the function is at 0x10002608 which is called at boot
I've seen this function
Post automatically merged:

if we try to put the keys manually like it says here https://github.com/CTCaer/hekate/issues/559
Post automatically merged:

Post automatically merged:

@Tafty
 
Last edited by vittorio,

Switch_Maniac

Well-Known Member
Member
Joined
Dec 16, 2018
Messages
183
Trophies
0
XP
651
Country
United States
The sdloader used in this firmware is wrong/bad that’s why it says for Ubuntu. It clears out the keys, that’s why BEK is missing. Someone that understands the firmware better needs to swap out the sdloader code with hwfly or spacecraft sdloader. You cannot patch it with hwfly toolbox because it’s not in the same location
 

HenryMin

Well-Known Member
Member
Joined
Jun 19, 2020
Messages
141
Trophies
0
XP
1,136
Country
Korea, South
I've seen this function
Post automatically merged:

if we try to put the keys manually like it says here https://github.com/CTCaer/hekate/issues/559
Post automatically merged:

Post automatically merged:

@Tafty
> hekate_keys.ini is not something that hekate actually supports. I don't know what you are talking about.
Also refrain from illegally posting even a single part of the keys.

hekate_keys.ini was used in some shitty closed source cfw packs, because original tx firmware wipes BEK. You should not post thoese keys tho :P
 
  • Like
Reactions: binkinator

TheSynthax

Well-Known Member
Member
Joined
Apr 29, 2018
Messages
220
Trophies
0
XP
509
Country
United States
> hekate_keys.ini is not something that hekate actually supports. I don't know what you are talking about.
Also refrain from illegally posting even a single part of the keys.

hekate_keys.ini was used in some shitty closed source cfw packs, because original tx firmware wipes BEK. You should not post thoese keys tho :P
Does that mean any console that used the original TX firmware without manually backup up first could never be restored to stock?
 

HenryMin

Well-Known Member
Member
Joined
Jun 19, 2020
Messages
141
Trophies
0
XP
1,136
Country
Korea, South
Does that mean any console that used the original TX firmware without manually backup up first could never be restored to stock?
The keys are stored in bootrom, and normally they will be loaded to keyslot at boot. But TX firmware just wipe keyslot at boot to prevent other CFW to boot(It was their DRM lol), so it is not permanent.
 
  • Like
Reactions: binkinator

Piorjade

Well-Known Member
Member
Joined
Nov 8, 2015
Messages
142
Trophies
0
XP
407
Country
Gambia, The
Don't know how the compiler packs Pico code into .uf2 files, but I couldn't find the HWFLY-NX public key signature (0x69 repeating) in the latest unlocked dump. If the uf2 is uncompressed then this firmware really is using different BCTs, but I guess we can already safely bet on that.

In the meantime, I'm currently writing PIO code to sniff eMMC traffic using an external CLK signal. CMD line is almost done, though I don't know yet how to know when I need to sniff 136 bit packages and when I need to sniff 48bit packages. This protocol is pretty annoying tbh.

I don't think I'll be able to even write a prototype for the glitching part, because I don't have a CPU flex cable to test this whole thing out. I have some MOSFETs (slightly different ones from the one linked here) but they're so damn small that I don't trust myself to solder it on the tiny capacitors on the switch lmao.
 

TheSynthax

Well-Known Member
Member
Joined
Apr 29, 2018
Messages
220
Trophies
0
XP
509
Country
United States
Probably better to solder some 40AWG enamel magnet wire to the caps and the fets if you don't have super good eyes, steady hands, and/or a microscope.
Don't know how the compiler packs Pico code into .uf2 files, but I couldn't find the HWFLY-NX public key signature (0x69 repeating) in the latest unlocked dump. If the uf2 is uncompressed then this firmware really is using different BCTs, but I guess we can already safely bet on that.

In the meantime, I'm currently writing PIO code to sniff eMMC traffic using an external CLK signal. CMD line is almost done, though I don't know yet how to know when I need to sniff 136 bit packages and when I need to sniff 48bit packages. This protocol is pretty annoying tbh.

I don't think I'll be able to even write a prototype for the glitching part, because I don't have a CPU flex cable to test this whole thing out. I have some MOSFETs (slightly different ones from the one linked here) but they're so damn small that I don't trust myself to solder it on the tiny capacitors on the switch lmao.
 
  • Like
Reactions: binkinator

vittorio

Well-Known Member
Member
Joined
May 12, 2014
Messages
243
Trophies
0
Age
26
XP
962
Country
Italy
Don't know how the compiler packs Pico code into .uf2 files, but I couldn't find the HWFLY-NX public key signature (0x69 repeating) in the latest unlocked dump. If the uf2 is uncompressed then this firmware really is using different BCTs, but I guess we can already safely bet on that.

In the meantime, I'm currently writing PIO code to sniff eMMC traffic using an external CLK signal. CMD line is almost done, though I don't know yet how to know when I need to sniff 136 bit packages and when I need to sniff 48bit packages. This protocol is pretty annoying tbh.

I don't think I'll be able to even write a prototype for the glitching part, because I don't have a CPU flex cable to test this whole thing out. I have some MOSFETs (slightly different ones from the one linked here) but they're so damn small that I don't trust myself to solder it on the tiny capacitors on the switch lmao.
https://github.com/hwfly-nx/firmware/blob/master/firmware/src/mmc_sniffer.c
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: *yawn*