Homebrew Trying to extract some title.tik / cekt file. i have encTitleKeys.bin, decTitleKeys.bin and more.

t33st33r

Active Member
OP
Newcomer
Joined
Sep 22, 2018
Messages
43
Trophies
0
XP
254
Country
Spain
I am trying to get a full (2640 bytes) ticket from one of my installed (and working) titles to hex edit it. I want to edit it to use it to compile a CIA. The source is a title in CDN format.
I used gm9 to get encTitleKeys.bin, decTitleKeys.bin and seeddb.bin. I mounted some CIAs to get the cert.bin from them too.

How can I get a full ticket from some of these files?

Thanks in advance.

NOTE: Some admin please fix this thread's title. I wrote cekt but what i mean is cetk.
 
Last edited by t33st33r,
D

Deleted User

Guest
Open GodMode9 and navigate to SYSNAND CTRNAND 1:/dbs/ticket.db. Find the ticket that has a matching name to the Title ID of the target title, and copy the ticket to your SD Card. You may want to use the GodMode9 v1.9.2 prerelease.
 
  • Like
Reactions: fmkid and tfocosta

t33st33r

Active Member
OP
Newcomer
Joined
Sep 22, 2018
Messages
43
Trophies
0
XP
254
Country
Spain
Open GodMode9 and navigate to SYSNAND CTRNAND 1:/dbs/ticket.db. Find the ticket that has a matching name to the Title ID of the target title, and copy the ticket to your SD Card. You may want to use the GodMode9 v1.9.2 prerelease.

I updated gm9 to v1.9.2pre1 and mounted 1:/dbs/ticket.db to T: but every single tik inside is shown as a 848 bytes file.

A fake (but valid) full-size ticket could help me to get the desired result too.

What I mean with "fake (but valid)" is that the ticket may respect the structure of the tickets able to pass the validation test made by the system. So I could install the compiled CIA if I edited the titleID and the encripted titleID with the right values.
 
Last edited by t33st33r,

Tanukid

New Member
Newbie
Joined
Nov 16, 2020
Messages
3
Trophies
0
Age
16
XP
19
Country
United States
I'm having the same problem. I was able to generate some tickets using a program called TikGenerator, but it only worked for titles that were in the encTitleKeys.bin from an archive of the old titlekeys site.

EDIT: To clarify, I was trying some CDN titles, from a torrent that archived the CDN, that didn't have dumped titlekeys. I ended up using ninfs to mount an NCCH from the contents and then make a cia from that using my 3DS (which had a fake tmd and a fake ticket as a result), then using a fake ticket generated with TikGenerator from my dumped encTitleKeys.bin with the real tmd and CDN contents to build a more legit cia with make_cdn_cia (or probably GM9, too, idk as I haven't tried). For some reason, using TikGenerator didn't work with my encTitleKeys.bin created from the support files function or straight from a ticket.db, but mounting it, selecting all the tickets, and creating an encTitleKeys.bin from them did. See the message below.

Also, ninfs usually wants a decrypted titlekey for CDN contents, so it can decrypt the contents, and you can make a decrypted cia with makerom, but if you enter nothing (or anything random that won't really work, even the ones I tried from the leaked titlekey generation algorithm didn't work), it'll still give you the encrypted NCCH(s) and a nonfunctional 848 byte ticket.bin, as well as a tmd.bin and a tmdchunks.bin, which work fine, except for, of course, the nonfunctional (as stated) 848 byte ticket.bin. By nonfunctional, I mean that nothing seems to be able to open it, so you have to use the 3DS to convert the NCCH(s) to cia(s). For some reason, building a cia straight from CDN contents (at least without a ticket) with GM9 won't work, even though it says it'll use a fake ticket, at least for legit, as I haven't tried standard. I haven't tried building a cia with the tmd from ninfs (at least not tmd + NCCH), either, just the NCCH.

EDIT 2: Forgot to mention that sometimes TikGenerator won't accept your TMD. This is fine, and it'll still create a ticket, but if you want it to be more "proper" to match the TMD you can use a hex editor to change the version number in the ticket if it doesn't match the version number in the tmd once you use make_cdn_cia.
 
Last edited by Tanukid,
  • Like
Reactions: t33st33r

Tanukid

New Member
Newbie
Joined
Nov 16, 2020
Messages
3
Trophies
0
Age
16
XP
19
Country
United States
I found the strangest workaround. You have to select the tickets that you want using GM9 and make an encTitleKeys.bin from them. Then, using TikGenerator, you can use the encTitleKeys.bin to create a fake (but valid) ticket. For some reason, creating an encTitleKeys.bin using GM9's function to build support files doesn't work with it. I believe creating an encTitleKeys.bin using the Ticket.db options gives the same results, but I don't really remember. It was either that or the support files that I tried, or both.
 

Tanukid

New Member
Newbie
Joined
Nov 16, 2020
Messages
3
Trophies
0
Age
16
XP
19
Country
United States
Never mind about my workaround. Installing the cias failed for some reason. It says "Cert signature or hash check failed".
 
General chit-chat
Help Users
  • No one is chatting at the moment.
    KennieDaMeanie @ KennieDaMeanie: I couldn't really get into moon it's too different for my likes