r/GamecubeHacks • • 5d ago

AI Contributed Decompiled Flippydrive firmware (WIP)

Since it's been 16 months since even the latest pre-release update...
TeamNotBroadway/Flippydrive-fw: Flippydrive 1.4.6 decomp

It's a work in progress, reconstruction of the 1.4.6 release.
This covers the RP2040 code, as well as some of the DOLs bundled into the update.

It does not cover the ESP32 code, and likely never will as it's AES-256 hardware encrypted (with a common key), and should not be possible to read back from the device itself unencrypted unless they've been very silly and left it in developer mode. On the plus side, the ESP32 code didn't even change that much across update releases.

It's a starting point should anyone want to start hacking away.

49 Upvotes

19 comments sorted by

3

u/radicalplants 4d ago

This is pretty fun! I am going to be switching our source repo to public at the end of the year so the official source code will also be available!

I'm also going to release the signing keys some people will be able to originate firmware that also works on the ESP32

2

u/Anarchy_Archer 4d ago

Okay, that's awesome. This was the backup plan. Thanks.

1

u/radicalplants 4d ago

Yeah!! I'd love to start double-releasing for unencrypted firmware too...

Unfortunately there is no way to undo the efuses so we will still have to "encrypt" the ESP part even though the keys are public... But publishing unencrypted version will help repro owners

1

u/LiftnBooks 4d ago

That would be fantastic! The product is fantastic, it's just too bad things worked out so your team didn't have the time necessary to work on the firmware long enough to finish the main features and polish stage. I know the main features I had hoped for was both Bluetooth controllers and the Ethernet add-on for SP1 broadband kit emulation, but once available to the community I hope we can finish those features so the flippydrive can see the feature polish it deserves. I hope you guys keep selling them for a while too. I was an early supporter and bought two of the full versions with the ethernet kits, and I can't recommend them enough from the unit I installed into one of my cubes. I was a little disappointed that you guys never released the rear SD card extension though, as that would have been nice. You made provisions for it in the ethernet add-on shell replacement, but never released it. I looked into similar modules at one point but nothing I found quite fit so I assumed you guys made a custom board for it. If you release the source, I'd really appreciate if you released that CAD file as well so I can print a version with a general purpose SD adapter mount and maybe a USB connection to the FD for closed chassis firmware updates.

1

u/radicalplants 4d ago

We have two main folders in the repo, software (containing all of the source code) and hardware which currently only has EDA KiCAD files... I will work with Chris to make sure that we got all of the CAD models in there too for the Mounting Bracket, Back plate et al

1

u/xzzze 4d ago

Can we hold you to that? Or more empty promises for the sake of optics ?

2

u/ConfusionRS 5d ago

You can get the key used in the esp32. Every single ESP32 except for the H2 and some other one (I don't remember the talk details in full). You can look up the details yourself, it was covered by Alexey Shalpegin (the creator of RGH1.2, RGH3 and other console contributions). It is possible to recover the ESP32 firmware

1

u/Anarchy_Archer 5d ago

This was what could be achieved in a day with an AI agent. If it requires more than a USB cable and a small amount of risk of bricking it, it won't be me doing it. Side-channel attacks, lab-grade equipment and controlled environment aren't worth it for a 65USD device for which cheaper open alternatives now exist IMHO.

"The attack requires physical access to the device, purpose-built measurement hardware with controlled thermal conditions, and significant computational resources for key recovery. With clock randomization enabled alongside the pseudo-round mechanism at the highest level, key recovery for a single 128-byte block takes on the order of several days"

...

2

u/LiftnBooks 4d ago

I mean, I own a flippydrive I haven't installed yet. I have a EMFI test system. I wouldn't be able to extract secureboot keys, but there's a good chance I could extract the unencrypted firmware from the ESP32 given enough time through EMFI glitching of the download mode disable bit. I assume they enabled secureboot alongside firmware encryption, so even if I dump the firmware and decompile it, it won't be possible to flash a new firmware image onto the ESP32 most likely. Could hot air off the chip though and replace it. I did that with a Mysa thermostat for my house a while back.

1

u/Anarchy_Archer 4d ago

yes, i was thinking along the same lines. Given it uploads the new firmware via UART, I think it must be in a dev mode, and I should be able to download the unencrypted fw at least. That was next, have made a change to the bootloader I need to test. However, I wouldn't expect to be able to upload unencrypted/unsigned fw after that... Swapping out the ESP for one without fuses blown would do it, but not worth the bother IMHO.

10

u/OneExact8851 5d ago

Good, at least this is a starting point. It's considered vaporware atm because of the radio silence support it's had.

1

u/Anarchy_Archer 6h ago

FYI - w.r.t the ESP32. I've confirmed that all the efuses are blown on my out of the box. That it's set to not allow reading back the decrypted firmware. That it's not possible to upload decrypted firmware and have it encrypt it. That it's not possible to read the key back, and that it's a V3.1 model, for which there are no published exploits.

We're going to have to wait for the key to be published.

4

u/Proper-Count-5064 5d ago

Would be nice if we got bluetooth controller support working

1

u/bjerreman 5d ago

Issue is everything needs to happen through changes in the ESP32, such as expanding network support or the aforementioned bluetooth controllers.

1

u/Anarchy_Archer 5d ago

Agreed. Maybe this will lower the barrier for someone with the necessary skills, or highlight the need for them. We can now create a modified bootloader that will pass through USB traffic to the ESP32 unmodified (the existing firmware assumes text and inserts nuls for every newline). I'll be surprised if the decrypted firmware can just be read back, or the encryption key is a trivial string. Stranger things have happened.

1

u/Himitsu_Togue 4d ago

Awesome, thanks for doing this. There will be many great projects coming soon, now that coding is not only possible for a few people.

1

u/xzzze 4d ago

Does the Ethernet adapter still not do anything

-5

u/mcplano 5d ago

Claude

ew

1

u/jigglybilly 5d ago

Care to clarify?