How to find Encryption/Decryption keys ?

Programming related discussions related to game research
Taktloss
Posts: 9
Joined: Sat Sep 26, 2015 5:51 pm

How to find Encryption/Decryption keys ?

Post by Taktloss »

Hello,
i would really like to learn more about encryption/decryption keys like in Telltale games. Can *maybe* someone explain a bit how to find such a key ;) ?

Thanks in advance
maxton
Posts: 7
Joined: Thu Aug 13, 2015 4:30 am

Re: How to find Encryption/Decryption keys ?

Post by maxton »

Often the easiest way to find encryption/decryption keys is to locate the encryption/decryption routines by decompiling the game binary. You could also try using a debugger/memory editor to look in RAM while the game is running, but even then having the disassembly is probably necessary to know where you should be looking.
atom0s
Posts: 250
Joined: Sat Dec 27, 2014 8:49 pm

Re: How to find Encryption/Decryption keys ?

Post by atom0s »

Some other methods you can use to find the crypt functions easily is look for string references to paths where the files are located.
Also setting breakpoints on CreateFileA/CreateFileW/ReadFile/WriteFile etc. to attempt to find when the game accesses the encrypted files can lead you back to the functions of interest.

Doing static analysis in a disassembler like IDA makes things easier as well vs. debugging as you can trace around the file much faster.