The Switch Flashcart Thread (Mig Switch etc.)

  • Thread starter Thread starter TheStonedModder
  • Start date Start date
  • Views Views 812,044
  • Replies Replies 2,845
  • Likes Likes 25
I was wondering if you've ever tried to analyze the firmware update process
It's just decryption of the update file and writing the data right into the ESP internal flash. FPGA cannot be updated, its NVCM can be written only once
(although the bootloader still has feature to load FPGA bitstream into its SRAM I'm sure the retail firmware updates will never have the bitstream inside)
 
It's just decryption of the update file and writing the data right into the ESP internal flash. FPGA cannot be updated, its NVCM can be written only once
(although the bootloader still has feature to load FPGA bitstream into its SRAM I'm sure the retail firmware updates will never have the bitstream inside)
Do you know if the firmware on the chips for the flashcart and dumper are the same, or does the update differentiate between the two?
This is a really cool model. Do you have one for the button model too?
 
  • Like
Reactions: Blythe93
Here's a pretty good thread by hexkyz detailing some new information they have regarding the MIG (original thread here, posted below for convenience).

Mike Heskin @hexkyz
Sep 6
Thanks to the great work done by 15432, we can finally decrypt the MIG flashcart firmware code. Here's what we've learned so far. https://github.com/15432/mig_research

1) MIG is TX/GW, unsurprisingly. As explained by 15432, the exact same MIPS-like VM code is used within the firmware. A number of other similarities can also be found such as the FPGA communication code stack being the exact same as the one used by the SX Core.

2) The gamecard communication protocol (which is based on SNOW 2 and AES-CCM) is entirely implemented in the ESP32 firmware. MIG included a piece of previously unobtainable key material (the IV used for SNOW) in the firmware code, which could only be extracted by decapping.

3) However, a crucial piece of key material, the Lotus3 hardware AES key, is not visible to the ESP32. Instead, they've hid it inside the FPGA and request it to do the decryption of the relevant data. This alone makes it impossible to clone their hardware, but there's more.

4) Both the bootloader and firmware have multiple layers of verification. Aside from using the ESP32 Secure Boot system (which uses RSA-PSS), the firmware itself double checks signatures during the update process.

5) Additionally, there's a small MIPS VM handling some critical tasks which include verifying another RSA signature that lives inside a "secure block" (flash address 0x1FF000). This block also contains their firmware keys (encrypted) and other important material.

6) The firmware keys are stored encrypted and the key to decrypt them is generated by hashing (HMAC-SHA256) a chip unique IV in the bootloader with a chip unique HMAC key. The latter is programmed to efuses and locked from reading.

7) Decrypting the "update.s2" file is a matter of stripping away a first layer of TEA encryption, parsing metadata, decrypting the actual firmware code with the right AES key and, finally, deobfuscating the resulting plaintext through their custom XOR-based algorithm.

8) This last XOR-based algorithm is an absolute abomination of mixing random values and multiple seed sources just to make it as hard as possible to reverse engineer (even Ghidra wasn't able to produce an accurate decompilation of it, despite having support for Xtensa).

All around it looks like a pretty secure firmware but it's good that researchers are able to understand it more and more.
 
  • Like
Reactions: _iggyman_
Here's a pretty good thread by hexkyz detailing some new information they have regarding the MIG (original thread here, posted below for convenience).



All around it looks like a pretty secure firmware but it's good that researchers are able to understand it more and more.



One of the comments in the twitter thread says basically I think it can run on cheaper hardware if the security is removed and it would be easier to write the new firmware from scratch rather then decrypt / clone the Mig Switch firmware. Hopefully it happens.

https://nitter.poast.org/hexkyz/status/1965087742486020506#m
 
nice share 25 bucks:glare:
There really isn’t much I can do about that unfortunately

Filament, shipping and electric usage are not free. There’s like 30 cents of overhead here lol the only way to do it cheaper would be if I made these large batches en masse
 
Last edited by TheStonedModder,
There really isn’t much I can do about that unfortunately

Filament, shipping and electric usage are not free. There’s like 30 cents of overhead here lol the only way to do it cheaper would be if I made these large batches en masse
I think was 10 bucks for the STL file!
 
  • Like
Reactions: Razorbacktrack
The STL file is purely digital and doesn’t have to worry about any of the details I listed

Even sending that STL to someone like pcbway for printing will cost more. My clear MiG flash shelll cost me $40 from them
I you have a3d printer (like me self) the STL file will cost no much.
 
  • Like
Reactions: Razorbacktrack
I you have a3d printer (like me self) the STL file will cost no much.
I agree, that’s why I initially offered the file for free (about a year) but then Etsy folks stole it and my hours of hard work

If you have a better solution please tell me. That sounds mean and I genuinely do not mean it as such.

I figured replacement parts will be useful for some still instead of not offering them at all like I was for a minute. I’m not profiting off of those links or well I am it’s 20 cents but that’s because it’s the lowest I could put. Otherwise it would be costing me more in shipping and filament

Just to explain my thought process if you have any other solution, I genuinely would love to hear it. I am just don’t want to cater to the leeches no more while also not screwing over the community.
 
Etsy has new rules when it comes to 3D printed items. You are no longer allowed to sell 3D printed items that you didn't personally design. They should allow prints that the seller has a license to sell commercially even if they didn't make the model.
 
  • Like
Reactions: Blythe93
Etsy has new rules when it comes to 3D printed items. You are no longer allowed to sell 3D printed items that you didn't personally design. They should allow prints that the seller has a license to sell commercially even if they didn't make the model.
They might have the rule but they don’t enforce it

I’ve been emailing Etsy support for months now and nothing ever happens

No one should have a license to sell the files I shared with the community. That’s why I took em down because people where violating that
 
Hey guys, i just bought my first switch game original on a cartride and i dumped it just now with the mig dumper (i was trying for hours to update it with ubuntu so my pc with win11 can detect the dumper but nothing worked until i stumbled on a tool called mig updater and with that it finally worked. Couldnt find any of these infos on this forum at all, so i was thinking first the mig updater could be scam and break my dumper but i am glad i gave it a try).

Well, i got a Folder called like: BLABLA123BLABLA.XCI

Inside the Folder i have files called exactly this:
ROM (Card ID Set).bin
ROM (Card UID).bin
ROM (Certificate).bin
ROM (Initial Data).bin
ROM.xci

Buf according this guide and even on youtube videos, peoples folders look different and even their .bin files. According some infos, i dont need to rename anything and can copy this folder to the sd card of the mig and it should work. But i gonna ask here before i risk a ban since i have a limited zelda switch oled edition.
 
  • Like
Reactions: Blythe93
Hey guys, i just bought my first switch game original on a cartride and i dumped it just now with the mig dumper (i was trying for hours to update it with ubuntu so my pc with win11 can detect the dumper but nothing worked until i stumbled on a tool called mig updater and with that it finally worked. Couldnt find any of these infos on this forum at all, so i was thinking first the mig updater could be scam and break my dumper but i am glad i gave it a try).

Well, i got a Folder called like: BLABLA123BLABLA.XCI

Inside the Folder i have files called exactly this:
ROM (Card ID Set).bin
ROM (Card UID).bin
ROM (Certificate).bin
ROM (Initial Data).bin
ROM.xci

Buf according this guide and even on youtube videos, peoples folders look different and even their .bin files. According some infos, i dont need to rename anything and can copy this folder to the sd card of the mig and it should work. But i gonna ask here before i risk a ban since i have a limited zelda switch oled edition.
That’s fine and won’t cause a ban as long as it really is your own personal private dump
 

Site & Scene News

Popular threads in this forum