Go Back   FileForums > Game Backup > PC Games
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-04-2005, 05:49
Joe Forster/STA's Avatar
Joe Forster/STA Joe Forster/STA is offline
Senior forum member
 
Join Date: Nov 2000
Location: Hungary
Posts: 9,836
Thanks: 20
Thanked 342 Times in 224 Posts
Joe Forster/STA is on a distinguished road
Cops 2170: The Power of the Law, password for PAK files

Hi guys,

It might be off-topic but I don't know a better place to send this info to...

In Cops 2170: The Power of the Law, the large PAK files are, actually, ZIP archives. And their password, in case you wanna see what's inside, is "wowyouhaveguessedthepassword". Happy hacking,

Joe
__________________
Joe Forster/STA
For more information, see the FileForums forum rules and the PC Games forum FAQ!
Don't contact me via E-mail or PM to ask for help with anything other than patches (or software in general) done by me, otherwise your request may be deleted without any reply!
Homepage: http://sta.c64.org, E-mail: [email protected]; for attachments, send compressed (ZIP or RAR) files only, otherwise your E-mail will bounce back!
Reply With Quote
Sponsored Links
  #2  
Old 11-04-2005, 09:13
Grumpy's Avatar
Grumpy Grumpy is offline
Moderator
 
Join Date: Jun 2004
Location: Australia
Posts: 5,695
Thanks: 1,256
Thanked 1,851 Times in 812 Posts
Grumpy is on a distinguished road
hehehe what a clever password.
__________________
Can't find a Game Conversion? Check the 'Conversion INDEX'
Reply With Quote
  #3  
Old 11-04-2005, 10:02
kosmiq's Avatar
kosmiq kosmiq is offline
Die Hard Member
 
Join Date: Feb 2005
Location: Sweden
Posts: 876
Thanks: 0
Thanked 0 Times in 0 Posts
kosmiq is on a distinguished road
How did you come up with the password? I can't really see bruteforce on that one.. Taking it is a pretty long one...

But I have to admit, real clever password..
Reply With Quote
  #4  
Old 11-04-2005, 10:03
noscript noscript is offline
Die Hard Member
 
Join Date: Jul 2004
Location: Germany
Posts: 469
Thanks: 0
Thanked 0 Times in 0 Posts
noscript is on a distinguished road
maybe its storred in the exe
__________________
[URL=http://noscript.milten.lima-city.de/copy.gif]WHERE WILL IT GONNA GO?[/URL]
[IMG]http://noscript.milten.lima-city.de/copy.gif[/IMG]
Reply With Quote
  #5  
Old 11-04-2005, 11:03
Joe Forster/STA's Avatar
Joe Forster/STA Joe Forster/STA is offline
Senior forum member
 
Join Date: Nov 2000
Location: Hungary
Posts: 9,836
Thanks: 20
Thanked 342 Times in 224 Posts
Joe Forster/STA is on a distinguished road
Well, if you're interested...

As a hacker, I like looking into files in general. It was nothing serious to find out that those PAK files are actually ZIP archives. When I wanted to see what's inside, I got the dialog box, asking for the password... DAMN!

A few minutes later, it became apparent that the complete Info-ZIP (http://www.info-zip.org ) code for 32-bit Windows is compiled into the EXE as there are strings which make no sense in the game: e.g. "Password incorrect--reenter:" is what Info-unZIP, a console program to be run in a DOS box, prints when the previously typed password proves to be incorrect.

Yes, my first try was looking in the EXE, trying to find "strange" strings. However, this is a Russian game so I expected the authors to be smart enough to know some hacker tricks and NOT leave the password unencrypted. Also, the password may be expected to be long and/or complicated enough so that Advanced Archive/ZIP Password Recovery wouldn't find it (in this millennium ).

I easily found the place where the string mentioned above is used. The check for the validity of the password, thus a _use_ of the password, must be very near. After some trial & error and comparison of the code with that of the original Info-unZIP program, I thought I found which "variable" (read: memory area; there are no variables as such in a machine code executable!) is supposed to hold the password. (It can be expected that the password is passed unencrypted from the game itself to the unzip component.) I couldn't debug the program because, as far as I remember, loading it into W32DASM made it crash long before any access to the PAK files.

So, I had to find a way to have the password printed somewhere. As I can't add even as few functionality as a message box to the program easily, because of the lack of space _and_ the lack of Windows API knowledge, I voted for generating a General Protection Fault on purpose. Then there's an error message displayed in a dialog box by the game (not Windows!), as I already found out. I changed the exception handler to display a string from a different memory location than the original "Stack Frame:" string. (The "Stack Frame:" string is in a read-only data segment, trying to overwrite it caused a GPF _before_ anything useful could be done...)

Then I changed the unzip code to place the first four bytes (a double word) of the password to that memory location and then try to read from memory location 0xFFFFFFFF (no segment is supposed to be 4 Gigs long ). I got the program crashed and display an error message with some garbage. Again, after some trial & error, I managed to make it display four English letters. Hmmm! Then I changed the unzip code to have the second four characters displayed. That was again four letters. Then I knew I was in the right direction...

A small intellectual satisfaction for the day!

Joe
__________________
Joe Forster/STA
For more information, see the FileForums forum rules and the PC Games forum FAQ!
Don't contact me via E-mail or PM to ask for help with anything other than patches (or software in general) done by me, otherwise your request may be deleted without any reply!
Homepage: http://sta.c64.org, E-mail: [email protected]; for attachments, send compressed (ZIP or RAR) files only, otherwise your E-mail will bounce back!

Last edited by Joe Forster/STA; 11-04-2005 at 11:11.
Reply With Quote
  #6  
Old 11-04-2005, 13:15
noscript noscript is offline
Die Hard Member
 
Join Date: Jul 2004
Location: Germany
Posts: 469
Thanks: 0
Thanked 0 Times in 0 Posts
noscript is on a distinguished road
maybe you could use Ollydbg (google ) its a debugger, you could have set a breakpoint after the extract code is executed. Then you look with winhex (google) into the RAM of Cops and look for the pass.

Should be a little bit easier but I havent tested.
__________________
[URL=http://noscript.milten.lima-city.de/copy.gif]WHERE WILL IT GONNA GO?[/URL]
[IMG]http://noscript.milten.lima-city.de/copy.gif[/IMG]
Reply With Quote
  #7  
Old 12-04-2005, 03:07
DABhand DABhand is offline
Banned
 
Join Date: Nov 2004
Location: Near my PC
Posts: 5,406
Thanks: 0
Thanked 3 Times in 3 Posts
DABhand is on a distinguished road
Sice would have been easier Joe, setting a bp on whatever API used to open the zip file.
Reply With Quote
  #8  
Old 12-04-2005, 05:12
noscript noscript is offline
Die Hard Member
 
Join Date: Jul 2004
Location: Germany
Posts: 469
Thanks: 0
Thanked 0 Times in 0 Posts
noscript is on a distinguished road
didnt i say that?

Quote:
you could have set a breakpoint after the extract code is executed.
__________________
[URL=http://noscript.milten.lima-city.de/copy.gif]WHERE WILL IT GONNA GO?[/URL]
[IMG]http://noscript.milten.lima-city.de/copy.gif[/IMG]
Reply With Quote
  #9  
Old 12-04-2005, 09:38
DABhand DABhand is offline
Banned
 
Join Date: Nov 2004
Location: Near my PC
Posts: 5,406
Thanks: 0
Thanked 3 Times in 3 Posts
DABhand is on a distinguished road
w32dasm isnt the easiest for setting breakpoints though :P


Olly i find seems to miss out breaks for some reason :\
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cops 2170 German NOCD Steffen121212 PC Games 6 24-02-2005 13:09
Cops 2170: Power of Law problems alimcm General Gaming 8 07-02-2005 07:45
Tutorial to unhide R18 files Megalexxx DC Games 19 30-06-2004 00:20
The Ultimate XBox Newbie Guide rms2001 XBox Games 5 15-08-2003 00:58



All times are GMT -7. The time now is 08:00.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com