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

subcon959

@!#?@!
Member
Joined
Dec 24, 2008
Messages
5,847
Trophies
4
XP
10,125
Country
United Kingdom
My copy+paste muscles were aching after this but got there in the end lol.
Cheers

Edit: meant to post that in the other thread but they're related so it still counts.

Edit2: just a heads up, to get asn1 you gotta do a "pip3 install future" before you do "pip3 install asn1"
 
Last edited by subcon959,

Addconsult

Well-Known Member
Newcomer
Joined
Apr 29, 2018
Messages
61
Trophies
0
Age
40
XP
197
Country
Sweden
What if my "friend" would share his titelkey for a game. Would i be able to run it after i extract my cert key and use your HACDN tool to download it and then apply the "borrowed" titlekey? Have you tried this?
 

DotDotDot

Member
Newcomer
Joined
Apr 26, 2018
Messages
12
Trophies
0
Age
28
XP
79
Country
China
My copy+paste muscles were aching after this but got there in the end lol.
Cheers

Edit: meant to post that in the other thread but they're related so it still counts.

Edit2: just a heads up, to get asn1 you gotta do a "pip3 install future" before you do "pip3 install asn1"


Error when running 02, Cannot enter a non-constructed tag. Line 59. Any ideas? Thanks.
 

ut0pia

Member
Newcomer
Joined
Apr 30, 2018
Messages
17
Trophies
0
Age
42
XP
216
Country
France
Want your cert to access Nintendo's CDN, but you're not on 3.0.0 anymore so you can't run the PegaSwitch script?
Don't worry, I've got you covered!
Included in the pack is everything you need to generate a pfx certificate file from a NAND dump!

Usage:
  • First, make sure Python3 and both the asn1 and pycrypto modules are installed.
  • Next, copy your PRODINFO.bin partition into the folder
  • Now, add the required keydata into "00_generate_ssl_kek.py", then run it; this will output the ssl_kek.
  • Add the generated ssl_kek into "01_decrypt_privk_extract_cert.py", then run it, that will decrypt your private key and extract your cert.
  • Then, run "02_convert_to_der.py", which will convert the extracted files into DER.
  • Lastly, run "03_save_as_pfx.bat" to save it as an installable PFX certificate!
  • Voila! You can now find your generated certificate in the new folder named "Out"!
How 2 get dem keyz???
  • The first key is generated by XORing the AES_KEK (kek_mask 0) with the CryptoUsecase_RsaPrivate seed (kek_seed 1).
  • The second key is the original master key, you can extract it from your keyblobs using hactool.
  • The third and fourth keys are plaintext in the ssl sysmodule NSO.
  • Or alternatively, you can skip this entire step by finding the ssl_kek online, not giving links for obvious reasons... (Trust me, it's out there!)
Massive thanks to @SocraticBliss for helping me out with the python stuff and @SciresM for the RSA calcs required in script 02.

How do you get required keydata in step 3 ? Extracted my PRODINFO.bin from my nand backup but i don't know where to start

Didn't even read the tuto...
 
Last edited by ut0pia,

yyoossk

Well-Known Member
Member
Joined
Oct 18, 2017
Messages
200
Trophies
0
XP
2,418
Country
Japan
rsa_private_kek_generation_source = uhx('EF2C........................')
binascii.Error: Non-hexadecimal digit found
 

Imancol

Otak Productions
Member
Joined
Jun 29, 2017
Messages
1,376
Trophies
0
XP
2,766
Country
Colombia
@SimonMKWii I get this error

Traceback (most recent call last):
File "C:\Users\Iman\Documents\Nintendo\Switch\Hacks\Shop\CertNXtractionPack\00_generate_ssl_kek.py", line 3, in <module>
from Crypto.Cipher import AES
ModuleNotFoundError: No module named 'Crypto'
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • 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!