Homebrew [RELEASE] TWLTool - DSi downgrading, save injection, etc multitool

Gadorach

Electronics Engineering Technologist
Member
Joined
Jan 22, 2014
Messages
970
Trophies
0
Location
Canada
XP
956
Country
Canada
Can you also PM me when it's done?
Sure.

Also, another heads up. The Biggest Loser won't have any kind of visual representation of having done its job. It'll start, there will be a black screen with music playing, and that's it. Wulfy didn't actually draw it to the screen, or even put a "Done!" message, just nothing, lmao.

Also, the exploit is a write-once, read-as-much-as-you-like kind of thing. You write in the hacked save, and it'll overwrite the contents of 0x800 -> 0x80F with the CID of the console you just put it in. You don't need to clear it each time.
 
Last edited by Gadorach,

nastys

ナースティス
Member
Joined
Aug 5, 2014
Messages
1,730
Trophies
0
Age
26
Location
Earth
XP
1,794
Country
Italy
I don't have The Biggest Loser nor a Raspberry Pi...
Is it possible to brute force the CID? Would it take much time on an i7-3770?
 

Gadorach

Electronics Engineering Technologist
Member
Joined
Jan 22, 2014
Messages
970
Trophies
0
Location
Canada
XP
956
Country
Canada
I don't have The Biggest Loser nor a Raspberry Pi...
Is it possible to brute force the CID? Would it take much time on an i7-3770?
@WulfyStylez mentioned it was totally possible to brute-force the CID, and it takes about a full day on an 8-threaded quad-core with hardware AES. No release on software to do it though. You should be able to do it with an Arduino UNO or Teensy++ 2.0 as well, but it's a bit more involved.

Additionally, more tricks-o-the-trade!

When reading and writing the NAND of the DSi, it doesn't actually need the battery present.
Plug in the console, plug in the SD reader, hold in the battery, power up to 0000FE00, and remove the battery. It'll stay on and RW will continue without needing to tape the battery on or hold it in place. No need to reassemble at all!
 
  • Like
Reactions: Margen67 and nastys

mb2010

Well-Known Member
Newcomer
Joined
Jan 12, 2015
Messages
63
Trophies
0
Age
34
XP
156
Country
@WulfyStylez mentioned it was totally possible to brute-force the CID, and it takes about a full day on an 8-threaded quad-core with hardware AES. No release on software to do it though. You should be able to do it with an Arduino UNO or Teensy++ 2.0 as well, but it's a bit more involved.

Additionally, more tricks-o-the-trade!

When reading and writing the NAND of the DSi, it doesn't actually need the battery present.
Plug in the console, plug in the SD reader, hold in the battery, power up to 0000FE00, and remove the battery. It'll stay on and RW will continue without needing to tape the battery on or hold it in place. No need to reassemble at all!

So many options for getting the CID. I have a raspberry pi and a teensy++ 2.0 just need info on what to do. Could just buy biggest loser but can't find it locally and don't want to wait for delivery.
 

nastys

ナースティス
Member
Joined
Aug 5, 2014
Messages
1,730
Trophies
0
Age
26
Location
Earth
XP
1,794
Country
Italy
@WulfyStylez mentioned it was totally possible to brute-force the CID, and it takes about a full day on an 8-threaded quad-core with hardware AES. No release on software to do it though. You should be able to do it with an Arduino UNO or Teensy++ 2.0 as well, but it's a bit more involved.

Additionally, more tricks-o-the-trade!

When reading and writing the NAND of the DSi, it doesn't actually need the battery present.
Plug in the console, plug in the SD reader, hold in the battery, power up to 0000FE00, and remove the battery. It'll stay on and RW will continue without needing to tape the battery on or hold it in place. No need to reassemble at all!
I can write a script for that, but I need to know what happens (what's displayed on the terminal, the size of the output file) when the CID is correct and what happens when it's not...

P.S.: I do have an Arduino UNO (a clone, actually), so how could I get the CID with that?
 

Gadorach

Electronics Engineering Technologist
Member
Joined
Jan 22, 2014
Messages
970
Trophies
0
Location
Canada
XP
956
Country
Canada
I can write a script for that, but I need to know what happens (what's displayed on the terminal, the size of the output file) when the CID is correct and what happens when it's not...

P.S.: I do have an Arduino UNO (a clone, actually), so how could I get the CID with that?
Read the source for the 3DS Debricker build for Arduino: https://github.com/krisztian1997/3dsunbricker/blob/master/sd_raw_roland.cpp
You'll want to add a new option to the menu that only uses the CID read code found in the "v - VERNAM CYPHER UNLOCK" method. You will need either an SD shield, or you'll have to add voltage splitters to the IO pins. 5v will fry the eMMC.

So many options for getting the CID. I have a raspberry pi and a teensy++ 2.0 just need info on what to do. Could just buy biggest loser but can't find it locally and don't want to wait for delivery.
For the rPi, use RPU: https://github.com/bkifft/RPU
When it starts up and gets to the menu, use the "(S)afe run (Query only)" option. It will read and display the CID register of the eMMC chip. You`ll have to type it in by hand in this case though, where as the Teensy and Arduino UNO have the Serial Monitor for the data to be directly copied.

I have successfully decrypted my DSi XL`s NAND though, and I'm in the middle of downgrading titles and injecting saves. I'm also doing that other thing that was requested.
 

WhoAmI?

PASTA's dirty animal
Member
Joined
Mar 15, 2015
Messages
1,276
Trophies
0
Location
Poké Ball
Website
lavanoid.github.io
XP
1,279
Country
Read the source for the 3DS Debricker build for Arduino: https://github.com/krisztian1997/3dsunbricker/blob/master/sd_raw_roland.cpp
You'll want to add a new option to the menu that only uses the CID read code found in the "v - VERNAM CYPHER UNLOCK" method. You will need either an SD shield, or you'll have to add voltage splitters to the IO pins. 5v will fry the eMMC.


For the rPi, use RPU: https://github.com/bkifft/RPU
When it starts up and gets to the menu, use the "(S)afe run (Query only)" option. It will read and display the CID register of the eMMC chip. You`ll have to type it in by hand in this case though, where as the Teensy and Arduino UNO have the Serial Monitor for the data to be directly copied.

I have successfully decrypted my DSi XL`s NAND though, and I'm in the middle of downgrading titles and injecting saves. I'm also doing that other thing that was requested.

*Hugs you, screaming "Pictochat!!!!!"* :-D
 

nastys

ナースティス
Member
Joined
Aug 5, 2014
Messages
1,730
Trophies
0
Age
26
Location
Earth
XP
1,794
Country
Italy
Read the source for the 3DS Debricker build for Arduino: https://github.com/krisztian1997/3dsunbricker/blob/master/sd_raw_roland.cpp
You'll want to add a new option to the menu that only uses the CID read code found in the "v - VERNAM CYPHER UNLOCK" method. You will need either an SD shield, or you'll have to add voltage splitters to the IO pins. 5v will fry the eMMC.


For the rPi, use RPU: https://github.com/bkifft/RPU
When it starts up and gets to the menu, use the "(S)afe run (Query only)" option. It will read and display the CID register of the eMMC chip. You`ll have to type it in by hand in this case though, where as the Teensy and Arduino UNO have the Serial Monitor for the data to be directly copied.

I have successfully decrypted my DSi XL`s NAND though, and I'm in the middle of downgrading titles and injecting saves. I'm also doing that other thing that was requested.
I don't have an SD shield nor voltage splitters :(
I think I'll create the script. I only need to know:
  • When the CID is wrong, if the output file exists and what's its size
  • When the CID is correct, what's the size of the output file
 

Gadorach

Electronics Engineering Technologist
Member
Joined
Jan 22, 2014
Messages
970
Trophies
0
Location
Canada
XP
956
Country
Canada
I don't have an SD shield nor voltage splitters :(
I think I'll create the script. I only need to know:
  • When the CID is wrong, if the output file exists and what's its size
  • When the CID is correct, what's the size of the output file
Well, it's pretty simple. If the CID is correct, you'll be able to open the decrypted NAND.bin in WinImage. If it's not, you won't. The tool doesn't really have any checks, it just does its thing and that's it. Image size is the same as your input NAND.bin, regardless of right or wrong.

And PS, you can make voltage splitters from a few resistors, it's not a fancy part. It's documented here: https://github.com/krisztian1997/3dsunbricker
and specifically here:https://arduinodiy.files.wordpress.com/2012/03/sd-card.jpg
 

nastys

ナースティス
Member
Joined
Aug 5, 2014
Messages
1,730
Trophies
0
Age
26
Location
Earth
XP
1,794
Country
Italy
Well, it's pretty simple. If the CID is correct, you'll be able to open the decrypted NAND.bin in WinImage. If it's not, you won't. The tool doesn't really have any checks, it just does its thing and that's it. Image size is the same as your input NAND.bin, regardless of right or wrong.
Really? Then I'll wait until @WulfyStylez adds an option to brute-force (if you do, don't forget to save the CID somewhere...), unless there is a way to use a 3DS to get the key.
 

WulfyStylez

SALT/Bemani Princess
OP
Member
Joined
Nov 3, 2013
Messages
1,149
Trophies
0
XP
2,877
Country
United States
CID bruteforcing is a longterm goal. The idea is to do basically the same as the 3DS CID bruteforcer, except with the first five bytes of the CID. The idea is that the first byte only has some 48ish combinations, and the u32 after that is easily crackable. Given, my time estimates were done using openSSL. Doing it through the existing source would be quite a bit slower, I think.

Also, about the Biggest Loser save, I only actually had like 0x780 bytes to write all the exploit code in. Drawing to screen wasn't really an option, unfortunately.
 

Gadorach

Electronics Engineering Technologist
Member
Joined
Jan 22, 2014
Messages
970
Trophies
0
Location
Canada
XP
956
Country
Canada
Really? Then I'll wait until @WulfyStylez adds an option to brute-force (if you do, don't forget to save the CID somewhere...), unless there is a way to use a 3DS to get the key.
You need to read the CID register from the eMMC chip. There's three available ways, and a fourth through the third.

1) The Biggest Loser
2) rPi via RPU
3) Arduino with SD shield or voltage divider via 3DSunbricker
3.1) Teensy++ 2.0 in 3v3 mode through Teensyduino and 3DSunbricker

Pick one, but the easiest is The Biggest Loser, followed by rPi.
 

GhostLatte

GBAtemp's Official Van Master™
Member
GBAtemp Patron
Joined
Mar 26, 2015
Messages
3,651
Trophies
3
Age
24
XP
11,203
Country
United States
Hopefully somebody will offer a service for this for the unfortunate souls who can't solder like me.
 

Gadorach

Electronics Engineering Technologist
Member
Joined
Jan 22, 2014
Messages
970
Trophies
0
Location
Canada
XP
956
Country
Canada
Alright, so SUDOKU is easy. Grab the decrypted old version from the same place as the 3DS thread. Open your decrypted NAND, and navigate to "title\00030004\4b344445\content", and replace the "00000001.app" with the old version, renamed to "00000001.app". No need to tinker with the TMD file, the one that's there is fine. Install the save the same way and you're golden.

For System Settings, grab the old version from NUSD (v512) and navigate to "title\00030015\484e4245\content" and delete the contents. Inject the "00000002.app", and the "tmd.512" renamed to "title.tmd". That's all.

For the DS Whitelist and Launcher (required to boot older Flashcarts), grab them both from NUSD (00030017484e4145 v512 (Launcher)) and (0003000f484e4841 v256 (Whitelist)).
Launcher goes in "title\00030017\484e4145\content" and Whitelist goes in "title\0003000f\484e4841\content". Make sure to rename tmds in both cases to "title.tmd", which replaces the one that was there.
 
Last edited by Gadorach,

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,230
Trophies
2
XP
34,609
Country
Mexico
Can I extract the save from the Four Swords DSiWare game from another 3DS and inject it into my N3DS Four Swords CIA in anyway by using this?
 

WulfyStylez

SALT/Bemani Princess
OP
Member
Joined
Nov 3, 2013
Messages
1,149
Trophies
0
XP
2,877
Country
United States
Alright, so SUDOKU is easy. Grab the decrypted old version from the same place as the 3DS thread. Open your decrypted NAND, and navigate to "title\00030004\4b344445\content", and replace the "00000001.app" with the old version, renamed to "00000001.app". No need to tinker with the TMD file, the one that's there is fine. Install the save the same way and you're golden.
To be safe, I do recommend grabbing the tmd from here in addition to this.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://youtu.be/PYUKEiLGHpQ?si=UosLAHElVkjIKfxN