Injected Code Detection
Also called Malfind Technique, Injected Region Hunting.
Finding hidden code by pairing region protections with backing files.
What it is
An analysis method that scans each process's memory regions for ranges that are both executable and writable yet have no file mapped behind them, then inspects their contents for code. It cross-references VAD protection flags with what the OS records as the region's backing.
Why it matters
This is one of the fastest ways to surface injected payloads and shellcode in a memory image, since legitimate code almost always comes from a file-backed, non-writable mapping. It triages which processes to examine before any disassembly begins.
In practice
Flagging an executable, writable, unbacked region inside a trusted service, then confirming its first bytes decoded as a reflective loader stub.
What to look for
- Regions marked executable, read write and private.
- MZ headers or shellcode patterns at the start of a region.
- Hits inside processes that rarely run dynamic code.
Common mistake
Treating every hit as malicious. JIT compilers in browsers and .NET create the same pattern.
Practice it nearby
CyberKit has no tool for this term itself. These are the closest places to practice it.
- Collection Plan
Build a host collection command list, ordered by volatility.
- Windows Host Case
An alert on a live Windows workstation: read the event logs and the Registry, rebuild the timeline, then decide what to collect.
In the field
Well-known tools where this shows up on the job. They are listed to show the landscape, not as a recommendation.
-
Velociraptor Open source
Can collect memory and query live process memory across many hosts. Our notes.
-
CrowdStrike Falcon Commercial
EDR agents watch memory activity on the host, such as injection and unbacked code.
Tools practitioners use
- Volatility 3: Memory image analysis & plugin framework
Read next
- Code Injection: Placing and running attacker code inside another process's memory.
- Virtual Address Descriptor Tree: Per-process map of reserved and committed virtual memory regions.
- Shellcode: Compact, self-contained machine code that runs from an injected buffer.