Hacking [Release] PlaiCDN: Download and create installable CIAs (or .3ds) with just a title ID and titlekey

DocKlokMan

Plugin Dev
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
there is, d0k3 only need to add it to decrypt9
Which he has done with his latest commit. You can now take a decTitleKey.bin file and encrypt it into an encTitleKey.bin file. I'm just waiting for the release because I don't have the environment to compile it myself
 

Deleted member 373223

Pink = Best colour
Member
Joined
Oct 8, 2015
Messages
4,099
Trophies
1
XP
2,790
Which he has done with his latest commit. You can now take a decTitleKey.bin file and encrypt it into an encTitleKey.bin file. I'm just waiting for the release because I don't have the environment to compile it myself
i have, but the BIG decrypted keys database bin is in te wrong way. and nobody actually have both the hex editing skills or time to waste to fix it
 

DocKlokMan

Plugin Dev
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
i have, but the BIG decrypted keys database bin is in te wrong way. and nobody actually have both the hex editing skills or time to waste to fix it
Are you referring to the one available by a certain database website that let's you download a decTitleKeys.bin of every submission?
 

demon77

Well-Known Member
Newcomer
Joined
May 4, 2015
Messages
62
Trophies
0
Age
54
XP
169
Country
Belgium
Ah, did d0k3 change the format of the decTitleKeys.bin from before? I'll look into it and see what can be done.

No the format from the site is wrong .

Right on. I will give you a hint on how to fix that file, though...
  • The first 4 byte of the file need to contain, in big endian, the number of entries to process in this file. D9 can't handle more than 1024 entries, so there's your first problem. (1024 in big endian is 0x00 0x04 0x00 0x00)
  • Each and every of those titlekey entries (starting at offset 0x10, each 0x20 byte long) has a wrong common key index. For eShop titles, set the first four byte (of each 0x20 big entry) to zero, it will work.
 

Ptrk25

Well-Known Member
Member
Joined
Sep 6, 2015
Messages
524
Trophies
0
Location
::1
XP
1,181
Country
Germany
No the format from the site is wrong .

Right on. I will give you a hint on how to fix that file, though...
  • The first 4 byte of the file need to contain, in big endian, the number of entries to process in this file. D9 can't handle more than 1024 entries, so there's your first problem. (1024 in big endian is 0x00 0x04 0x00 0x00)
  • Each and every of those titlekey entries (starting at offset 0x10, each 0x20 byte long) has a wrong common key index. For eShop titles, set the first four byte (of each 0x20 big entry) to zero, it will work.
I'm writing a script that it'll fix.
 
  • Like
Reactions: demon77

DocKlokMan

Plugin Dev
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
Alright, so I've tested a few things. It does indeed seem to be better to use FunKeyCIA to make your CIA's. I made one using the Encrypted TitleKey from one of my 3DS's and installed it on another which never had that title before. After dumping that 3DS's TitleKeys, both the encrypted and decrypted keys matched the original. This means the installed CIA made with FunKeyCIA is indistinguishable from an eShop title when it comes to checking it's validity with PlaiCDN.

PlaiCDN can still perform its Title Name and region lookup using encTitleKey.bin with a few modifications to the -deckey flag, so I'm currently looking at a way to merge the two's functionality and ultimately output a CSV that can be imported into Excel or MySQL databases.
 
Last edited by DocKlokMan,

cearp

瓜老外
Developer
Joined
May 26, 2008
Messages
8,729
Trophies
2
XP
8,537
Country
Tuvalu
Alright, so I've tested a few things. It does indeed seem to be better to use FunKeyCIA to make your CIA's. I made one using the Encrypted TitleKey from one of my 3DS's and installed it on another which never had that title before. After dumping that 3DS's TitleKeys, both the encrypted and decrypted keys matched the original. This means the installed CIA made with FunKeyCIA is indistinguishable from an eShop title when it comes to checking it's validity with PlaiCDN.

PlaiCDN can still perform its Title Name and region lookup using encTitleKey.bin with a few modifications to the -deckey flag, so I'm currently looking at a way to merge the two's functionality and ultimately output a CSV that can be imported into Excel or MySQL databases.
yes it is useful to get the name of the game, as for the region, i just looked at how plaicdn does it and trust me, it's doing it a weird way, trial and error.
that guy is missing a very simple way to detect region... :D
we can make a key verifier/clean up script. although i want people to only use encrypted keys, i do believe it is useful to have the decrypted keys because yeah... with them we can check if the key is real.
 

DocKlokMan

Plugin Dev
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
yes it is useful to get the name of the game, as for the region, i just looked at how plaicdn does it and trust me, it's doing it a weird way, trial and error.
that guy is missing a very simple way to detect region... :D
we can make a key verifier/clean up script. although i want people to only use encrypted keys, i do believe it is useful to have the decrypted keys because yeah... with them we can check if the key is real.
My intention is to dump both a decTitleKey.bin and an encTitleKey.bin from the same console. The first part of the script will load the TitleID's from decTitleKey.bin, check if they're valid then store the valid TitleIDs into an array. The second part then parses the encTitleKey.bin file, and for each valid TitleID in the array, grab the Title Name and region then export it as "Title_Name", TitleID, EncryptedKEY, region either in a formatted list you can pipe to a text file or as a CSV.
 
  • Like
Reactions: Xenosaiga

cearp

瓜老外
Developer
Joined
May 26, 2008
Messages
8,729
Trophies
2
XP
8,537
Country
Tuvalu
My intention is to dump both a decTitleKey.bin and an encTitleKey.bin from the same console. The first part of the script will load the TitleID's from decTitleKey.bin, check if they're valid then store the valid TitleIDs into an array. The second part then parses the encTitleKey.bin file, and for each valid TitleID in the array, grab the Title Name and region then export it as "Title_Name", TitleID, EncryptedKEY, region either in a formatted list you can pipe to a text file or as a CSV.
sure, i was going to make something similar in a few days/next week. if you want to make it now, by all means, go ahead :)
just make sure you don't get the region how it is being done in placdn, it's ugly
 

DocKlokMan

Plugin Dev
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
sure, i was going to make something similar in a few days/next week. if you want to make it now, by all means, go ahead :)
just make sure you don't get the region how it is being done in placdn, it's ugly
I may have to until I learn anything better, you can't find the region just from the product code alone. I'll see what I can tinker with, you've got me interested. I like to debug more than do anything from scratch so I'm sure your implementation will be much better.
 

cearp

瓜老外
Developer
Joined
May 26, 2008
Messages
8,729
Trophies
2
XP
8,537
Country
Tuvalu
I may have to until I learn anything better, you can't find the region just from the product code alone. I'll see what I can tinker with, you've got me interested. I like to debug more than do anything from scratch so I'm sure your implementation will be much better.
i'm just an amateur trust me, not a real dev :D
about the bolded text... oh can't you? ;)
 

Plailect

Well-Known Member
OP
Member
Joined
Jan 30, 2016
Messages
546
Trophies
1
XP
1,502
Country
United States
yes it is useful to get the name of the game, as for the region, i just looked at how plaicdn does it and trust me, it's doing it a weird way, trial and error.
that guy is missing a very simple way to detect region... :D
we can make a key verifier/clean up script. although i want people to only use encrypted keys, i do believe it is useful to have the decrypted keys because yeah... with them we can check if the key is real.

Could you perhaps make some constructive suggestions instead of constantly being an asshole?
 
  • Like
Reactions: AtlasFontaine

Aurora Wright

Well-Known Member
Member
Joined
Aug 13, 2006
Messages
1,550
Trophies
3
XP
4,499
Country
Italy
And frankly I could not give a single ****.
Are you like Aurora too?
(Going off topic here).
Honestly I'm always annoyed when they assume I'm male even though I have "Aurora" (which is my real name btw) as part of the username, and I even have my profile set to female, just because I can write some code. I'm sure if everything was switched (everyone being assumed female by default, even when the signs point to otherwise) and it happened to you you'd be annoyed too.
 

zoogie

playing around in the end of life
Developer
Joined
Nov 30, 2014
Messages
8,560
Trophies
2
XP
15,000
Country
Micronesia, Federated States of
(Going off topic here).
Honestly I'm always annoyed when they assume I'm male even though I have "Aurora" (which is my real name btw) as part of the username, and I even have my profile set to female, just because I can write some code. I'm sure if everything was switched (everyone being assumed female by default, even when the signs point to otherwise) and it happened to you you'd be annoyed too.
Your profile was blocked when I checked yesterday. Glad you've got that fixed. :P
Can't stand when people do that.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: Jaws is on a diet