FindMyHandle is a small Windows command-line utility to inspect and act on loaded modules and handles in another process. It helps detect potentially suspicious or manually mapped modules, close remote handles, request module unloads, produce dumps, and monitor loading activity in real time.
Note: This repository contains
ModuleListener.cppas the main implementation.
- Enumerate loaded modules of a target process (name, path, base address).
- Check file signatures and publisher information when available.
- Heuristic detection of manual-mapped modules (no on-disk file, invalid PE header, etc.).
- Flag suspicious modules (unsigned, unknown publisher, user/temp path, suspicious filename patterns).
- Close a raw handle in a remote process via
DuplicateHandle(DUPLICATE_CLOSE_SOURCE). - Request remote module unload via
CreateRemoteThread+FreeLibrary. - Live monitor mode to report newly loaded modules.
- Dump mode: export module + handle information to
dump/<ProcessName>/dump.jsonanddump.txt. - Console ASCII banner on startup.
- Windows (Win32 API usage)
- MSVC / Visual Studio to build (project is a Visual C++ project)
- Administrator privileges for some operations (closing handles, opening processes with high privileges, terminating processes)
Open the solution (.sln) in Visual Studio or build from Developer Command Prompt:
msbuild FindMyHandle.sln /p:Configuration=Release /p:Platform=x64
x64/Release is the recommended configuration.
FindMyHandle.exe --find <ProcessName> [options]
Options:
--unload <index|0xbase>— Unload a module by index or base address from the enumerated list--close <handle>— Close a raw HANDLE in the target process (decimal or 0xHEX)--live-monitor— Continuously monitor for newly loaded modules--detect-manualmap— Enable heuristics to detect manual-mapped modules--only-suspicious— Show only modules the tool marks as suspicious--verbose— Print detailed reasons for flagged modules--kill— Terminate the target process after requested actions--dump— Produce JSON/TXT dumps and exit
Examples:
FindMyHandle.exe --find explorer.exe
FindMyHandle.exe --find game.exe --only-suspicious --verbose
FindMyHandle.exe --find game.exe --unload 7
FindMyHandle.exe --find game.exe --close 0x1C4 --kill
FindMyHandle.exe --find game.exe --dump
FindMyHandle.exe --find game.exe --live-monitor --detect-manualmap
- Module enumeration uses the Toolhelp API (
CreateToolhelp32Snapshot,Module32First/Next). - Signature checks use
WinVerifyTrust. - Handle enumeration uses
NtQuerySystemInformation(SystemExtendedHandleInformation). - Remote unload calculates the address of
FreeLibraryin the target process by computing an offset from the localkernel32.dlland creating a remote thread.
Dumps are written to dump/<ProcessName>/:
dump.json— structured JSON listing modules and handlesdump.txt— human-readable text dump
- Many operations are intrusive and can destabilize the target process. Use only on processes you control or for which you have permission.
- Running as Administrator may be required for certain actions.
- The tool uses undocumented NT APIs for some functionality; behavior can vary across Windows versions.
ModuleListener.cpp— main implementation and CLI handlingModuleListener.md— file-level documentation- Visual Studio project files and filters (in repository root)
Contributions are welcome. Open issues for bugs or feature requests and submit pull requests. Keep changes small and well documented.
No license file is included by default. Add a LICENSE file to specify one (e.g., MIT) if you intend to publish this repository.
This tool is provided as-is. The author is not responsible for damage caused by misuse of the tool. This Tool is just for Debugging and education purpose. I do not support any kind of cheating or exploit-based usage of this tool