Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 10-30-2005, 03:44
aldente aldente is offline
VIP
 
Join Date: Jul 2003
Posts: 266
Rept. Given: 27
Rept. Rcvd 7 Times in 5 Posts
Thanks Given: 35
Thanks Rcvd at 10 Times in 9 Posts
aldente Reputation: 7
Interprocess communication with a third-party DLL

Hello!

There is a DLL (ActiveX Plugin for MSIE) which does some nice stuff. I analyzed it, found some places inside where the values I'm interested in are available (e.g. where they are PUSHed). My problem is now to access them not from inside the debugger but with my app.

I thought about putting an invisible edit-box and an invisible button into my app and modify the DLL, so it does a SetWindowText with the interesting value (it's a string) and then sends a clicked-message to the button. The only problem is: I have just very, very little Assembly skills and I'm not able to implement that (and FindWindowEx and everything I would also need).

So is there any EASIER way to send this string to my app, or is there any good tutorial on how to add this message-stuff to a third-party DLL at Assembly-level?
Reply With Quote
  #2  
Old 10-30-2005, 07:20
aldente aldente is offline
VIP
 
Join Date: Jul 2003
Posts: 266
Rept. Given: 27
Rept. Rcvd 7 Times in 5 Posts
Thanks Given: 35
Thanks Rcvd at 10 Times in 9 Posts
aldente Reputation: 7
OK, this Delphi line does exactly, what I want:

Code:
SetWindowText(FindWindowEx(FindWindow('TADCPwnd', nil), 0, 'TEdit', 'punkrock'), 'my tiny little value');
Quite a lame solution, but it works quite well. Plus the Edit-Box has an OnChange-event, so there is not even need for a button! Everything is done within this single line.
The values are all constants except "my tiny little value".

I looked in my debugger what this code looks like in Assembly language, result:

http://home.scarlet.be/~il095280/functioncall.gif (only ~ 4KB)

How to insert the function-calls to FindWindowExA and FindWindowA into the other program? Only SetWindowTextA is used on other locations in that program.


Please help me!

Last edited by aldente; 10-30-2005 at 07:24.
Reply With Quote
  #3  
Old 10-30-2005, 17:45
searchme
 
Posts: n/a
Hi,

does the dll include something like LoadLibrary and GetProcAddr then you may bind the functions FindWindowExA and FindWindowA dynamically. Therefor you may need to add a new section to the binary or find enough free space.
Another solution would be to add a little dll of yours to the program's address space - probably using LoadLibrary - and then to use ReadProcessMemory at the particular address. If you load the process yourself using CreateProcess you don't even have to add a dll to the process.

searchme
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Free registration codes-Opera Browser 10-year online anniversary party Warren General Discussion 3 09-02-2005 06:49
Tor - An anonymous Internet communication system Shub-Nigurrath General Discussion 1 05-24-2005 01:29


All times are GMT +8. The time now is 12:53.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( 1998 - 2024 )