hackweb
notes on hacking and technology
IT EN
main menu
user menu
you are not logged in

Process hollowing: hollow a process and refill it

March 27, 2025 · 1 min read · #malware #windows #injection

Process hollowing runs malicious code under the guise of a trusted system process (svchost, notepad).

The flow

CreateProcess("notepad.exe", CREATE_SUSPENDED)
NtUnmapViewOfSection(target, imageBase)  # hollow it
VirtualAllocEx + WriteProcessMemory       # write the malicious PE
SetThreadContext(entry = new EP)
ResumeThread                              # the malware starts

The process keeps the legitimate one's name, path and (often) apparent signature, but runs something else. Good for evading shallow name-based checks.

Defence

EDRs detect the mismatch between the on-disk image and the in-memory one (memory scanning, module stomping detection), processes created suspended followed by unmap/write, and entry-point mismatches. On-disk vs in-memory image comparison is the key countermeasure.


« back to home

latest posts
 
your IP address:
216.73.216.108
visitor #0
MOTD:
Every abstraction leaks somewhere.
Here we look at where.
topics