patch
Level 2 reversing challenge on Dreamhack.io
The Challenge
https://dreamhack.io/wargame/challenges/49
Solving my first reversing challenge
The flag is drawn using some Windows API functions, but it is partially obfuscated. Since this is a patching challenge, I need to remove the draw instructions which draw over the flag.
I found the function for the drawing process, so let’s expand it
Again, the main drawing logic can be found here.
There are two drawing instruction chunks here. Assuming that one chunk is for drawing the flag, and the other is for hiding the flag, I added a breakpoint in between them so I could tell them apart.
At the breakpoint, only the scribbles were drawn. This means that I need to patch the program to remove the first set of draw instructions.
Screenshot of program at breakpoint
To achieve this, I replace the call instructions in the assembly with NOPs.
Screenshot of program at breakpoint
I repeated this about 20 times, and the patched program gives us the flag.




