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,380
Trophies
2
XP
18,302
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,435
Trophies
3
Age
46
Location
At my chair.
XP
19,134
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,435
Trophies
3
Age
46
Location
At my chair.
XP
19,134
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,829
Trophies
2
Location
home
XP
9,422
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,829
Trophies
2
Location
home
XP
9,422
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,829
Trophies
2
Location
home
XP
9,422
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:
    imagine not having hands, cringe
    +1
  • AncientBoi @ AncientBoi:
    ESPECIALLY for things I do to myself :sad:.. :tpi::rofl2: Or others :shy::blush::evil:
    +1
  • The Real Jdbye @ The Real Jdbye:
    @SylverReZ if you could find a v5 DS ML you would have the best of both worlds since the v5 units had the same backlight brightness levels as the DS Lite unlockable with flashme
  • The Real Jdbye @ The Real Jdbye:
    but that's a long shot
  • The Real Jdbye @ The Real Jdbye:
    i think only the red mario kart edition phat was v5
  • BigOnYa @ BigOnYa:
    A woman with no arms and no legs was sitting on a beach. A man comes along and the woman says, "I've never been hugged before." So the man feels bad and hugs her. She says "Well i've also never been kissed before." So he gives her a kiss on the cheek. She says "Well I've also never been fucked before." So the man picks her up, and throws her in the ocean and says "Now you're fucked."
    +2
  • BakerMan @ BakerMan:
    lmao
  • BakerMan @ BakerMan:
    anyways, we need to re-normalize physical media

    if i didn't want my games to be permanent, then i'd rent them
    +1
  • BigOnYa @ BigOnYa:
    Agreed, that why I try to buy all my games on disc, Xbox anyways. Switch games (which I pirate tbh) don't matter much, I stay offline 24/7 anyways.
    +1
  • AncientBoi @ AncientBoi:
    I don't pirate them, I Use Them :mellow:. Like I do @BigOnYa 's couch :tpi::evil::rofl2:
    +1
  • cearp @ cearp:
    @BakerMan - you can still "own" digital media, arguably easier and better than physical since you can make copies and backups, as much as you like.

    The issue is DRM
    +1
  • cearp @ cearp:
    You can buy drm free games / music / ebooks, and if you keep backups of your data (like documents and family photos etc), then you shouldn't lose the game. but with a disk, your toddler could put it in the toaster and there goes your $60

    :rofl2:
  • cearp @ cearp:
    still, I agree physical media is nice to have. just pointing out the issue is drm
    +1
  • rqkaiju2 @ rqkaiju2:
    i like physical media because it actually feels like you own it. thats why i plan on burning music to cds
  • cearp @ cearp:
    It's nice to not have to have a lot of physical things though, saves space
    +1
  • AncientBoi @ AncientBoi:
    Nor clothes 🤮 . Saves on time, soap, water and money having to wash them. :D
  • SylverReZ @ SylverReZ:
    @rqkaiju2, Physical media is a great source for archiving your data, none of that cloud storage shiz.
    +1
  • AncientBoi @ AncientBoi:
    [squeezes @SylverReZ onto a physical media, then archives you in my old stuff box] :tpi::rofl2::tpi:
    +1
  • BakerMan @ BakerMan:
    guys, should i change my pfp to one of these or keep it the same?
    iu

    iu

    (i guess i could change it to one of my other pfps too, but i just want to see what you guys think first)
  • SylverReZ @ SylverReZ:
    @BakerMan, Up to you.
  • BakerMan @ BakerMan:
    smug sonic time lmao
    BakerMan @ BakerMan: smug sonic time lmao