View Full Version : other serial input methods to break on?
haxran
February 6th, 2006, 10:03
I'm trying to reverse an executable's serial routine, but I cannot break on execution as it reads my bogus serial.. the old reliables getdlgitemtexta and getwindowtexta do not get hit... It's just a win32 exe file (not a vb app), what other methods could it be using to get the input from the window?
-ran
Kayaker
February 6th, 2006, 11:11
Hi
Just a quick reply, it's not uncommon (or shouldn't be) for a tricky app to read the characters as you type them in. Look for variations on handling WM_CHAR notification and such.
Kayaker
naides
February 6th, 2006, 11:52
Just to complement what Kayaker suggested,
It is really easy to interact with the human operator via key board and mouse without invoking any typical API. In fact, macromedia and flash do it all the time:
They read text that you input using their own routines, USER32 API never get called.
On the other hand, the windows messages are much harder to bypass and/or emulate
You need to know the handle of the window (textbox?) you are dealing with, which you can get form one of many spy programs. Then learn the use of bmsg in softice. Note bmsg is very touchy about context, so make sure you are in the right context or you wont be able to place the break point
then you can 'catch' the app reading the text you type, character by character, put a memory read BP in the buffer where your characters are being stored and figure out serial validation in the usual fashion.
If you are using Olly, ther is no BMSG that I know of, you need to learn the functioning of the "message pump" and use message related APIs to break into the message notification system.
Thre are several tutorials around this technique, I think in Krobar's collection
JimmyClif
February 6th, 2006, 12:04
SendMessage with WM_GETTEXT (0Dh)
bpx SendMessageA if *(esp->8) == 13
I think - well, what do I know :shrug:
SiGiNT
February 6th, 2006, 13:14
When all else fails - I set a BP on GetDlgItem - and enable it just before I hit the OK button.
SiGiNT
Tola
February 6th, 2006, 15:26
or try searching for your fake number in memory (should be long enough to be unique) and put a memory breakpoint on that location...
Ricardo Narvaja
February 6th, 2006, 18:18
Go to W and look the button, in the windows list and right click MESSAGE BREAKPOINT (BMSG) and select the right message, the usual are WM_LBUTTONDOWN, or put a BP CONDITIONAL in TranslateMessage with MSG==202 in the condition window, and olly break when you push a buttton, or change the WM, to the more apropiate WM_KeyDown etc
Ricardo narvaja
fighter_81
February 7th, 2006, 02:25
There is another method i used to, just like our old and good Hmemcpy, it is:
bpx editwndproc+566 and you break in our old hmemcpy.
Regards,
Fighter_81
HaRdLoCk
February 14th, 2006, 06:48
theres an ollydbg plugin for hmemcpy under winNT kernels called puntos magicos made by ricardo narvaja.
if the target is delphi, theres another nice approach. use the godup plugin and apply the full delphi 6/7 signatures found here in forum. search for gettext procedure and do a breakpoint on every reference. this will lead you very fast to the place where you want to be :-)
oep
February 16th, 2006, 08:45
Quote:
[Originally Posted by fighter_81]There is another method i used to, just like our old and good Hmemcpy, it is:
bpx editwndproc+566 and you break in our old hmemcpy.
Regards,
Fighter_81 |
Very nice Fighter_81, I have try it, and it's perfectly wonderful,
In my Ollydbg, the words is 'bp EditWndProc+566'
fighter_81
February 16th, 2006, 10:05
i'll be glad to have helped you out, i write bpx because i use softice, and sorry for my bad english but i am an italian guy.
regards, Fighter_81
Powered by vBulletin® Version 4.2.2 Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.