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,750
Trophies
2
XP
8,618
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,655
Trophies
1
Age
35
Website
Visit site
XP
6,760
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,750
Trophies
2
XP
8,618
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,750
Trophies
2
XP
8,618
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
  • SylverReZ @ SylverReZ:
    @Psionic Roshambo, Blue omelette
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Lol Ken will never eat an omelette again lol
  • K3Nv2 @ K3Nv2:
    Actually ihops omlettes still hit haven't had one in forever
  • Psionic Roshambo @ Psionic Roshambo:
    The steak one is amazing
    +1
  • K3Nv2 @ K3Nv2:
    Damn near $20 so fuck them
    +1
  • BigOnYa @ BigOnYa:
    I second that, they are good. I always get the steak and add mushrooms to it also. But yea been awhile since had myself. I used to go there every morn for coffee and breakfast, meet with my work crew, but we all stop going, too expensive.
    +1
  • HiradeGirl @ HiradeGirl:
    I'm scarred for life.
  • HiradeGirl @ HiradeGirl:
    See you guys, I'll get lost for another month. Maybe the rest of the year.
    +2
  • K3Nv2 @ K3Nv2:
    See you tomorrow
    +2
  • BigOnYa @ BigOnYa:
    Peace. Take care, no more searching tonight. You gonna have nightmares.
    +2
  • SylverReZ @ SylverReZ:
    See you tomorrow.
    +1
  • NinStar @ NinStar:
    did she just vomit on the chat before leaving
  • NinStar @ NinStar:
    why are girls doing this nowadays? is this some weird way of showing dominance?
  • BigOnYa @ BigOnYa:
    Yea, I put her outside though, then cleaned it up.
  • K3Nv2 @ K3Nv2:
    Ah yes the unique power of girls vomiting on you
  • PandaPandel @ PandaPandel:
    im gonna puke
  • Sonic Angel Knight @ Sonic Angel Knight:
    Laughing face + 2
    +1
  • The Real Jdbye @ The Real Jdbye:
    finally, a zelda game where you play as zelda
  • The Real Jdbye @ The Real Jdbye:
    it only took 40 years
  • SylverReZ @ SylverReZ:
    @The Real Jdbye, They finally got the naming convention right.
  • SylverReZ @ SylverReZ:
    Now lets rename all of the old Zelda games to The Legend of Link. Lol.
  • The Real Jdbye @ The Real Jdbye:
    they kinda did that with zelda 2 at least it had link in the title
    The Real Jdbye @ The Real Jdbye: they kinda did that with zelda 2 at least it had link in the title