Hacking [Release] Kii U Generator

dojafoja

life elevated
OP
Member
Joined
Jan 2, 2014
Messages
695
Trophies
1
XP
2,637
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,760
Trophies
1
Age
36
XP
5,986
Country
Germany
  • Like
Reactions: jeannotte

Trishul

Member
Newcomer
Joined
Sep 6, 2020
Messages
16
Trophies
0
Age
50
XP
97
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: 508

dojafoja

life elevated
OP
Member
Joined
Jan 2, 2014
Messages
695
Trophies
1
XP
2,637
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
50
XP
97
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: 433

dojafoja

life elevated
OP
Member
Joined
Jan 2, 2014
Messages
695
Trophies
1
XP
2,637
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
50
XP
97
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
50
XP
97
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
695
Trophies
1
XP
2,637
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
50
XP
97
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
695
Trophies
1
XP
2,637
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
50
XP
97
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
695
Trophies
1
XP
2,637
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
949
Trophies
1
XP
2,105
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
  • No one is chatting at the moment.
  • BigOnYa @ BigOnYa:
    Or 3, he's moved into an apartment across the street from you, watching and waiting for the right time to pounce.
    +1
  • K3Nv2 @ K3Nv2:
    If you see nice things being moved in and massive pallets of old hard drives run
    +2
  • The_Dizzy_Vizzy @ The_Dizzy_Vizzy:
    @SylverReZ, life is just DUCKY!!!
    +1
  • The_Dizzy_Vizzy @ The_Dizzy_Vizzy:
    @K3Nv2, how's life for you?
  • The_Dizzy_Vizzy @ The_Dizzy_Vizzy:
    @K3Nv2, CHRIST, everybody is gone again!!! Maybe it's me, I only shower once a year... :(
  • SylverReZ @ SylverReZ:
    @The_Dizzy_Vizzy, Everybody might be busy with other things, you just got to be patient.
  • SylverReZ @ SylverReZ:
    I'm around if you want to chat. :)
  • SylverReZ @ SylverReZ:
    Don't expect an instant reply, though.
  • The_Dizzy_Vizzy @ The_Dizzy_Vizzy:
    It's all good chief, I'm going to watch the film TROY, with Brad Pitt, and on the 6th (this Friday) we are going to see "The Return", when Ulysses returns and kills EVRYBODY.
    +1
  • K3Nv2 @ K3Nv2:
    Like how it takes them ten minutes to find trumps shooter but can't find a guy that blows off the ceo of united health care
    +2
  • SylverReZ @ SylverReZ:
    @K3Nv2, The fuck?
  • K3Nv2 @ K3Nv2:
    Someone blowing off the ceo of a health insurance company?
  • SylverReZ @ SylverReZ:
    @The_Dizzy_Vizzy, Sounds like fun. Hope you guys enjoy the movie, let me know how it went afterwards.
    +1
  • The_Dizzy_Vizzy @ The_Dizzy_Vizzy:
    @SylverReZ, You like Brad Pitt? I've been saying for YEARS that this cat is going to get an Academy Award". Not that I care for that kind of shit, but he's a great actor. He finally got one for best supporting actor in "Once Upon A Time......In Hollywood". Great film. If you haven't seen it, by all means watch it. It's the story of Sharon Tate, who was SLAUGHTERD by the Manson family.
  • SylverReZ @ SylverReZ:
    @The_Dizzy_Vizzy, I've heard of Brat Pitt, he played one of the people in Fight Club.
    +1
  • The_Dizzy_Vizzy @ The_Dizzy_Vizzy:
    @SylverReZ, but the movie is a re-imagining of how this went, she lives. Great flick, sad subject matter...
    +1
  • The_Dizzy_Vizzy @ The_Dizzy_Vizzy:
    @SylverReZ, he's in a bunch of great films. Anyway Syl, and everyone else, I gotta jet. Love you guys so much, great to keep up with you in a chatroom!!!!
    +2
  • SylverReZ @ SylverReZ:
    @The_Dizzy_Vizzy, Yeah, take care man. You're an awesome dude.
    +1
  • The_Dizzy_Vizzy @ The_Dizzy_Vizzy:
    @K3Nv2, that was awful. I hope they catch that piece of shit and stick him in a cell to the day he dies...
  • The_Dizzy_Vizzy @ The_Dizzy_Vizzy:
    @SylverReZ. awww, I'm touched (but not like that)
    !!!
    +1
  • K3Nv2 @ K3Nv2:
    He was a ceo of an insurance company both equal pieces of shit
  • K3Nv2 @ K3Nv2:
    Had chili for dinner just to piss off the dentist tomorrow
    +2
  • Sicklyboy @ Sicklyboy:
    based
    Sicklyboy @ Sicklyboy: based