Hacking Hardware Picofly - a HWFLY switch modchip

FruithatMods

Well-Known Member
Member
Joined
Dec 16, 2018
Messages
128
Trophies
0
Age
34
XP
450
Country
Germany
View attachment 347841

firmware.bin has about 85k of payload in there…

View attachment 347837

—-snip—-

View attachment 347839

the rest is probably just FF padding of the rest of the flash space. If this was just a dump of flash space it would be huge in comparison with the bulk being a lot of empty space.

….like the Trinket payloads.

View attachment 347840
Post automatically merged:

Some idiot is going to have to take one for the team and just inject this into their switch and see what catches fire…

Did you just analyse the firmware on a portable calculator? 😳
Post automatically merged:

Where did you get it from?

Also the original pikofly is canceled since the dev doesn't want anything todo with it anymore
Honey, you should know better. People are just trolling. Perhaps there is some wishful thinking mixed into it.
However I say we remain positive and optimistic. Great things do happen when people are optimistic.
Much love.
 

linuxares

The inadequate, autocratic beast!
Global Moderator
Joined
Aug 5, 2007
Messages
13,329
Trophies
2
XP
18,204
Country
Sweden
a pity, too much drama over it, though as i see it it will be released uncredited from a chinese company locked and not open source. scene nowadays is becoming dramatic.
He got pissed people demanding and not just wait. But moan and whine they dont get their cheap solution instantly
 

impeeza

¡Kabito!
Member
Joined
Apr 5, 2011
Messages
6,364
Trophies
3
Age
46
Location
At my chair.
XP
18,740
Country
Colombia
finally one of my pico RP2040 arrives, that little bugger IS SMALL, is even smaller than the gemma I brought for my wife's console!!

1673995105070.png


well this night will start to playing with this micro.
 

impeeza

¡Kabito!
Member
Joined
Apr 5, 2011
Messages
6,364
Trophies
3
Age
46
Location
At my chair.
XP
18,740
Country
Colombia
How thin is the seeed compared to a hwfly?
Besides the buttons an usb-c port the metal shield will probably also need to come off for it to fit in a oled switch.
was upon a time the ghosip of a way to mod a switch using a raspberry pico so you don't need to pay 150+ for the chip only 4$ but seems never works really.

https://gbatemp.net/threads/pikofly-a-probably-fake-hwfly-modchips-or-not.622701/

https://gbatemp.net/threads/scene-d...ntendo-switch-involves-a-raspberry-pi.623082/
Post automatically merged:

How thin is the seeed compared to a hwfly?
Besides the buttons an usb-c port the metal shield will probably also need to come off for it to fit in a oled switch.
yeah, the USB port is thick

without the USB port it's the thick exactly 3mm high

1674008268822.png


the board and port are 4.6 mm thick
1674008306085.png


so its for sure you need to remove the USB port.
 
Last edited by impeeza,

Sono

cripple piss
Developer
Joined
Oct 16, 2015
Messages
2,822
Trophies
2
Location
home
XP
9,327
Country
Hungary
I am analyzing the dump. (edit: to clarify, the firmware.bin from firmware.rar)

I think it's either obfuscated or unfinished, because the firmware is dumb.
There is BKPT everywhere (including the main() function), and the HardFault handler is also a BKPT, meaning that the CPU will just instantly die after a clock init.

There has to be some other magic I didn't find yet. I'll keep updated once I figure out the correct way to load this dump in such a way as to make IDA happy (I don't understand how to use Ghidra even after reading the documentation, so I'm limited by the tools I have).




Update 1: someone took the effort to actually strip the binary of *any* useful data, so it's probably not fake, in the sense that the code definitely should do something considering its size, but it's definitely not just a lazy fake payload.
I'm recovering as much symbol data as possible, and keep editing this post on my progress, and post a reply instead if a big discovery gets made.

Update 2: the payload size is 85184 bytes, but RAM usage actually extends to 154024 bytes (minus 192 bytes for PicoSDK stuff). Some code seems to be in RAM, (4576 bytes to be exact). Some SDK code also seems to be present in RAM, which is quite odd. I think the payload is so small because they have probably modified the linker file which comes with the SDK, but also probably just copypasted some SDK functions and made them run from RAM instead.
This makes sense, they are probably using a modified version of copy-to-RAM -style payload with some modifications.

Update 3: they are using a very different version of the PicoSDK, so I'm having minor difficulties.
BUT!
I found the main() function! Time to reverse-engineer :hrth:


Update 4:
Code:
lbl_0:
011 00010 001 00001 - OUT X, 1 [2]
000 10001 001 00011 - JMP !X lbl_3 side 00 [1]
000 10100 000 00000 - JMP lbl_0 side 01
lbl_3:
101 00100 010 00010 - MOV Y, Y [8] # this one doesn't make sense
Also, the chip is overvolted to 1.30V, and it's overclocked to 333MHz, which is rather high. No wonder people are reporting that it doesn't work... I'm having stability issues at 250MHz and 1.10V with my ntrboot cart emulator. Technically the chip should not be damaged, but this is *really* pushing it into the danger zone >.<

Update 5: There is some really suspicious code encryption and virtualization going on. I'm tired for now, I'll probably start a new reply if I do get more progress.
 
Last edited by Sono,

Sono

cripple piss
Developer
Joined
Oct 16, 2015
Messages
2,822
Trophies
2
Location
home
XP
9,327
Country
Hungary
Final verdict on firmware.rar: I think it might be legit, but it's encrypted and virtualized, so they really don't want you to see into their secrets.

I don't think it's worth it to try and reverse-engineer it any further, considering all the problems surrounding this device.

I think the best idea would be to take the currently existing open-source solution, analyze it, and try recreating that instead of trying to recycle this leaked garbage.
 

Mansi

Well-Known Member
Newcomer
Joined
Jan 14, 2023
Messages
70
Trophies
0
Age
30
XP
331
Country
Belarus
Final verdict on firmware.rar: I think it might be legit, but it's encrypted and virtualized, so they really don't want you to see into their secrets.

I don't think it's worth it to try and reverse-engineer it any further, considering all the problems surrounding this device.

I think the best idea would be to take the currently existing open-source solution, analyze it, and try recreating that instead of trying to recycle this leaked garbage.
If you know micropython well, you can transfer the bootloader and get a glitch. I tried to disassemble the firmware in IDA and did not find anything good. Perhaps the problem is that picotools did not correctly read the firmware.
 
  • Like
Reactions: binkinator

Sono

cripple piss
Developer
Joined
Oct 16, 2015
Messages
2,822
Trophies
2
Location
home
XP
9,327
Country
Hungary
If you know micropython well, you can transfer the bootloader and get a glitch. I tried to disassemble the firmware in IDA and did not find anything good. Perhaps the problem is that picotools did not correctly read the firmware.

MicroPython is too slow for these kinds of tasks. I know, because I tried.

The firmware *is* read correctly, because everything makes sense, I recognize the presence of PicoSDK, I recognize what compile flags they used, and I recognize that they have intentionally encrypted part of the code, but also the exception handlers as well.
There is no way that the dump is damaged.
 
  • Like
Reactions: binkinator

Mansi

Well-Known Member
Newcomer
Joined
Jan 14, 2023
Messages
70
Trophies
0
Age
30
XP
331
Country
Belarus
MicroPython is too slow for these kinds of tasks. I know, because I tried.

The firmware *is* read correctly, because everything makes sense, I recognize the presence of PicoSDK, I recognize what compile flags they used, and I recognize that they have intentionally encrypted part of the code, but also the exception handlers as well.
There is no way that the dump is damaged.
Maybe need Pico unique id?
https://stackoverflow.com/questions/72594333/arduino-rp2040-pico-unique-id
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    BakerMan @ BakerMan: as to you