Hacking RELEASE CertNXtractionPack - Get your Switch cert from a NAND dump!

andijames

Well-Known Member
Member
Joined
Jan 28, 2016
Messages
428
Trophies
0
Age
43
Location
Manchester
XP
759
Country
United Kingdom
Why are people panicking and getting their knickers in a twist here? You use a tool to download games from Nintendo's network you're running the risk of getting screwed over. That's pretty black and white to me.. it's your choice as adults if you use it. Just thank the OP for the tool and be grateful if you do wish to use it.
 
  • Like
Reactions: wicksand420

asper

Well-Known Member
Member
Joined
May 14, 2010
Messages
942
Trophies
1
XP
2,030
Country
United States
I got " module 'asn1' has no attribute 'Decoder' " error using "convert_to_der.py" script (I got clcert.der); any hint about how to solve ? (I only obtained clcert.der )
 
Last edited by asper,

SocraticBliss

Well-Known Member
Member
Joined
Jun 3, 2017
Messages
130
Trophies
0
Age
36
XP
273
Country
United States
I got " module 'asn1' has no attribute 'Decoder' " error using "convert_to_der.py" script (I got clcert.der); any hint about how to solve ? (I only obtained clcert.der )

Was this using my scripts or the ones in the OP? I think my scripts tell you which pre-requisite python modules you may be missing... give it a shot.
 

asper

Well-Known Member
Member
Joined
May 14, 2010
Messages
942
Trophies
1
XP
2,030
Country
United States
Was this using my scripts or the ones in the OP? I think my scripts tell you which pre-requisite python modules you may be missing... give it a shot.
Tested your one: it says pycrypto is missing but it is not the problem because the error is in asn1 module (pycrypto gets loaded before asn1 so I suppose the problem is in asn1 - i am using python3).
 

SocraticBliss

Well-Known Member
Member
Joined
Jun 3, 2017
Messages
130
Trophies
0
Age
36
XP
273
Country
United States
Tested your one: it says pycrypto is missing but it is not the problem because the error is in asn1 module (pycrypto gets loaded before asn1 so I suppose the problem is in asn1 - i am using python3).

If you're testing it from the first script, it's only trying to import Crypto.cipher from AES and Crypto.Util from Counter. So you either need pycrypto or pycryptodome.

Make sure you have the Visual Studio 2017 Python Build Tools installed, you are probably missing this...
 
  • Like
Reactions: asper

asper

Well-Known Member
Member
Joined
May 14, 2010
Messages
942
Trophies
1
XP
2,030
Country
United States
If you're testing it from the first script, it's only trying to import Crypto.cipher from AES and Crypto.Util from Counter. So you either need pycrypto or pycryptodome.

Make sure you have the Visual Studio 2017 Python Build Tools installed, you are probably missing this...
I finally managed to get the proper cert (reinstall python3 under linux); now I get a .nca file from the cdn, i decrypted it using hactool and now I have a .istorage file... how can I decrypt it assuming I have the correct title key ? Can someone show me the hactool command to extract it ?
 

ZeroFX

why?
Member
Joined
Jun 18, 2018
Messages
1,117
Trophies
1
Location
napaJ
XP
3,023
Country
Japan
No, no, no!!!
That's completely incorrect.
Assuming you're on 5.0.2, find "F5D06292E093C651E67AA7C1A93B3880.nca" then decrypt and extract it in hactool.
Open the main file in a hex editor, then search for the hint bytes I gave in the script. Both are 16-bytes (32 characters) long.
And for 5.1? i cant find this file on SYSTEM partition.
 

ElyosOfTheAbyss

Well-Known Member
Member
Joined
Aug 20, 2015
Messages
2,225
Trophies
1
XP
1,911
Country
Traceback (most recent call last):
File "00_generate_ssl_kek.py", line 3, in <module>
from Crypto.Cipher import AES
ImportError: No module named Crypto.Cipher
Tried to run the first script but was greeted to this error. I did instal pycrypto and also tried pycryptodome.
 

SocraticBliss

Well-Known Member
Member
Joined
Jun 3, 2017
Messages
130
Trophies
0
Age
36
XP
273
Country
United States
Tried to run the first script but was greeted to this error. I did instal pycrypto and also tried pycryptodome.

EDIT: Here, I made it easier for you, if you have a keys.txt file in the same directory (in the hactool format, ie. key = 32 digit hex value), it will automatically use the key, so you don't have to edit the script at all! :)

EDIT: I have added @JupiterJesus 's commit!

EDIT: Refer to latest post
 
Last edited by SocraticBliss,

einfuchsdrache

Well-Known Member
Newcomer
Joined
Sep 6, 2016
Messages
83
Trophies
0
Age
27
XP
377
Country
Gambia, The
Hey, how can I turn my PRODINFO into a PRODINFO.bin? I have everything dumped but it seems to be encrypted or something because it doesn't have the .bin extension.
 

SocraticBliss

Well-Known Member
Member
Joined
Jun 3, 2017
Messages
130
Trophies
0
Age
36
XP
273
Country
United States
Hey, how can I turn my PRODINFO into a PRODINFO.bin? I have everything dumped but it seems to be encrypted or something because it doesn't have the .bin extension.

1) Open your RawNand.bin dump in HacDiskMount
2) Double-Click on PRODINFO
3) Enter the BIS Key 0 values for Upper and Lower
4) Click the Test/Save buttons
6) Dump to File (with the bin extension...)
 

ElyosOfTheAbyss

Well-Known Member
Member
Joined
Aug 20, 2015
Messages
2,225
Trophies
1
XP
1,911
Country

SocraticBliss

Well-Known Member
Member
Joined
Jun 3, 2017
Messages
130
Trophies
0
Age
36
XP
273
Country
United States
I get a syntax error.

Lines 16-19 don't need to be modified, here they are again in case you deleted them/overwrote them...
Code:
keys = [['rsa_private_kek_generation_source', rsa_private_kek_generation_source, 'F3A68FC81509A41372EC479FD79019FE719A6DA7804B5557432A78F27DD74E49'],
        ['master_key_00', master_key_00,                                         '0EE359BE3C864BB0782E1D70A718A0342C551EED28C369754F9C4F691BECF7CA'],
        ['key_x', key_x,                                                         '69A08E62E0AE507BB5DA0E65179AE3BE051FED3C49941DF4EF2956D36D30110C'],
        ['key_y', key_y,                                                         '1C86F363265417D499229EB1C4ADC7479B2A15F931261F31EE6776AEB4C76542']]

You only have to edit lines 11, 12, 13, 14 with the hex key values...

For example, replace EF2C with all 32 digits (16 bytes) of the hex key.
 

Djchubby

New Member
Newbie
Joined
Jul 6, 2018
Messages
4
Trophies
0
Age
49
XP
62
Country
Italy
I should add it in a new thread. So avoid that the last messages like this are not read and keep asking how to do it.
Sorry if I'm writing to You, I followed Your guide on each step and I have obtained prodinfo file, but now I arrived at step 19 and You tell to insert some keys into the python script, but You do not tell which keys to put into and how to put them into the script: I have my personal console keys and master keys from 00 to 04!
I'm asking which keys to put into and if notepad is good to modify the python scripts of the certnxtraction pack!
Thank You very much!
 

Undi

TRASH 悲しい天使
Member
Joined
Feb 22, 2014
Messages
344
Trophies
0
Age
28
XP
1,361
Country
Belgium
Alright guys, I made a version that I think handles a lot of the errors encountered thus far, it won't auto install dependencies or anything crazy, so I suggest opening cmd.exe and doing the following commands first...

pip install pycrypto
pip install enum34
pip install future
pip install asn1

Then do the following...
  • Download the attached zip and extract it to your Desktop.
  • Dump your SYSNAND (via hekate).
  • Decrypt (BIS 0 Key) and Extract your PRODINFO.bin to your working directory (via BisKeyDump and HacDiskMount).
  • Insert the 4 required keys in the top of the CertNXtractionPack.py script.
  • Run CertNXtractionPack.cmd
Let me know if you guys run into any problems (so I can quickly fix it!)

FUCK THIS SHIT DUDE...
Trying to extract my cert for like 2 hours and nothing work here, shit.
What am I doing wrong???

Python 2.7:
HtdKXVM.png

Python 3.7:
HtdLN1C.png
 
Last edited by Undi,

SocraticBliss

Well-Known Member
Member
Joined
Jun 3, 2017
Messages
130
Trophies
0
Age
36
XP
273
Country
United States

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • BigOnYa @ BigOnYa:
    Biomutant looks cool tho, may have to try that
  • Quincy @ Quincy:
    Usually when such a big title leaks the Temp will be the first to report about it (going off of historical reports here, Pokemon SV being the latest one I can recall seeing pop up here)
  • K3Nv2 @ K3Nv2:
    I still like how a freaking mp3 file hacks webos all that security defeated by text yet again
  • BigOnYa @ BigOnYa:
    They have simulators for everything nowdays, cray cray. How about a sim that shows you playing the Switch.
  • K3Nv2 @ K3Nv2:
    That's called yuzu
    +1
  • BigOnYa @ BigOnYa:
    I want a 120hz 4k tv but crazy how more expensive the 120hz over the 60hz are. Or even more crazy is the price of 8k's.
  • K3Nv2 @ K3Nv2:
    No real point since movies are 30fps
  • BigOnYa @ BigOnYa:
    Not a big movie buff, more of a gamer tbh. And Series X is 120hz 8k ready, but yea only 120hz 4k games out right now, but thinking of in the future.
  • K3Nv2 @ K3Nv2:
    Mostly why you never see TV manufacturers going post 60hz
  • BigOnYa @ BigOnYa:
    I only watch tv when i goto bed, it puts me to sleep, and I have a nas drive filled w my fav shows so i can watch them in order, commercial free. I usually watch Married w Children, or South Park
  • K3Nv2 @ K3Nv2:
    Stremio ruined my need for nas
  • BigOnYa @ BigOnYa:
    I stream from Nas to firestick, one on every tv, and use Kodi. I'm happy w it, plays everything. (I pirate/torrent shows/movies on pc, and put on nas)
  • K3Nv2 @ K3Nv2:
    Kodi repost are still pretty popular
  • BigOnYa @ BigOnYa:
    What the hell is Kodi reposts? what do you mean, or "Wut?" -xdqwerty
  • K3Nv2 @ K3Nv2:
    Google them basically web crawlers to movie sites
  • BigOnYa @ BigOnYa:
    oh you mean the 3rd party apps on Kodi, yea i know what you mean, yea there are still a few cool ones, in fact watched the new planet of the apes movie other night w wifey thru one, was good pic surprisingly, not a cam
  • BigOnYa @ BigOnYa:
    Damn, only $2.06 and free shipping. Gotta cost more for them to ship than $2.06
  • BigOnYa @ BigOnYa:
    I got my Dad a firestick for Xmas and showed him those 3rd party sites on Kodi, he loves it, all he watches anymore. He said he has got 3 letters from AT&T already about pirating, but he says f them, let them shut my internet off (He wants out of his AT&T contract anyways)
  • K3Nv2 @ K3Nv2:
    That's where stremio comes to play never got a letter about it
  • BigOnYa @ BigOnYa:
    I just use a VPN, even give him my login and password so can use it also, and he refuses, he's funny.
  • BigOnYa @ BigOnYa:
    I had to find and get him an old style flip phone even without text, cause thats what he wanted. No text, no internet, only phone calls. Old, old school.
    K3Nv2 @ K3Nv2: @BigOnYa...