Hacking Decrypt and Re-Encrypt NAND?

drfsupercenter

Flash Cart Aficionado
OP
Member
Joined
Mar 26, 2008
Messages
1,909
Trophies
1
XP
1,163
Country
United States
So...

With VoID's multi decryption tools, I noticed there is a function to decrypt your NAND. By itself that's probably not very useful, BUT

Could we potentially overcome the whole "you can only restore NAND backups from *your own system*" hurdle? Think about it.

Say you have one 3DS with the 4.x firmware on it. You have another one that's newer (maybe even a 2DS, who knows) and want to put DevMenu on there so you can install all the .cia files you want and be able to go online and everything too without needing a Gateway.

If you get a NAND flash port installed, and dump your NAND, couldn't you use VoID's tools to decrypt *that* NAND dump?

I'm not so sure how exactly the NAND is encrypted, but given that we can get xorpads now and decrypt the contents, couldn't we re-encrypt it using a different system's xorpads? In theory we could share a NAND image with friends and everybody just re-encrypt it with their own xorpads?

(I'm also thinking, couldn't you essentially change your system's region with this too? take a US and EUR system, dump both, encrypt one to the other, etc)
 

Ryanrocks462

Wii U/3DS Hacker.. Will test anything, A Pirate
Banned
Joined
Jun 18, 2014
Messages
566
Trophies
0
Location
California
XP
162
Country
United States
it wouldn't work since each console has its own unique Key and no one seems to know how to decrypt your consoles key, so once we are able to modify the console key of course , re-encrypting would be no problem
 

sgtkwol

Well-Known Member
Member
Joined
Oct 29, 2008
Messages
222
Trophies
0
XP
270
Country
United States
To confirm, xorpads are generated using the "everybody's 3DS" keys. Any way to write a similar program that will use a 4.x 3DS to sign with the "your 3DS" key?
 

drfsupercenter

Flash Cart Aficionado
OP
Member
Joined
Mar 26, 2008
Messages
1,909
Trophies
1
XP
1,163
Country
United States
To confirm, xorpads are generated using the "everybody's 3DS" keys. Any way to write a similar program that will use a 4.x 3DS to sign with the "your 3DS" key?

Yeah, this is what I was getting at.

I'm no programmer and have no idea how you would do this, but I'm sure it's possible. Thanks for explaining why it won't work at the moment though. Someone get on this! :P
 

Jayro

MediCat USB Dev
Developer
Joined
Jul 23, 2012
Messages
12,983
Trophies
4
Location
WA State
Website
ko-fi.com
XP
17,024
Country
United States
Seems like there would be some way to JTAG and/or debug the memory in real time, or save a memory dump while a nand encryption is taking place.
 

sgtkwol

Well-Known Member
Member
Joined
Oct 29, 2008
Messages
222
Trophies
0
XP
270
Country
United States
Please don't quote me as correct, unless someone more knowledgeable can confirm. I'm only stating what I think is correct based on what I've read/used.
 

misterb98

Moral Gateway User. Wat.
Member
Joined
Aug 24, 2010
Messages
449
Trophies
0
XP
290
Country
United States
Got it working! You apparently only need the larger file.

Code:
 make_cia -o patch.cia --major=5 --minor=7 --micro=0 --content0=00000006.app.out --id_0 00000006

It installed fine. For whatever reason, I now need to accept the online agreement, but whenever I hit accept (all in Japanese, :P) it says Accepted, but then goes to a screen in smash saying I need to accept the agreement. This is probably an issue people have worked around, any tips?
 

einstein95

Well-Known Member
Member
Joined
Aug 31, 2013
Messages
230
Trophies
0
Age
29
XP
312
Country
New Zealand
No, NAND xorpads are generated from the per-console key; and no, you can't simply xor NAND A with xorpad A to get the plain data then xor with xorpad B to run it on the console unless you copy certain files from console B (apparently).
 

drfsupercenter

Flash Cart Aficionado
OP
Member
Joined
Mar 26, 2008
Messages
1,909
Trophies
1
XP
1,163
Country
United States
No, NAND xorpads are generated from the per-console key; and no, you can't simply xor NAND A with xorpad A to get the plain data then xor with xorpad B to run it on the console unless you copy certain files from console B (apparently).

Yeah, I was saying *if* you have a NAND dump of both systems.

You can install a NAND flasher to any system, even if it's >4.5
And then you could take that image and decrypt it using a 4.5 system, no?

For the sake of testing, I now have multiple region 3DSes running 4.x firmware. So I can decrypt each system's NAND *on that system*

If anyone wants to give me some ideas to try, I can always see if I can flash it back to the other. Actually about to send the two systems out today to get NAND flashers installed so I don't have to worry about any permanent damage :P
 

shinyquagsire23

SALT/Sm4sh Leak Guy
Member
Joined
Nov 18, 2012
Messages
1,977
Trophies
2
Age
26
Location
Las Vegas
XP
3,765
Country
United States
Yeah, I was saying *if* you have a NAND dump of both systems.

You can install a NAND flasher to any system, even if it's >4.5
And then you could take that image and decrypt it using a 4.5 system, no?

For the sake of testing, I now have multiple region 3DSes running 4.x firmware. So I can decrypt each system's NAND *on that system*

If anyone wants to give me some ideas to try, I can always see if I can flash it back to the other. Actually about to send the two systems out today to get NAND flashers installed so I don't have to worry about any permanent damage :P

I'm actually curious about what's different between the two NANDs in terms of region. I believe smea once posted a pic where he was exploring the NAND filesystem a bit, although I'm not sure what filesystem it even has.
 

justinkb

Well-Known Member
Member
Joined
Oct 7, 2012
Messages
625
Trophies
1
XP
347
Country
Netherlands
Correctly implemented AES with console-unique (so they can't be "leaked") keys (of sufficient length) is unbreakable. Forget it.
 

shinyquagsire23

SALT/Sm4sh Leak Guy
Member
Joined
Nov 18, 2012
Messages
1,977
Trophies
2
Age
26
Location
Las Vegas
XP
3,765
Country
United States
Correctly implemented AES with console-unique (so they can't be "leaked") keys (of sufficient length) is unbreakable. Forget it.

We can already decrypt and (I believe) re-encrypt NAND partitions. The main issue is that there are some other console-specific bits in the firmware. Nintendo's System Transfer app itself literally copies stuff off the NAND to the other person's 3DS and then re-encrypts it under the new console's keys.
 

gamesquest1

Nabnut
Former Staff
Joined
Sep 23, 2013
Messages
15,153
Trophies
2
XP
12,247
We can already decrypt and (I believe) re-encrypt NAND partitions. The main issue is that there are some other console-specific bits in the firmware. Nintendo's System Transfer app itself literally copies stuff off the NAND to the other person's 3DS and then re-encrypts it under the new console's keys.
the actual main issue is that the main use of this would be to downgrade....but unless you can re-encrypt to the updated console you would need the xorpad for that specifc console.....which you cant get unless your on 4.x..........which pretty much leaves the only use for this as something like trying to make a US 3ds into a EU 3ds etc......both systems would still need to be on 4.x, but i suupose *theoretically* you could make yourself a different region emunand, which may be handy for say people importing a japanese N3ds but being able to boot into the EU firmware or something......but again i have no idea if its possible, but it sounds theoretically possible (more so than trying to modify the sysnand as at least if anything goes wrong with your emunand you can just wipe it without having to have a hardware mod
 

drfsupercenter

Flash Cart Aficionado
OP
Member
Joined
Mar 26, 2008
Messages
1,909
Trophies
1
XP
1,163
Country
United States
the actual main issue is that the main use of this would be to downgrade....but unless you can re-encrypt to the updated console you would need the xorpad for that specifc console.....which you cant get unless your on 4.x..........which pretty much leaves the only use for this as something like trying to make a US 3ds into a EU 3ds etc......both systems would still need to be on 4.x, but i suupose *theoretically* you could make yourself a different region emunand, which may be handy for say people importing a japanese N3ds but being able to boot into the EU firmware or something......but again i have no idea if its possible, but it sounds theoretically possible (more so than trying to modify the sysnand as at least if anything goes wrong with your emunand you can just wipe it without having to have a hardware mod

Yeah, you could downgrade [allthethings.png]

Think about how many people have a 3DS that is newer than 4.5, you could basically get one "donor" NAND from someone here and just re-encrypt it to their specific console, profit! They'd just have to solder a flash port in, which is certainly cheaper than trying to track down a 4.x 3DS.
 

gamesquest1

Nabnut
Former Staff
Joined
Sep 23, 2013
Messages
15,153
Trophies
2
XP
12,247
Yeah, you could downgrade [allthethings.png]

Think about how many people have a 3DS that is newer than 4.5, you could basically get one "donor" NAND from someone here and just re-encrypt it to their specific console, profit! They'd just have to solder a flash port in, which is certainly cheaper than trying to track down a 4.x 3DS.
i guess your missing the point....to get the unique per device encryption...the device would need to be hacked, if its hacked, whats the point?
you cant just make a nand work from one console one a updated console without having the target console hacked too so you can re-encrypt the "donor nand" using that 3ds's unique encryption
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • SylverReZ @ SylverReZ:
    Ninty can still make money filing false DMCAs.
    +1
  • realtimesave @ realtimesave:
    they need to have a strong line up on the launch titles too. I think they should move metroid prime 4 to the next console because by now it has been quite a while and there's no release date scheduled yet
  • realtimesave @ realtimesave:
    lol there's a guy selling mig switch in usa on ebay for $200/ea he's definitely going to get nailed with dmca by tomorrow
  • ZeroT21 @ ZeroT21:
    Wasn't Metroid Prime 4 teased all the way back in 2017? For the switch no less?
    :rofl2:
  • ZeroT21 @ ZeroT21:
    Pretty sure anyone buying the switch just for that got duped
  • realtimesave @ realtimesave:
    for $200? rofl.
  • realtimesave @ realtimesave:
    well as far as metroid prime 4 is concerned, the next system probably is similar enough to the current gen they can probably easily just slap it onto a next gen cart and call it good :P
  • K3Nv2 @ K3Nv2:
    The switch was about 350 in 2017
  • Metoroid0 @ Metoroid0:
    mabe where you live
  • K3Nv2 @ K3Nv2:
    Nintendo president Tatsumi Kimishima took the stage at the outset to reveal that Switch will launch globally on March 3, 2017 for $299.99—earlier than some had expected at the price many suspected. https://time.com/4632820/nintendo-switch-nx/
  • Psionic Roshambo @ Psionic Roshambo:
    The NES launched at like 250 and the rob and light gun kit was like 350 or something
  • Psionic Roshambo @ Psionic Roshambo:
    I was near the test market for the NES and man did it make my 2600 look like ass lol
  • K3Nv2 @ K3Nv2:
    There has to be some mutual agreement with them all anything over $600 is just pc territory
  • realtimesave @ realtimesave:
    next system rumored to launch at $400
  • realtimesave @ realtimesave:
    but I don't really believe any rumors yet
  • realtimesave @ realtimesave:
    need to have official info from N
  • Psionic Roshambo @ Psionic Roshambo:
    The 3DO and Neo Geo where like 700 bucks hmm the PS3 was stupid expensive at launch lol
  • Psionic Roshambo @ Psionic Roshambo:
    But at least the PS3 was only 500 for the cheapest one at launch
  • Psionic Roshambo @ Psionic Roshambo:
    My opinion is that 199.99 is the sweet spot but that spot is long gone lol
  • Psionic Roshambo @ Psionic Roshambo:
    Just played some Micheal Jackson Moonwalker.... Those poor parents trying desperately to protect their children
  • K3Nv2 @ K3Nv2:
    400 is a decent sweet spot if we get enough out of it
  • K3Nv2 @ K3Nv2:
    It's not like how it was when we were locked down to a few options and that's it
  • Psionic Roshambo @ Psionic Roshambo:
    For me just buying a Pi and some accessories fills that not a PC void new consoles have just put them close to PC prices and all the patching and updates makes me feel like I might as well just get a PC
    Psionic Roshambo @ Psionic Roshambo: For me just buying a Pi and some accessories fills that not a PC void new consoles have just put...