Hacking Why "adding or removing 2" from byte 0x0F of tiket.tik ? Answer and exact "formula".

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,649
Country
France
yes, it's done offline, in Async mode.

Nintendo is generating a signature with a private key. Only Nintendo has it.
the signature included inside the ticket.
That signature can be decrypted (but not generated) with the common key. All consoles have it.

If the decrypted signature checksum matches the ticket checksum (I'm not sure which part of the ticket is verified against the signature's hash), then it means the ticket is valid, and the console can use the data from it.
If you edit the title key to install a different game, for example you know the title key for a game but you don't have it's ticket so you edit an existing ticket to put your title key inside, then the decrypted signature's checksum will not match the ticket's checksum anymore.


it works here because the title key is the same for both Disc and eshop version.
editing only one byte (Game type) affects only one byte in the encrypted signature.
if we had to edit the entire title key and titleID, the signature would be too different to calculate it without the private key.
 

joacosur15

Well-Known Member
Member
Joined
Jan 2, 2016
Messages
116
Trophies
0
Age
30
Location
Buenos Aires
XP
668
Country
Argentina
what can be patched?

we can't generate signatures without the private key or we could install homebrew directly to the WiiU menu.
The title instalation with single byte modification, or they have to create two different title ID for each game (digital and disk) to fix that?
 

Kohmei

Well-Known Member
Member
Joined
Feb 17, 2013
Messages
824
Trophies
0
XP
1,039
Country
United States
What is the benefit of an xor mask from a security perspective? It seems like the signature should already prevent the ticket from being modified, and if the xor mask is adding an additional layer to this, it has failed miserably at that.
 
  • Like
Reactions: cearp

FIX94

Former Staff
Former Staff
Joined
Dec 3, 2009
Messages
7,284
Trophies
0
Age
29
Location
???
XP
11,238
Country
Germany
alright now, here is something crazy for you:
I just dumped some .tik files from discs I had over network using iosuhax and... the tiks already start with "01" and are "xor'd" as well, meaning dumped tiks like that cant be installed directly without any errors, so the question now is, are those files in .wuds somehow unclean or does the wiiu at some level automatically even from disc adjust those values so the wiiu can actually use them? that explains though why they have to be changed in the first place I guess to be installable.
 
  • Like
Reactions: VinsCool

VinsCool

Persona Secretiva Felineus
Global Moderator
Joined
Jan 7, 2014
Messages
14,600
Trophies
4
Location
Another World
Website
www.gbatemp.net
XP
25,207
Country
Canada
alright now, here is something crazy for you:
I just dumped some .tik files from discs I had over network using iosuhax and... the tiks already start with "01" and are "xor'd" as well, meaning dumped tiks like that cant be installed directly without any errors, so the question now is, are those files in .wuds somehow unclean or does the wiiu at some level automatically even from disc adjust those values so the wiiu can actually use them? that explains though why they have to be changed in the first place I guess to be installable.
Woah this is getting interesting.
One question though. Can the same method be used for already installed titles, as in, eshop purchasses?
 

FIX94

Former Staff
Former Staff
Joined
Dec 3, 2009
Messages
7,284
Trophies
0
Age
29
Location
???
XP
11,238
Country
Germany
Woah this is getting interesting.
One question though. Can the same method be used for already installed titles, as in, eshop purchasses?
I've dumped my eshop tiks as well and they contain my console id (4 bytes at 0x1D8) so you can most likely only install them directly on your own console unless you run a ciosu with signature checks disabled, else you probably risk a brick.
 
  • Like
Reactions: VinsCool

KongsNutz

[Team Oceanic]
Member
Joined
Jul 19, 2008
Messages
1,680
Trophies
1
XP
1,581
Country
United States
I've dumped my eshop tiks as well and they contain my console id (4 bytes at 0x1D8) so you can most likely only install them directly on your own console unless you run a ciosu with signature checks disabled, else you probably risk a brick.
NWPlayer is dumping hers, so we know it can be done.
 

VinsCool

Persona Secretiva Felineus
Global Moderator
Joined
Jan 7, 2014
Messages
14,600
Trophies
4
Location
Another World
Website
www.gbatemp.net
XP
25,207
Country
Canada
I've dumped my eshop tiks as well and they contain my console id (4 bytes at 0x1D8) so you can most likely only install them directly on your own console unless you run a ciosu with signature checks disabled, else you probably risk a brick.
Another question regarding this. Would it be possible to compare a dumped ticket from one of those that already exist, possibly to find a pattern, or a potential similarity between them? That could possibly lead to some sort of dummy ticket that could be used for the same game without a wud, maybe?

I just wonder, this is really interesting :P

You say it has your console ID. But if we know that current modified tickets install on any console of the same region, I would assume that there is a possibility of a dummy ID, that installs regardless of the console?
 

FIX94

Former Staff
Former Staff
Joined
Dec 3, 2009
Messages
7,284
Trophies
0
Age
29
Location
???
XP
11,238
Country
Germany
Another question regarding this. Would it be possible to compare a dumped ticket from one of those that already exist, possibly to find a pattern, or a potential similarity between them? That could possibly lead to some sort of dummy ticket that could be used for the same game without a wud, maybe?
No. The thing why this works most likely has to do with the tik not requiring a specific console, nintendo used the exact same sign mechanism for both eshop titles and disc titles so, disc titles cant have a console id requirement, which is why you can install it globally on every wiiu if you have an installer. The 3ds had similar things and the wii too by the way. So changing anything in a tik right now such as, removing that id, or changing it to another region id would make it invalid because its signature would not match up anymore.

edit: I can even proof this to you, somebody just was friendly enough to dump a game tik I also had from his console and if I compare both tiks they indeed differ a lot because of the signatures:
tikdiffs.png

You can see on the counts alone that there would be no way to brute force that to another console.
 
  • Like
Reactions: KiiWii and asper

VinsCool

Persona Secretiva Felineus
Global Moderator
Joined
Jan 7, 2014
Messages
14,600
Trophies
4
Location
Another World
Website
www.gbatemp.net
XP
25,207
Country
Canada
No. The thing why this works most likely has to do with the tik not requiring a specific console, nintendo used the exact same sign mechanism for both eshop titles and disc titles so, disc titles cant have a console id requirement, which is why you can install it globally on every wiiu if you have an installer. The 3ds had similar things and the wii too by the way. So changing anything in a tik right now such as, removing that id, or changing it to another region id would make it invalid because its signature would not match up anymore.
edit: I can even proof this to you, somebody just was friendly enough to dump a game tik I also had from his console and if I compare both tiks they indeed differ a lot because of the signatures:
tikdiffs.png

You can see on the counts alone that there would be no way to brute force that to another console.
Oh I see. Well then now I know, haha
 

asper

Well-Known Member
OP
Member
Joined
May 14, 2010
Messages
942
Trophies
1
XP
2,030
Country
United States
alright now, here is something crazy for you:
I just dumped some .tik files from discs I had over network using iosuhax and... the tiks already start with "01" and are "xor'd" as well, meaning dumped tiks like that cant be installed directly without any errors, so the question now is, are those files in .wuds somehow unclean or does the wiiu at some level automatically even from disc adjust those values so the wiiu can actually use them? that explains though why they have to be changed in the first place I guess to be installable.

The only way to know is raw-dumping the same disc and decrypt it with discU but I really do not know how to do that. I know there is an iosu function to request the aes disc key from the disc but dunno if it is possible to dump it "raw" (and obtain substantially a wud).

About the signature I really would like to know if there really is a xor mask "covering" the real value. If someone can find the real process debugging with ida I will be very happy to read it.

About force-install a per-console title disabling the checks it can work but if nintendo will release a new firmware all the signature patches will be removed and with a force-install title in the console (nand or usb) you can really risk a brick unless (maybe) you firstly uninstall that title before updating.

I tested a per-console title.tik on another console zeroing the per-console data: no brick, just it does not work. I also tested the original ticket (not modifying it) without success (no brick).
 
Last edited by asper,

Kohmei

Well-Known Member
Member
Joined
Feb 17, 2013
Messages
824
Trophies
0
XP
1,039
Country
United States
No. The thing why this works most likely has to do with the tik not requiring a specific console, nintendo used the exact same sign mechanism for both eshop titles and disc titles so, disc titles cant have a console id requirement, which is why you can install it globally on every wiiu if you have an installer. The 3ds had similar things and the wii too by the way. So changing anything in a tik right now such as, removing that id, or changing it to another region id would make it invalid because its signature would not match up anymore.

edit: I can even proof this to you, somebody just was friendly enough to dump a game tik I also had from his console and if I compare both tiks they indeed differ a lot because of the signatures:
tikdiffs.png

You can see on the counts alone that there would be no way to brute force that to another console.
That's interesting. So basically no pirated DLC without CFW, and yet for some reason they didn't think to do the same thing for games. How bizarre
 

sabykos

Well-Known Member
Member
Joined
Jun 10, 2013
Messages
283
Trophies
0
Age
36
XP
729
Country
Gambia, The
That's interesting. So basically no pirated DLC without CFW, and yet for some reason they didn't think to do the same thing for games. How bizarre
Games come as discs, while DLC does not. Really not that bizarre. Discs need to be universally signed to work on every console. DLCs need not.
 
  • Like
Reactions: Ryccardo

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: The mutated Axolotl was awesome