Process Enumeration
- Author
- Moise Medici
- Updated
- 23 Nov 2025 · Completed
Introduction
Code and executables download: From GitHub
Process discovery is performed for a variety of reasons:
- Understanding whether the malware is running in a sandbox or a virtual machine by checking for standard VMware/VirtualBox processes
- Understanding whether the malware is being analyzed by checking for tools like Procmon, Wireshark, and similar applications
- Finding a process to attach to in order to execute a malicious payload
This section focuses on the first two points, as they are very similar to each other. The main focus is understanding how the enumeration can be done with different sets of Windows APIs. There are generally three methods:
- Using
CreateToolhelp32Snapshot1,Process32First2 andProcess32Next3 - Using
EnumProcesses4,OpenProcess5,EnumProcessModules6 andGetModuleBaseNameA7 - Using
NtQuerySystemInformation8.
These three approaches are presented below.