FreeCell - Allow any move

Sunday, February 12th, 2006

“That move is not allowed” - most probally you have got this message several times when you are playing freecell. This message is bit of a headache. I wanted get rid of it. With the great help of W32Dasm, it was pretty easy.

The first step was disassembling the game. Then, I searched through the code for “That move….”. It only appeared only once which makes our job much easier. backtrack, backtrack, backtrack, it was really easy. Then I was able to find out a jump : “jbe 01003C2B” at offset 2F7C. Changing those into ‘nop’s will allow you to make any move except the moves on top bars. So, I was going around here and there in the code and managed to change the top bar. Since it is 3:23 AM, I’m not going to explain how to do it. If you want to change the top bars, you can apply the same theory. It is also changing few jumps. Hint : Try to use debugging feature of W32DASM.

Cracking the passwords

Monday, February 6th, 2006

Admin password, the dream of everyone. Specially, when you are in an environment where you are not the system administrator. Today, what I’m going to show you is how to take Windows Administrator passwords. You might have even noticed, if we can find out where windows stores the password, we can just look at it. But unfortunately, it is not that easy.

Windows stores the passwords in the Windows\System32\Config\SAM file. But windows prevent you from accessing that file. So, the answer is LINUX. Take a Knoppix CD, put it into your CDROM and restart the machine. Make sure your first boot device is CD-Rom. Then, it’ll boot into the Linux. Then the best option would be a USB pen. Just mount it and copy the SAM file into it. And make sure you also copy the Windows\System3\Config\System file. Then, restart again, you need Windows now.

Now you have to take a key called syskey from the system file. There are some windows utilities to do that, but I can’t remember the names. Anyway, once after you get it, you can use that key to decrypt the SAM file. Now the password!!! NO!! It’s not.

Again you have some hashes. What do we do now? Now, you have the time consuming part. You have to download and run John the ripper on these hashes. Please note this may take few hours, depending on the length of the password.

After that ***you*** are the system admin!!!

Freeze the world and sweep the mines.

Sunday, January 22nd, 2006

Minesweeper, a really simple nice game. Probably one and only bug free Microsoft software. I think, all of you have played Microsoft minesweeper at least once. Basic idea is to recognize the mined squares.

When, I was playing this game, I wanted to **cheat**. But how ? Not like, downloading simple cheat codes/ trainers and running them. I need another way. A way which I can have fun. There were two ways. The easier way was, changing the “best times” in the registry. It was fairly simple. You just have to change the registry values. Then, the next method was, changing the code. But the Microsoft is close sourced. The game is compiled. How can I change the code? Confused? I’ll show you how.

So, every time you write a code in c++/vb/pascal… and compile it, the compiler converts it into the assembler code, then to the machine code. The assembler code and machine code is very similar. Conversions between those two languages are simple process although it is almost impossible to convert assembler code in to a c++ code.

Anyway, There are some programs called disassembles, which you can disassemble any compiled exe file to assembler code. For a first time user, the assembler code might be like Greek. But once you get into it, the assembler language is not very hard. Then, you need to understand the code and changing the appropriate hex values. You need bit of experience for this.

So, after disassembling the code, I was going through it. My first idea was to track the timer and then track where they are increasing the time. There is a timer api, and it post a WM_TIMER message. So, I played around the WM_TIMER. But it was rather hard.

After spending about a half an hour around that, I found another approach. In every second, a tick sound is played. So, I went through the list of imported functions and managed to find out PlaySound api is imported. Then, It was used it three different positions. Bomb, Winner and tick sounds. So, after spending another few minutes, I found which one belongs to the tick sound. As a programmer, I can say, most probably, the sound is played after the time variable increased. So, I backtracked. Then it was fairly easy to find out the place.

There was an instruction at 1002FF5: inc dword ptr [100579C]. That was the place. Once after I managed to change all of those instructions to 90 (nop), the timer stopped.