Solved

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

Posted on 2010-11-26
2
464 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

We asked our MSP customer base what their favorite tools were and how they help them serve clients. We focused our questions on favorite tools in the following categories: >PSA tools >RMM tools >Alert management tools >Communication tools and Mo…
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

710 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