Solved

Is it possible to discover if .exe file uses the GetDesktopWindow command of the Windows?

Posted on 2010-11-26
2
478 Views
Last Modified: 2012-05-10
I need to discover if one file .exe uses the GetDesktopWindow command of the Windows.

Which are the instructions hex generated when if use the GetDesktopWindow command of the Windows in program .exe?
0
Comment
Question by:mccoymad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Expert Comment

by:logic_chopper
ID: 34220039
Well if you have Visual Studio you could simply use "Dumpbin /imports file.exe" or "Link /dump /imports file.exe".  Or if you want to see where the call is actually made in the EXE then load the EXE into the "free" version IDAPro at http://www.hex-rays.com/idapro/ and then search the imports for GetDesktopWindow and double click on the xref.
0
 
LVL 17

Accepted Solution

by:
CSecurity earned 500 total points
ID: 34664592
May a program load and use that API dynamically in runtime like:

HMODULE test = GetModuleHandle("user32.dll");
fGetDesktopWindows = (func_GetDesktopWindow) GetProcAddress(test, "GetDesktopWindow");

For this type which mostly malwares uses, you have to debug program like in OllyDbg, then set a breakpoint in GetDesktopWindow API to see if it's getting called or you can do API Hooking, etc.

Normal softwares will have it in IAT (Import address table), so using dumpbin as logic_chopper said or using dependency walker you can look for GetDesktopWindow. Also a not technical method is open program in hex editor and look for "GetDesktopWindow", if it's found you can go further
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why do some people recommend buying business VoIP from an ISP? What are the benefits to my company? What are the costs?
First of all let me say that the only language that I speak is English, but in answering questions here I often come across people whose English skills are not the best and I’d like to be able to communicate better with them, and the following descr…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question