CyberKit

Shellcode

Also called Position-Independent Code.

Compact, self-contained machine code that runs from an injected buffer.

What it is

A small piece of position-independent machine code crafted to execute from wherever it is placed in memory, resolving the APIs it needs at runtime rather than relying on a loader. It is the typical first-stage payload of an exploit or injection.

Why it matters

Because shellcode runs from raw buffers with no file or module backing, memory forensics is often the only place to recover and analyze it. Disassembling shellcode from a capture reveals the API resolution, decoding, and follow-on stages an attacker used.

In practice

Carving an executable buffer from a process's heap and disassembling it to find an API-hashing routine that built a download-and-run capability in memory.

What to look for

  • Small executable memory regions not backed by a file.
  • Position-independent code patterns such as PEB walking.
  • Shellcode in exploit payloads, documents or scripts.

Common mistake

Looking for it on disk. It usually lives only in memory.

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