Reversing.kr Image Prc Writeup

Environment

Explanation

Reversing.kr is a website which has some of reverse engineering challenges. This is a write-up of ImagePrc on that website.

Solution

1. Running the app

When we run the app, we have a small dialogue. What we can do are just writing something on the bitmap and put the ‘check’ button. When we put check button, another window pops up and shows message ‘wrong’. placeholder

2. Consideration

It is easy to figure out the point this application creates a bitmap. What we need is we have to look for the point “CreateCompatibleBitmap” Windows API is used. placeholder

After sat a breakpoint and run the instruction one by one, we can find a place Loading 2 resources. We can easily determine this because “LoadResource” Windows API is being executed and these resource files are loaded and compared. placeholder

In the specified address, we can see many lines of “FFFF”. placeholder We can assume this is BMP image file included in the exe file. This is because

  1. This has to be an image file
  2. There are a lot of number of “FF” which means white in bmp file.

3. Analyzing PE header

To analyze this exe file, we can use PEview.exe In section .rsrc, MANIFEST 0065 0412, there is a bmp format image file placeholder To see this image file, we have to create a new BMP image whose size is 200x150 and open it with HxD hex editor. In addition, we have to create a blank BMP image file which has same size. We have to copy lines from 9060 to the bottom and replace the body of the new BMP file. placeholder Once we open the modified image file, we can get this image below. placeholder Now we know the password for this challenge is “GOT”.