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

asper

Well-Known Member
OP
Member
Joined
May 14, 2010
Messages
942
Trophies
1
XP
2,030
Country
United States
After checking many title.tik (original and modified for installation) I got the exact "formula" to calculate the new value in

let's take the 1st 16 bytes of a ticket (dunno which one, it doesn't matter):
000300045CA5714B61BA6F982BDEA4C0

looking at that wii page and that 3ds page you see that:
04 = RSA_2048 SHA256 (signature type)

You must leave 04 as is.
Change 03 to 01.
About last byte (let's call it 0x0F):

(0x0F) XOR (02)

so, in our example:

(C0) XOR (02) = C2

where C2 is the correct value to make the certificate beeing recognized by the console.

So you have no more to "test" if adding or removing 2 from byte 0x0F, just xor its original value with 02.

The real history in this "mistery" is clearly explained by the great @crediar in his answer at page 6 of this thread.


Thank you for reading :)
 
Last edited by asper,

cearp

瓜老外
Developer
Joined
May 26, 2008
Messages
8,741
Trophies
2
XP
8,591
Country
Tuvalu
so we change the ticket data to set the signature type to a different type.
and the signature type we change it to... we can create that signature, and the system thinks it's legit?

why is this? i don't get it.
great for us :D but, if the wiiu thinks the ticket is legit... that's weird no?
 

Keylogger

Well-Known Member
Member
Joined
May 3, 2006
Messages
2,653
Trophies
1
Age
34
Website
Visit site
XP
6,727
Country
France
so we change the ticket data to set the signature type to a different type.
and the signature type we change it to... we can create that signature, and the system thinks it's legit?

why is this? i don't get it.
great for us :D but, if the wiiu thinks the ticket is legit... that's weird no?
Maybe a bug in the signature check? Like the trucha bug for Wii ?
 

asper

Well-Known Member
OP
Member
Joined
May 14, 2010
Messages
942
Trophies
1
XP
2,030
Country
United States
so we change the ticket data to set the signature type to a different type.
and the signature type we change it to... we can create that signature, and the system thinks it's legit?

why is this? i don't get it.
great for us :D but, if the wiiu thinks the ticket is legit... that's weird no?

Autoquote, please re-read the 1st post ;) :
changing 03 to 01 does not change the signature type
 
  • Like
Reactions: cearp

asper

Well-Known Member
OP
Member
Joined
May 14, 2010
Messages
942
Trophies
1
XP
2,030
Country
United States
Code:
0x10 ^ 2
Returns 0x12, it should have returned 0x0E...

--------------------- MERGED ---------------------------

BTW,
Code:
^
is XOR in Python.

You mean a game has 10 at 0x0F in original titlt.tik and the correct installation value is 0E ?
0x10 ^ 0x02 = 0x12 is correct...
 
Last edited by asper,
  • Like
Reactions: xstationbr

cearp

瓜老外
Developer
Joined
May 26, 2008
Messages
8,741
Trophies
2
XP
8,591
Country
Tuvalu
@cearp Nothing prevent you to make a tik installer for Wii U now :P
do we have nand access/ftp or anything like that?
or a way to read files from the wiiu nand/wiiu disk?
i don't have a wiiu but i will get one in december/january.

if, as it appears so, that many wiiu digitial games have the same title key as the disk game - we could make a simple tool to dump the key from the disk.
and of course, a tool to dump all the keys from the database in nand.
Autoquote, please re-read the 1st post ;) :
oops, ok i thought we were changing the sig type.
but you say we change the value at 0xF - so that would break the signature no?
 

asper

Well-Known Member
OP
Member
Joined
May 14, 2010
Messages
942
Trophies
1
XP
2,030
Country
United States
The value for WUD ticket is 0x10.
The value for NUS ticket is 0x0E. (The correct value after modifying the ticket)

You MUST use NUS title.tik, not WUD.

EDIT: sorry, I mean you must use the title.tik inside \system\02 folder
 
Last edited by asper,

asper

Well-Known Member
OP
Member
Joined
May 14, 2010
Messages
942
Trophies
1
XP
2,030
Country
United States
oops, ok i thought we were changing the sig type.
but you say we change the value at 0xF - so that would break the signature no?

re-autoquote, please re-re-read the 1st post ;):
this means that the RSA signature is anyway correct ! So why you need to modify byte in 0x0F position to make the ticket be accepted ? Probably because, after generating the certificate ("Signature by a certificate's key" that goes from offset 0x04 to 0x103) this certificate is xored someway with a sort of xorpad where also the 1st bytes of the tickets are included; so, if you "subtract" 2 to byte 0x01 (changing it from 03 to 01) you need to "recalculate" the xorpad; dunno why byte 0x0F is related to byte 0x01 but it seems to work (i am not 100% sure about that explanation, if some reverser went deep in the IDA code and can confirm this I will be very happy to hear from you !)

So, "probably", the signature is firstly de-xored, then checked, if de-xoring fails also the signature fails.

--------------------- MERGED ---------------------------

LOL, look, the original value is 0x10.
The value that WUPInstaller accepts is 0x0E.
0x10 - 2 = 0x0E.

The NSMB USA I found has this: 00030004289BAC0D6362A7EA9C429B0E, maybe it is not original ? (EDIT: 0E is the original value, thanks to @Chooker for checking that out !)

About NUS title.tik sorry, I mean you must use the title.tik inside \02 folders; at now there is no way to extract title.tik from already eshop installed games.
 
Last edited by asper,

cearp

瓜老外
Developer
Joined
May 26, 2008
Messages
8,741
Trophies
2
XP
8,591
Country
Tuvalu
haha ok i read your post a few times, it makes a bit more sense now (if you are actually correct, since like you said you are not 100% but that it seems to be right)


but, we generate the signature ourselves? why can we do this, wouldn't this need keys only nintendo has?

eventually i will stop questioning and start enjoying ;)
(when my wii u gets here in a few months)
 
Last edited by cearp,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Julie_Pilgrim @ Julie_Pilgrim:
    they're giving the internet an open text box?
    +1
  • BigOnYa @ BigOnYa:
    I never played or own any of they devices, but I like small style, but with a somewhat grip
    +1
  • Julie_Pilgrim @ Julie_Pilgrim:
    oh man, that always goes great!
  • Julie_Pilgrim @ Julie_Pilgrim:
    im sure half the responses won't be literal racial slurs or "drop table" jokes
  • Veho @ Veho:
    Look, it's China. They know what it's like when you give a poll to half a billion trolls.
    +1
  • K3Nv2 @ K3Nv2:
    How much dollar do you think it is?
  • Veho @ Veho:
    ONE MILLION DOLLA
    +1
  • Veho @ Veho:
    I know the pricing of electronics nowadays isn't "how much it actually costs" but "how much we can get away with", but putting up a poll is just cynical.
    +1
  • K3Nv2 @ K3Nv2:
    Probably $150 someone said Anbernic said around the same price as rg556
  • Julie_Pilgrim @ Julie_Pilgrim:
    you know which game i wish they would rerelease
  • Julie_Pilgrim @ Julie_Pilgrim:
    sonic unleashed
  • K3Nv2 @ K3Nv2:
    Make it a happy meal toy
  • Julie_Pilgrim @ Julie_Pilgrim:
    that game's engine is really fucking intensive so it runs like literal shit on xbox 360 and ps3
  • Veho @ Veho:
    Nah I'm getting value creep again. I look at a $50 console "but for just a few more dollars you could get XYZ" and I end up considering the Steam Deck.
    +1
  • Julie_Pilgrim @ Julie_Pilgrim:
    like the lighting in that game was genuinely so good
  • Veho @ Veho:
    Not getting dragged into that again.
  • Julie_Pilgrim @ Julie_Pilgrim:
    i dont get why they didn't port the one game that ran the worst on consoles, to pc
  • Julie_Pilgrim @ Julie_Pilgrim:
    like you port everything to pc except the one game where it would make the most sense. why. what do you gain from this
  • Julie_Pilgrim @ Julie_Pilgrim:
    is sega just personally fucking with me? are they laughing while watching me through my kinect camera as i get up to restart my xbox for the third time because the game froze again
  • K3Nv2 @ K3Nv2:
    Buy handhelds from five below better quality
  • K3Nv2 @ K3Nv2:
    Valve probably going to do another refresh of the deck this fall with rog ally like specs tbh
    +1
  • Veho @ Veho:
    A smaller form factor would be nice too.
    +1
  • K3Nv2 @ K3Nv2:
    A shield portable 2 would be nice aye Nvidia
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    The big leap in all things tech is when carbon based chips start hitting.
    Psionic Roshambo @ Psionic Roshambo: The big leap in all things tech is when carbon based chips start hitting.