DevPinoy.org
A Filipino Developers Community

>>> First two to make 3 wins! <<<

Solution to DP Challenge 2

rated by 0 users
This post has 13 Replies | 1 Follower

Top 10 Contributor
Posts 498
Points 8,375

My solution to DP Challenge 2:
http://devpinoy.org/blogs/modchip/archive/2008/10/26/DP-Challenge-2.aspx

It's like walk in the park Wink

Chris Vega This posting is provided "AS IS" with no warranties, and confers no rights My Weblog|Visit MSDN Community
Top 10 Contributor
Posts 751
Points 10,140
Hahaha! Nice job chris! Your solution was the best solution I was hoping for. Very clean job! I told you it was easy. *Waiting for Rolvin/lamia * :D

Top 10 Contributor
Posts 768
Points 13,405

Here was my solution.

 

 

Stick out tongueSorry modchip, I've just not fully recovered yet to try and solve your challenge. Next time really, promise. :)

 

Convert limitations to great expectations... You are the creative force of your life...

  • | Post Points: 20
Top 10 Contributor
Posts 751
Points 10,140
Haha, ayus lang lamia. YOu can try it anytime naman eh. :D

Top 10 Contributor
Posts 498
Points 8,375

Here's a quick how-to:

- Open the problematic program with OllyDBG.
- Press F9, and let it run until the main dialog is shown.
- Add breakpoints to all procedure entry. Most likely starts with:

     PUSH EBP
     MOV EBP,ESP ; Setup the stack frame

- Then click the button to run the functions, hopefully we get a breakpoint-hit.
- If no breakpoint-hit, restart the program with OllyDBG and add breakpoint to where you think
  the starting point of a click. I found it somewhere with a code:

     PUSH <argument1>
     PUSH <argument2>
     PUSH <argumentx> ; STDCALL calling convention
     CALL <ExeFilename>.<MemoryAddress>

   It should be hit upon clicking any of the 3 buttons.
- The first thing I've noticed is that each procs is comparing the arguments if equal:

     MOV EAX,DWORD PTR SS:[ARG.x]
     CMP EAX,DWORD PTR SS:[ARG.x]
     JNE <MemoryAddress> ; --> Error message

    Well, that's my hint:
       1. I can patch the JNE part to set of NOPs (90h) or
       2. Just path to the arguments.

- I did the second approach, I patched to the argument before the proc call, and it's done.

Cheers,

-chris

Chris Vega This posting is provided "AS IS" with no warranties, and confers no rights My Weblog|Visit MSDN Community
  • | Post Points: 20
Top 10 Contributor
Posts 751
Points 10,140
Exactly. :D

Top 25 Contributor
Posts 156
Points 2,450

 See the attached file for my solution. It's a screen shot.

 

  • | Post Points: 20
Top 10 Contributor
Posts 751
Points 10,140
What do the numbers represent? :D

Top 25 Contributor
Posts 156
Points 2,450

modchip:
What do the numbers represent? :D

 

Nothing in particular... hehe. consider it, terminal 1, 2, and 3. hehe.

 

  • | Post Points: 20
Top 10 Contributor
Posts 751
Points 10,140
Yes, you're close. But try considering the "CALLS" and the "ARGUMENTS" -- then see what they compare in the proc that was called. *hint hint hint*!

Top 25 Contributor
Posts 156
Points 2,450

modchip:
Yes, you're close. But try considering the "CALLS" and the "ARGUMENTS" -- then see what they compare in the proc that was called. *hint hint hint*!

I am having difficulties modifying it's arguments... honestly, I don't know where to start.

All I did was to redirect the jumps to non-error calls.

 

 

  • | Post Points: 20
Top 10 Contributor
Posts 751
Points 10,140

Instruction at 004011AC is "a" key, there are 2 more. The real problem is that you have the key, but you don't have the lock. Hehehehe.

Arguments can be modified by simply assembling ( press space on the instruction )

.

Top 10 Contributor
Posts 751
Points 10,140
By the way, I think this will help you -- you're already in that "important proc" (The one you pointed in the screen) -- just look for the call to that proc and you'll get what I mean.

Top 25 Contributor
Posts 156
Points 2,450

modchip:
By the way, I think this will help you -- you're already in that "important proc" (The one you pointed in the screen) -- just look for the call to that proc and you'll get what I mean.

Thanks for the tip dude. ;-)

 

 

 

  • | Post Points: 5
Page 1 of 1 (14 items) | RSS

Copyright DevPinoy 2005-2008