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

Imancol

Otak Productions
Member
Joined
Jun 29, 2017
Messages
1,376
Trophies
0
XP
2,766
Country
Colombia
1) My script
2) 02_convert_to_der.py
3) 03_save_as_pfx.bat

(you may have to modify the 03 to use type instead of cat if you don't have mingw installed)

Code:
openssl x509 -inform DER -in clcert.der -outform PEM -out clcert.pem
openssl rsa -inform DER -in privkey.der -outform PEM -out privkey.pem
type clcert.pem privkey.pem > nx_tls_client_cert.pem
openssl pkcs12 -export -in nx_tls_client_cert.pem -out nx_tls_client_cert.pfx -passout pass:switch
del privk.bin
del clcert.der
del privkey.der
del clcert.pem
del privkey.pem
del nx_tls_client_cert.pem
import binascii, sys, random, asn1
ModuleNotFoundError: No module named 'asn1'

Install ans1 with the command "pip install asn1" but I get an error.

Failed to read Private Key from privk.bin!
 
Last edited by Imancol,

Imancol

Otak Productions
Member
Joined
Jun 29, 2017
Messages
1,376
Trophies
0
XP
2,766
Country
Colombia
Gotta be able to install ans1... google why you aren't able to install the module...
This is what I did ...

Requirements:
Python and dependencies (asn1 and pycrypto)
PRODINFO.bin of your RawNAND
CertNXtractionPack
CertNXtractionPack.py


Guide:
Download everything and decompress.
Run CMD and install the Python dependencies.
Move your PRODINFO.bin to the CertNXtractionPack folder.
Move your CertNXtractionPack.py to the CertNXtractionPack folder.
edit CertNXtractionPack.py and place your Keys (Or use the first four digits to find the correct Keys)
Run CertNXtractionPack.py in your CMD window
Run 02_convert_to_der.py in your CMD window
Run 03_save_as_pfx.bat in your CMD window

You should have a folder called Out with the nx_tls_client_cert.pfx

It is important to do all this in a CMD window and not just running the script.

Note: I still appear nx_tls_client_cert.pfx with 0KB Solution?
 
Last edited by Imancol,

ut0pia

Member
Newcomer
Joined
Apr 30, 2018
Messages
17
Trophies
0
Age
42
XP
216
Country
France
It worked like a charm and i was able to download my purchased digital copy of Bayoneta.
Now I need a tuto to restore it on my sdcard :D
 

SocraticBliss

Well-Known Member
Member
Joined
Jun 3, 2017
Messages
130
Trophies
0
Age
36
XP
273
Country
United States
This is what I did ...

Requirements:
Python and dependencies (asn1 and pycrypto)
PRODINFO.bin of your RawNAND
CertNXtractionPack
CertNXtractionPack.py


Guide:
Download everything and decompress.
Run CMD and install the Python dependencies.
Move your PRODINFO.bin to the CertNXtractionPack folder.
Move your CertNXtractionPack.py to the CertNXtractionPack folder.
edit CertNXtractionPack.py and place your Keys (replace the Hash with the real Keys)
Run CertNXtractionPack.py in your CMD window
Run 02_convert_to_der.py in your CMD window
Run 03_save_as_pfx.bat in your CMD window

You should have a folder called Out with the nx_tls_client_cert.pfx

It is important to do all this in a CMD window and not just running the script.

Note: I still appear nx_tls_client_cert.pfx with 0KB Solution?

Did you edit the 03 file and rename cat to type? Try the zip I uploaded...
 

NANASHI89

Well-Known Member
Member
Joined
May 3, 2012
Messages
2,473
Trophies
1
XP
5,358
Country
United States
Run python3 -m pip install pycrypto
Untitled.png
 

Gnarmagon

Noob <3
Member
Joined
Dec 12, 2016
Messages
647
Trophies
0
Age
22
XP
794
Country
Germany
In that window, type...

pip install -m pycrypto
NO,

this is the python interpreter....

do the following:

you can exit by typing: "exit()"
then just type pip install pycrypto
OR
pip install pycryptodome

btw you seem to not know that the -m option is for python so it knows that you want to call the pip module and the correct command should be:

python -m pip install pycrypto

please test it before posting ._.
 
  • Like
Reactions: Subtle Demise

SocraticBliss

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

this is the python interpreter....

do the following:

you can exit by typing: "exit()"
then just type pip install pycrypto
OR
pip install pycryptodome

btw you seem to not know that the -m option is for python so it knows that you want to call the pip module and the correct command should be:

python -m pip install pycrypto

please test it before posting ._.

Bah calm down, mistakes happen :P
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • K3Nv2 @ K3Nv2:
    It must be the 1st already
  • BakerMan @ BakerMan:
    1st of what?
  • BakerMan @ BakerMan:
    may?
  • K3Nv2 @ K3Nv2:
    Oh yeah it's in September
  • Xdqwerty @ Xdqwerty:
    @BakerMan, yea i think its different
  • BakerMan @ BakerMan:
    ok, because here it's in september, right before the fuckin school year starts
  • Xdqwerty @ Xdqwerty:
    good night
  • BakerMan @ BakerMan:
    as to you
  • K3Nv2 @ K3Nv2:
    How do you know if the night will be good when you're asleep
  • BakerMan @ BakerMan:
    because i didn't say i was asleep
  • BakerMan @ BakerMan:
    i said i was sleeping...
  • BakerMan @ BakerMan:
    sleeping with uremum
  • K3Nv2 @ K3Nv2:
    Even my mum slept on that uremum
  • TwoSpikedHands @ TwoSpikedHands:
    yall im torn... ive been hacking away at tales of phantasia GBA (the USA version) and have so many documents of reverse engineering i've done
  • TwoSpikedHands @ TwoSpikedHands:
    I just found out that the EU version is better in literally every way, better sound quality, better lighting, and there's even a patch someone made to make the text look nicer
  • TwoSpikedHands @ TwoSpikedHands:
    Do I restart now using what i've learned on the EU version since it's a better overall experience? or do I continue with the US version since that is what ive been using, and if someone decides to play my hack, it would most likely be that version?
  • Sicklyboy @ Sicklyboy:
    @TwoSpikedHands, I'll preface this with the fact that I know nothing about the game, but, I think it depends on what your goals are. Are you trying to make a definitive version of the game? You may want to refocus your efforts on the EU version then. Or, are you trying to make a better US version? In which case, the only way to make a better US version is to keep on plugging away at that one ;)
  • Sicklyboy @ Sicklyboy:
    I'm not familiar with the technicalities of the differences between the two versions, but I'm wondering if at least some of those differences are things that you could port over to the US version in your patch without having to include copyrighted assets from the EU version
  • TwoSpikedHands @ TwoSpikedHands:
    @Sicklyboy I am wanting to fully change the game and bend it to my will lol. I would like to eventually have the ability to add more characters, enemies, even have a completely different story if i wanted. I already have the ability to change the tilemaps in the US version, so I can basically make my own map and warp to it in game - so I'm pretty far into it!
  • TwoSpikedHands @ TwoSpikedHands:
    I really would like to make a hack that I would enjoy playing, and maybe other people would too. swapping to the EU version would also mean my US friends could not legally play it
  • TwoSpikedHands @ TwoSpikedHands:
    I am definitely considering porting over some of the EU features without using the actual ROM itself, tbh that would probably be the best way to go about it... but i'm sad that the voice acting is so.... not good on the US version. May not be a way around that though
  • TwoSpikedHands @ TwoSpikedHands:
    I appreciate the insight!
    TwoSpikedHands @ TwoSpikedHands: I appreciate the insight!