Luigi Auriemma

aluigi.org (ARCHIVE-ONLY FORUM!)
It is currently 19 Jul 2012 19:59

All times are UTC [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 13 posts ] 
Author Message
 Post subject: Another racing game
PostPosted: 04 Mar 2009 14:23 

Joined: 04 Mar 2009 14:17
Posts: 9
Iracing also uses encrypted .3do's , textures, and various other files are also encrypted.

Has anyone looked into this?

I seen it mentioned it uses aes256 but cannot confirm for sure.

Attached a few files as examples


Attachments:
examples.zip [29.06 KiB]
Downloaded 125 times
Top
 Profile  
 
 
 Post subject: Re: Another racing game
PostPosted: 04 Mar 2009 15:15 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
I wrote an extractor for the iracing files (included those encrypted with aes256) but the only missing thing is the aes "key", and obviously without it it's all useless because it's nothing else than a classical extractor for the nascar 3 files (the file format is exactly the same).

here I can't make the job because I think there is something missing in my configuration or files but if you want to do it it's enough to run iRacingSim.exe 1.2.0.0 (the version is important) with ollydbg and putting a breakpoint at offset 004e91d0.
when the debugger will break it's enough to watch in the stack window and you should see a hexadecimal string (which in my case is "0000000000000000000000000000000000000000000000000000000000000000"), that's the key.


Top
 Profile  
 
 Post subject: Re: Another racing game
PostPosted: 04 Mar 2009 17:05 

Joined: 04 Mar 2009 14:17
Posts: 9
There is a 1.2.0.0 version out now that allows you test the cars and tracks offline.

They must have figured out how to get around this?


Top
 Profile  
 
 Post subject: Re: Another racing game
PostPosted: 04 Mar 2009 17:13 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
as far as I know also the files of that version are encrypted, so the key is still necessary


Top
 Profile  
 
 Post subject: Re: Another racing game
PostPosted: 04 Mar 2009 17:38 

Joined: 04 Mar 2009 14:17
Posts: 9
My point was it works so they must have either found key or a way around it.

It use loader to let you pick track and car.

Then uses create process to start iracingsim.exe with a command line.

Do you need link to it?

Maybe it could be useful.


Top
 Profile  
 
 Post subject: Re: Another racing game
PostPosted: 04 Mar 2009 17:51 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
it's only a key used for fixed files, there is no direct relation with the "online" part of the game.
anyway I have already explained how to retrieve that key


Top
 Profile  
 
 Post subject: Re: Another racing game
PostPosted: 04 Mar 2009 17:53 

Joined: 04 Mar 2009 14:17
Posts: 9
When i try to run in olly it never gets to that address.

How where you getting there?


Top
 Profile  
 
 Post subject: Re: Another racing game
PostPosted: 04 Mar 2009 18:02 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
in my tests here I reached that part of the code almost immediately at the starting of program.
if you don't reach it first check in olly that the code at that location looks like:
Code:
:004E91D0 51                      push ecx
:004E91D1 53                      push ebx
:004E91D2 55                      push ebp
:004E91D3 56                      push esi
:004E91D4 57                      push edi
:004E91D5 8BF0                    mov esi, eax
:004E91D7 E824FBFFFF              call 004E8D00
:004E91DC 8D3C8500000000          lea edi, dword ptr [4*eax+00000000]
...
then remember to run the game in window mode (I don't know if it's supported because I have never played this game, doesn't work here) and start a race for forcing the reading of the files


Top
 Profile  
 
 Post subject: Re: Another racing game
PostPosted: 04 Mar 2009 20:23 

Joined: 04 Mar 2009 14:17
Posts: 9
Well the code is same.

But running iracingsim.exe in olly never gets to that address it says failed to connect to server and closes when you click ok.

I'm not sure how you where getting around the server check.


Top
 Profile  
 
 Post subject: Re: Another racing game
PostPosted: 06 Mar 2009 06:44 

Joined: 04 Mar 2009 14:17
Posts: 9
6411A609E5F6FFCAB9CC1612C0266A3B58AF453951280A939D14CA3CEB2F1167

Not sure if its big endian or little endian.

Can you try that with above attached files and see if it works?

Thanks


Top
 Profile  
 
 Post subject: Re: Another racing game
PostPosted: 06 Mar 2009 16:21 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
uhmmm, the key looks like the key I expected (included its size of 32 bytes) but unfortunately the result is still wrong.
at this point the only think to which I can think is that what I guessed was wrong or probably is required another key (maybe one for each file? mah).

anyway in attachment there is a micro tool for using the AES decryption with an input file using a custom key (like the one you provided)


Attachments:
iracingtest.zip [11.88 KiB]
Downloaded 132 times
Top
 Profile  
 
 Post subject: Re: Another racing game
PostPosted: 13 Mar 2009 08:09 

Joined: 04 Mar 2009 14:17
Posts: 9
After doing some more looking these came up.

ASCII "BE85312474F19BC1A706DC9B745DBE72FEB1DE80015B831298AA07D8A3A2A1A0./V"

ASCII "4330AD4BA80C679589AAD2EBB684E534BF833F88F4324DD865315D54E2AE887B./V"

Not sure what the ./V means but your little program does not allow for this type of key.

Let me know if thats of any use?


Top
 Profile  
 
 Post subject: Re: Another racing game
PostPosted: 13 Mar 2009 15:45 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
the ./V is not needed because the key is the binary representation of that hexadecimal string.
anyway the various keys you are posting seem to confirm the theory of a different key for each file or archive.
and it's interesting to notice that the length of the key is like a SHA256 hash and more interesting is the fact that this algorithm is used in iRacingSim.exe.

anyway without the game able to run here I can't do additional tests (and yes, I have already tried with the sha256 and panama hash of both the single file and the archive without success).

anyway, fyi, in iracingsim.exe 1.2.0.0 "seems" that the sha256 function is located at offset 004e77c0.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 13 posts ] 

All times are UTC [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron