Hacking Decrypting Wii VC nfs files

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
Well... It's worth a shot.
Well it doesn't seem to work on dolphin though. I'll compare a dump of super mario galaxy 2 (I own the game, so I'll dump it with USB loader GX) and see what is going on.
 

sabykos

Well-Known Member
Member
Joined
Jun 10, 2013
Messages
283
Trophies
0
Age
36
XP
729
Country
Gambia, The
Hmmm.

I just skimmed through the header (which was fine) and the last part (which also looked good to me, it had some readable plaintext), and thought it was okay.

If it turns out some of the parts are further encrypted, I have a few ideas, but it'd need more time and looking into.

(The idea: the header maybe holds a key for each of the parts. I've seen some stuff to point towards that being the case in the MCP. But it's just a wild guess.).
There were some strange bytes at 0x8000 in the decrypted nfs. That part were blank zeros in the wbfs. So... maybe thats the key for something?
 

Irastris

Well-Known Member
Member
Joined
May 3, 2015
Messages
1,116
Trophies
0
XP
895
Country
United States
Can anyone help me? I'm trying to do this with the Metroid Prime Trilogy NFS files. I've stripped the header, merged the files, but I always get this error when trying to decrypt with OpenSSL. (Obviously that's not the actual key though)
Code:
OpenSSL> enc -d -aes-128-cbc -k "13371337133713371337133713371337" -iv 0 -nopad -in hif_merge.nfs -out hif_merge.nfs.dec

bad magic number
error in enc
OpenSSL>

I've tried two different Windows builds of OpenSSL. I've tried OpenSSL v1.0.2j from https://indy.fulgan.com/SSL/, and I've tried OpenSSL v1.1.0c from http://slproweb.com/products/Win32OpenSSL.html
 

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
There were some strange bytes at 0x8000 in the decrypted nfs. That part were blank zeros in the wbfs. So... maybe thats the key for something?
I noticed this as well. Honestly I'm both clueless and excited to know more, lol.

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

Can anyone help me? I'm trying to do this with the Metroid Prime Trilogy NFS files. I've stripped the header, merged the files, but I always get this error when trying to decrypt with OpenSSL. (Obviously that's not the actual key though)
Code:
OpenSSL> enc -d -aes-128-cbc -k "13371337133713371337133713371337" -iv 0 -nopad -in hif_merge.nfs -out hif_merge.nfs.dec

bad magic number
error in enc
OpenSSL>

I've tried two different Windows builds of OpenSSL. I've tried OpenSSL v1.0.2j from https://indy.fulgan.com/SSL/, and I've tried OpenSSL v1.1.0c from http://slproweb.com/products/Win32OpenSSL.html
try this one:
That worked for me.
 

Attachments

  • openssl.zip
    1.6 MB · Views: 148
  • Like
Reactions: zeldaism

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
Yep, I tried the key both straight from HxD (with spaces) and with the spaces removed.
Well then, I really don't know :x

What game was it? I did it with Super Mario Galaxy 2. Made sure to remove the 0x200 bytes of the EGGS header, then merged the files. Used this OPENSSL version, and pasted the key in the CMD.
 

Irastris

Well-Known Member
Member
Joined
May 3, 2015
Messages
1,116
Trophies
0
XP
895
Country
United States
What game was it? I did it with Super Mario Galaxy 2. Made sure to remove the 0x200 bytes of the EGGS header, then merged the files. Used this OPENSSL version, and pasted the key in the CMD.
Like I said, it was Metroid Prime Trilogy. I removed the header starting from EGGS and ending with SGGE (I don't hex edit very often so I don't know if that's 0x200 bytes), merged them all using "copy /b hif_*.nfs hif_merged.nfs" (making sure that it went in order from 000000 to 000030, which it did) and then ran that command through OpenSSL. Same problem every time.
 

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
Like I said, it was Metroid Prime Trilogy. I removed the header starting from EGGS and ending with SGGE (I don't hex edit very often so I don't know if that's 0x200 bytes), merged them all using "copy /b hif_*.nfs hif_merged.nfs" (making sure that it went in order from 000000 to 000030, which it did) and then ran that command through OpenSSL. Same problem every time.
My bad for the game name, I can't read XD

Well, I really don't know, sorry.
I could try to grab it from nus and try again. We never know :)
 

JaGoTu10

Active Member
OP
Newcomer
Joined
Jun 27, 2014
Messages
25
Trophies
0
Website
betawiki.net
XP
258
Country
Can anyone help me? I'm trying to do this with the Metroid Prime Trilogy NFS files. I've stripped the header, merged the files, but I always get this error when trying to decrypt with OpenSSL. (Obviously that's not the actual key though)
Code:
OpenSSL> enc -d -aes-128-cbc -k "13371337133713371337133713371337" -iv 0 -nopad -in hif_merge.nfs -out hif_merge.nfs.dec

bad magic number
error in enc
OpenSSL>

I've tried two different Windows builds of OpenSSL. I've tried OpenSSL v1.0.2j from https://indy.fulgan.com/SSL/, and I've tried OpenSSL v1.1.0c from http://slproweb.com/products/Win32OpenSSL.html

The -k should be an uppercase one (-K).
 
  • Like
Reactions: zeldaism

JaceCearK1

Well-Known Member
Member
Joined
May 18, 2015
Messages
540
Trophies
0
Age
27
XP
415
Country
Gambia, The
Hmmm.

I just skimmed through the header (which was fine) and the last part (which also looked good to me, it had some readable plaintext), and thought it was okay.

If it turns out some of the parts are further encrypted, I have a few ideas, but it'd need more time and looking into.

(The idea: the header maybe holds a key for each of the parts. I've seen some stuff to point towards that being the case in the MCP. But it's just a wild guess.).
As soon as somebody figured this out they should make a Python-Script or something similar to make the process a little easier! :)

Edit:
Stuff I found out until now [in decrypted "hif_000000.nfs" | Mario Galaxy 2 PAL]: (will add more when I found more)
- The 0x200-sized WBFS-Header is missing (was replaced by the EGGS-SGGE header)
- The Sector-table is missing
- The start of every sector (0x8000) contains interesting information, for example:
- 0x8000 and 0x10000 contain some keys @Falo wrote an important update on this matter.
- 0x18000 contains a list of tickets
- 0x38400 contains a header similar to 0x00000, but not the same one [no idea what 0x38000-0x383FF could be]
- 0x3A840 contains a date (11th Dec 2009; might be original game's compilation date)
- 0x3A840-0x3A85F(nfs) equals 0x1FF00-0x1FF1F(wbfs)
- 0x3BCC0 contains debug-/error-strings seemingly not in the original game (won't reveal due to the Terms/Copyright etc. but it seems to be part of the app-loader)
- Around 0x70D7C0 are some labels (maybe file names?)

Maybe somebody recognizes this pattern! :D
 
Last edited by JaceCearK1,

victormr21

Well-Known Member
Member
Joined
Dec 29, 2015
Messages
565
Trophies
0
XP
498
Country

Pachee

Well-Known Member
Member
Joined
Nov 3, 2015
Messages
480
Trophies
0
XP
562
Country
United States
Reguarding injecting a new game, Xenoblade has a title.fst file in the Code folder, which seems to be a "Wii U partition"? I guess that file would need to be remade?
On the beginning of this video it says it could also be used for raw installing. youtube.com/watch?v=wFag8nx-LJc
yqlO9H2.jpg
 
Last edited by Pachee,
  • Like
Reactions: julienbdes

AboodXD

I hack NSMB games, and other shiz.
Member
Joined
Oct 11, 2014
Messages
2,880
Trophies
1
Location
Not under a rock.
XP
2,921
Country
United Arab Emirates
Reguarding injecting a new game, Xenoblade has a title.fst file in the Code folder, which seems to be a "Wii U partition"? I guess that file would need to be remade?
On the beginning of this video it says it could also be used for raw installing. youtube.com/watch?v=wFag8nx-LJc
yqlO9H2.jpg
Use:
Code:
[MEDIA=youtube]wFag8nx-LJc[/MEDIA]

 
  • Like
Reactions: zeldaism

victormr21

Well-Known Member
Member
Joined
Dec 29, 2015
Messages
565
Trophies
0
XP
498
Country
Reguarding injecting a new game, Xenoblade has a title.fst file in the Code folder, which seems to be a "Wii U partition"? I guess that file would need to be remade?
On the beginning of this video it says it could also be used for raw installing. youtube.com/watch?v=wFag8nx-LJc
yqlO9H2.jpg
in my wii u, all legit titles have this and other file that we haven't seen in loadiine format or .app format, maybe if we can do this file for non legit games, we can do they totally official, if you enter at eShop it will show like you have bought it, in the friend list it will appear as program instead ???...
And one question, whats the file that contains this info? I talked with a friend and he said me that if i use SCT it appeares in friend list, but if im using a custom channel like HBC, it doesnt appeare, friend list shows ???
Bye!
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: Sup