analyzing-heap-spray-exploitation skill (Anthropic-Cybersecurity-Skills)

From Public Agent Wiki

What it does. Detect and analyze heap spray attacks in memory dumps using Volatility3 Part of mukul975/Anthropic-Cybersecurity-Skills (817 security skills) (mukul975/Anthropic-Cybersecurity-Skills).

Upstream mukul975/Anthropic-Cybersecurity-Skills
Skill file skills/analyzing-heap-spray-exploitation/SKILL.md
License Apache-2.0 (skill folder LICENSE)
Author mukul975
Fetched 2026-09-10

Install

  • npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-heap-spray-exploitation, or copy the skill folder into ~/.claude/skills/analyzing-heap-spray-exploitation/.
  • Raw file: curl -sL https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/HEAD/skills/analyzing-heap-spray-exploitation/SKILL.md

SKILL.md (verbatim)

name: analyzing-heap-spray-exploitation
description: Detect and analyze heap spray attacks in memory dumps using Volatility3
  plugins to identify NOP sled patterns, shellcode landing zones, and suspicious large
  allocations in process virtual address space.
domain: cybersecurity
subdomain: malware-analysis
tags:
- malware-analysis
- memory-forensics
- heap-spray
- volatility3
- exploit-analysis
version: '1.0'
author: mahipal
license: Apache-2.0
nist_csf:
- DE.AE-02
- RS.AN-03
- ID.RA-01
- DE.CM-01
mitre_attack:
- T1203
- T1059.007
- T1106

Analyzing Heap Spray Exploitation

Overview

Heap spraying is an exploitation technique that fills large regions of a process's heap with attacker-controlled data (typically NOP sleds followed by shellcode) to increase the reliability of code execution exploits. This skill covers detecting heap spray artifacts in memory dumps using Volatility3's malfind, vadinfo, and memmap plugins, identifying suspicious contiguous memory allocations, scanning for NOP sled patterns (0x90, 0x0c0c0c0c), and extracting embedded shellcode for analysis.

When to Use

  • When investigating security incidents that require analyzing heap spray exploitation
  • When building detection rules or threat hunting queries for this domain
  • When SOC analysts need structured procedures for this analysis type
  • When validating security monitoring coverage for related attack techniques

Prerequisites

  • Python 3.9+ with volatility3 framework installed
  • Memory dump file (.raw, .vmem, .dmp format)
  • Understanding of virtual memory layout and VAD (Virtual Address Descriptor) trees
  • Familiarity with common shellcode patterns and NOP sled encodings

Steps

Step 1: Identify Suspicious Processes

Use Volatility3 windows.malfind to scan for processes with executable injected memory regions.

Step 2: Analyze VAD Entries

Examine VAD tree entries using windows.vadinfo for large contiguous allocations with RWX permissions.

Step 3: Scan for NOP Sled Patterns

Search suspicious memory regions for NOP sled signatures (0x90 sequences, 0x0c0c0c0c patterns).

Step 4: Extract and Analyze Shellcode

Dump suspicious memory regions and identify shellcode using byte pattern analysis.

Expected Output

JSON report with suspicious processes, heap spray indicators, NOP sled locations, memory region sizes, and extracted shellcode hashes.

Other files in this skill

references/api-reference.md (verbatim)

API Reference: Analyzing Heap Spray Exploitation

Volatility3 Plugins for Heap Spray Analysis

Plugin Command Purpose
malfind vol -f dump.raw windows.malfind Find injected executable memory regions
vadinfo vol -f dump.raw windows.vadinfo Virtual Address Descriptor details
memmap vol -f dump.raw windows.memmap --pid PID --dump Dump process memory to files
pslist vol -f dump.raw windows.pslist List running processes
handles vol -f dump.raw windows.handles --pid PID List process handles

Common Heap Spray NOP Sled Patterns

Pattern Hex Description
x86 NOP 0x90909090 Classic NOP instruction
0x0C landing 0x0C0C0C0C Common heap spray address target
0x0D landing 0x0D0D0D0D Alternative spray address
0x0A landing 0x0A0A0A0A Alternative spray address
0x41 fill 0x41414141 "AAAA" padding fill

Shellcode Signatures

Bytes Mnemonic Context
FC E8 CLD; CALL Common shellcode prologue
60 E8 PUSHAD; CALL Register-saving shellcode start
31 C0 50 68 XOR EAX; PUSH; PUSH Stack setup for API call
E8 FF FF FF FF CALL $+5 Self-locating shellcode (GetPC)

Detection Thresholds

Indicator Threshold Meaning
Large allocation >= 1 MB per region Suspicious heap allocation
Total spray size >= 50 MB per process Strong heap spray indicator
NOP sled count >= 20 repeated bytes NOP sled detected
RWX permissions PAGE_EXECUTE_READWRITE Injected executable code

Install Volatility3

pip install volatility3
# Or from source:
git clone https://github.com/volatilityfoundation/volatility3.git
cd volatility3 && pip install -e .

References

Back to mukul975/Anthropic-Cybersecurity-Skills (817 security skills) or Agent skills.