How can I set a breakpoint for a button click using ollydbg?
Asked Answered
G

2

10

How can I set a breakpoint for a button click using ollydbg?

i am trying to disable a button click on game client, so i want to set break point to catch the button click event. is that possible to happen with ollydbg?

Gabo answered 10/6, 2014 at 9:59 Comment(1)
[This][1] thread will probably contain the answer. [1]: reverseengineering.stackexchange.com/questions/3288/…Enallage
U
7

let application make window and buttons then pause it.

in ollyDBG 1 :

  • go to view > windows
  • select your button.
  • right click and select Message breakpoint on ClassProc
  • in Messages: select 202 WM LBUTTONUP
  • select Break on all windows with same title
  • select Pause program: On message
  • select Log WinProc arguments: Never

in ollyDBG 1 or 2 :

  • go to view > windows
  • select your button.
  • right click and select Conditional breakpoint... Shift+F2
  • type [ESP+8]==WM_LBUTTONUP as your condition and run program
Uella answered 28/3, 2016 at 0:23 Comment(0)
H
3

well, depends, if this program does not have any kind of protection against listing the names of the libraries functions and is not java, it's actually pretty simple.

Method A (Better Approach)

1º Start debugging the process and let it load

2º Find out looking in the program imports if it uses User32.dll (probably does maybe not direcly)

3º Go to OllyDbg and go to Names using Ctrol+N (use this for guide http://www.ollydbg.de/quickst.htm)

4º Sort by name and type RegisterClass** (it will be a export)

5º put a breakpoint on all these names using F2

6º Click on the button

7º You'll break on the message handling, you will need to step foward a bit

thats it

Method B (Lazy Method and less chance of success)

1º Start debbuging the program and let it run normally clicking F9

2º let the program and olly maxized and in front

3º pause the program then click ALT+F9 or CTROL+F9

4º Click the button and hope for a break

5º The program will (may)break on the Return of the button function, you probably will have to trace back to get on the code

Have fun!

Herren answered 24/10, 2014 at 2:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.