CyberKit

Code Injection

Also called Process Injection, Memory Injection.

Placing and running attacker code inside another process's memory.

What it is

A family of techniques that write executable code into the address space of another, often legitimate, process and cause it to run there, for example by allocating memory and creating a remote thread. The host process lends its identity and trust to the injected code.

Why it matters

Injection lets malware execute under a trusted process to evade detection and access that process's privileges and network reach, which is why comparing memory regions against backing files is central to memory analysis. Private executable regions with no file behind them are the hallmark.

In practice

An attacker allocating an executable region in a trusted process, writing a payload, and starting a thread at its base, surfaced by an executable VAD region with no mapped image.

What to look for

  • Executable private memory without a backing file.
  • Remote threads created in another process.
  • Trusted processes making network connections they never make.

Common mistake

Trusting the process name. Injected code borrows the host's name, path and permissions.

Practice it nearby

CyberKit has no tool for this term itself. These are the closest places to practice it.

In the field

Well-known tools where this shows up on the job. They are listed to show the landscape, not as a recommendation.

  • Volatility 3 Open source

    A widely used open source framework for analyzing memory images with plugins. Our notes.

  • 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.

Read next

Sources