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

前提是你 提交于 2019-12-12 08:01:47

问题


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?


回答1:


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



回答2:


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!



来源:https://stackoverflow.com/questions/24138087/how-can-i-set-a-breakpoint-for-a-button-click-using-ollydbg

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!