Hacking [Release] Kii U Generator

dojafoja

life elevated
OP
Member
Joined
Jan 2, 2014
Messages
696
Trophies
1
XP
2,614
Country
This is my take, a Python implementation, of the Wii U title key generating algorithm that recently surfaced online.

Source: https://github.com/dojafoja/Kii-U-Generator

IF YOU RECEIVE AN ERROR ABOUT NO MODULE NAMED CRYPTO:
Your Python setup doesn't include the pycrypto or pycryptodome library. You must first install one of these before you can use this tool, it is recommended that you install pycryptodome since it is still maintained:
Code:
python -m pip install pycryptodome
Usage:
First, open the ckey.json file and put the Wii U common key in here as plaintext. This is a json file so keep the structure as is.

1: You can use the provided GUI by running gui.py. This should be straightforward to use.
2: You can use as a CLI tool by running
Code:
keygen.py <title id> [password]
Please note that the password argument is optional and will default to "mypass" which is correct for all games that I have tested so far. System titles, however, require a different password that I'm not sure of.
3: You can include this into a Python script and use as a library. Please read the source code to see available functions

What does this do? It can generate unencrypted AND encrypted title keys for the Wii U. It's a Python implementation of the PHP algorithm that recently surfaced. It's probably not very useful to most people but I had fun writing it and I learned a few new things so.... I wanted to share it! A big thank you goes to @V10lator for helping me with my snags along the way, mostly relating to the proper padding/unpadding of things. Thank you for being so nice and helping me understand these things!!
 
Last edited by dojafoja,

V10lator

Well-Known Member
Member
Joined
Apr 21, 2019
Messages
2,687
Trophies
1
Age
36
XP
5,673
Country
Germany
  • Like
Reactions: jeannotte

Trishul

Member
Newcomer
Joined
Sep 6, 2020
Messages
16
Trophies
0
Age
49
XP
87
Country
United States
When trying to launch either the GUI or CLI I keep getting an error (see screenshot) about a module named Crypto not found. Is there something I'm doing wrong?
 

Attachments

  • IMG_3232.JPG
    IMG_3232.JPG
    2.8 MB · Views: 475

dojafoja

life elevated
OP
Member
Joined
Jan 2, 2014
Messages
696
Trophies
1
XP
2,614
Country
When trying to launch either the GUI or CLI I keep getting an error (see screenshot) about a module named Crypto not found. Is there something I'm doing wrong?
Hi there! It sucks that your Python setup doesn't come with the pycrypto library as standard. You must be on a Mac? I only test on Windows and various Linux distros. Most versions of Python come with this library already but Mac likes to complicate things. It should be an easy fix by installing pycrypto. https://pypi.org/project/pycrypto/

Code:
python -m pip install pycrypto
 
  • Like
Reactions: Trishul

Trishul

Member
Newcomer
Joined
Sep 6, 2020
Messages
16
Trophies
0
Age
49
XP
87
Country
United States
Hi there! It sucks that your Python setup doesn't come with the pycrypto library as standard. You must be on a Mac? I only test on Windows and various Linux distros. Most versions of Python come with this library already but Mac likes to complicate things. It should be an easy fix by installing pycrypto. https://pypi.org/project/pycrypto/

Code:
python -m pip install pycrypto
I'm running into repeated errors about missing components (GMP or MPIR, basetsd.h, etc.) after several attempts to install this package. Do you know of Python installer that includes Pycrypto as standard? I'm running Windows 10 and picked up the basic installer from their main website and setup with default options. Thanks!
 

Attachments

  • IMG_3233.JPG
    IMG_3233.JPG
    1.4 MB · Views: 408

dojafoja

life elevated
OP
Member
Joined
Jan 2, 2014
Messages
696
Trophies
1
XP
2,614
Country
I'm running into repeated errors about missing components (GMP or MPIR, basetsd.h, etc.) after several attempts to install this package. Do you know of Python installer that includes Pycrypto as standard? I'm running Windows 10 and picked up the basic installer from their main website and setup with default options. Thanks!
It turns out that I'm wrong about a couple of things.
Pycrypto might not be a standard library like I thought it was and is actually kind of deprecated. I wouldn't have used it if I knew that. I think I just so happen to have it installed on every single one of my python versions, except on Windows 10, which I apparently didn't test on because im having problems there too. I will work it out later after work, Thanks for bringing it to my attention.
 
  • Like
Reactions: Trishul

Trishul

Member
Newcomer
Joined
Sep 6, 2020
Messages
16
Trophies
0
Age
49
XP
87
Country
United States
It turns out that I'm wrong about a couple of things.
Pycrypto might not be a standard library like I thought it was and is actually kind of deprecated. I wouldn't have used it if I knew that. I think I just so happen to have it installed on every single one of my python versions, except on Windows 10, which I apparently didn't test on because im having problems there too. I will work it out later after work, Thanks for bringing it to my attention.
Actually I got this working fine with the current pycryptodome library. I tested it with some WUDs of retail only disc titles and it's not generating any accepted titlekeys trying all three of those known passwords. The title IDs I tried: 00050000-1010CF00, 00050000-1010E700, 00050000-10143200. Next I'll look into testing it on some more retail disc-only titles with known good titlekeys.
 

Trishul

Member
Newcomer
Joined
Sep 6, 2020
Messages
16
Trophies
0
Age
49
XP
87
Country
United States
It turns out that I'm wrong about a couple of things.
Pycrypto might not be a standard library like I thought it was and is actually kind of deprecated. I wouldn't have used it if I knew that. I think I just so happen to have it installed on every single one of my python versions, except on Windows 10, which I apparently didn't test on because im having problems there too. I will work it out later after work, Thanks for bringing it to my attention.
Update: I tried these 3 other Disc-only Titles with known valid disc keys: 0005000010146800, 000500001010dc00, 0005000010134e00 and it turns out your app doesn't generate the same keys trying all 3 of those known passwords. I'm assuming there's only one valid key for each title.
 

dojafoja

life elevated
OP
Member
Joined
Jan 2, 2014
Messages
696
Trophies
1
XP
2,614
Country
Update: I tried these 3 other Disc-only Titles with known valid disc keys: 0005000010146800, 000500001010dc00, 0005000010134e00 and it turns out your app doesn't generate the same keys trying all 3 of those known passwords. I'm assuming there's only one valid key for each title.
I'm not sure what you mean? I just tested it with 0005000010146800 and it generated the correct title key. I actually downloaded a dumped ticket for this title and extracted the title key myself and it matched the output of the generator.
 

Trishul

Member
Newcomer
Joined
Sep 6, 2020
Messages
16
Trophies
0
Age
49
XP
87
Country
United States
I'm not sure what you mean? I just tested it with 0005000010146800 and it generated the correct title key. I actually downloaded a dumped ticket for this title and extracted the title key myself and it matched the output of the generator.
See the attached screenshot. Does the output jive with your result? All I know is it doesn't match the working Key I have for this title, which I tested by WUP installing on a console.
As further test, can you PM me your Key output for these 2 disc-only titles I don't have proven keys for: 000500001010E700, 0005000010143200. I'll update you with the result. Thanks!
 

dojafoja

life elevated
OP
Member
Joined
Jan 2, 2014
Messages
696
Trophies
1
XP
2,614
Country
See the attached screenshot. Does the output jive with your result? All I know is it doesn't match the working Key I have for this title, which I tested by WUP installing on a console.
As further test, can you PM me your Key output for these 2 disc-only titles I don't have proven keys for: 000500001010E700, 0005000010143200. I'll update you with the result. Thanks!
You're gonna want to remove that screenshot because it contains a valid title key and yes that title key is correct. The only way it could be different is if it were packed up using NusPacker, in which case it would more than likely be encrypted with a different key
 
  • Like
Reactions: Trishul

Trishul

Member
Newcomer
Joined
Sep 6, 2020
Messages
16
Trophies
0
Age
49
XP
87
Country
United States
Ok NusPacker must have been used with these titles, and I didn't know it generated a different key other than the disk key. Many thanks for enlightening me!
 

dojafoja

life elevated
OP
Member
Joined
Jan 2, 2014
Messages
696
Trophies
1
XP
2,614
Country
Ok NusPacker must have been used with these titles, and I didn't know it generated a different key other than the disk key. Many thanks for enlightening me!
If NusPacker was used, it should have generated a title.tik file with the encrypted title key in it. NusPacker generates the same title key every time, unless you specify the -encryptionKey option when running it. It doesnt matter what key the contents were encrypted with as long as the encrypted key in the ticket gets decrypted and matches what the contents were encrypted with. I hope that makes sense....
 
Last edited by dojafoja,

asper

Well-Known Member
Member
Joined
May 14, 2010
Messages
942
Trophies
1
XP
2,030
Country
United States
See the attached screenshot. Does the output jive with your result? All I know is it doesn't match the working Key I have for this title, which I tested by WUP installing on a console.
As further test, can you PM me your Key output for these 2 disc-only titles I don't have proven keys for: 000500001010E700, 0005000010143200. I'll update you with the result. Thanks!
Necro-answer maybe useful for others: disc AES keys are different form NUS title keys (maybe they are also differently generated), this is the reason why they do not match.
 
  • Like
Reactions: oslo83

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BigOnYa @ BigOnYa:
    A friend give me a $35 cigar, and pssf, just as good as a $5 one. But of course gonna have to tell him it was awesome.
  • Psionic Roshambo @ Psionic Roshambo:
    What makes a good Cuban rum soaked cigar is a nice cosmopolitan to go with it.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Used to do that every time I went to Miami on business
  • Psionic Roshambo @ Psionic Roshambo:
    There was this little bar I would stop in have that combo and watch the beach
    +1
  • BigOnYa @ BigOnYa:
    I've never met a girl named cosmopolitan, but cool. And where do you insert the cigar? Mr clinton
  • Psionic Roshambo @ Psionic Roshambo:
    Slightly more than 35 dollars lol but I was making thousands on a job.
  • Psionic Roshambo @ Psionic Roshambo:
    Cosmopolitan is just vodka and cranberry juice lol
  • Psionic Roshambo @ Psionic Roshambo:
    I'm a martini glass
  • K3Nv2 @ K3Nv2:
    My dental assistant is Cuban I'm gonna have to him for cigars and sandwiches now
    +1
  • BigOnYa @ BigOnYa:
    Yea wish I could get Cubans cheap, they are ridiculous priced up here. But they are hard workers.
  • Psionic Roshambo @ Psionic Roshambo:
    I think I was paying like 75 back in the early 90s
  • Psionic Roshambo @ Psionic Roshambo:
    Rolled on the thighs of virgins if the stories are to be believed
  • K3Nv2 @ K3Nv2:
    I don't think we belive any of your stories
  • Psionic Roshambo @ Psionic Roshambo:
    That's honestly for the best lol
  • BigOnYa @ BigOnYa:
    I'd read his autobiography.
  • K3Nv2 @ K3Nv2:
    "If I may have done it."
  • Psionic Roshambo @ Psionic Roshambo:
    I'm deliberately vague about some of the details sure it's been 30 years but some crimes don't have limitations
  • K3Nv2 @ K3Nv2:
    Psis sex life is Dubai
    FB-IMG-1717887564361.jpg
  • BigOnYa @ BigOnYa:
    Or I picture its like quagmire from family guy, gigity.
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    Back then I was so wasteful with money, didn't bother me to spend 600 bucks in a strip club, some of those private dances though... Lol
  • Psionic Roshambo @ Psionic Roshambo:
    My life back then was a mix of Breaking Bad and John Wick and Dumb and Dumber lol
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    The things we do as kids so lucky to be alive lol
    +1
  • Sonic Angel Knight @ Sonic Angel Knight:
    Kids put chocolate in their pockets :ninja:
    K3Nv2 @ K3Nv2: https://youtu.be/ulOHdCUXz6s?si=zVb-MdOFLsk-28mk