Heap Spray
Filling the heap with repeated payloads to land at a predictable spot.
What it is
A technique that allocates many copies of attacker-controlled data across the heap so a given address is very likely to contain the payload. It improves exploit reliability when the exact landing address is uncertain.
Why it matters
Heap spraying is a common companion to use-after-free and type-confusion bugs, raising hit rates against memory randomization. Spotting spray patterns in a memory image is a hint that exploitation was attempted.
In practice
A browser exploit allocates thousands of identical strings so that a corrupted pointer almost certainly dereferences attacker-controlled bytes.
What to look for
- Large repeated allocations filled with the same pattern.
- NOP sleds or repeated addresses in memory.
- Browser or document readers growing memory quickly.
Common mistake
Thinking it is outdated. Variants still appear in browser and scripting engine exploits.
Practice it nearby
CyberKit has no tool for this term itself. These are the closest places to practice it.
- Risk Scoring
Score a vulnerability with CVSS v3.1, or an incident across five dimensions, and see the reasoning behind each number.
- Map and Score
Map real procedures to ATT&CK techniques, then pick the CVSS v3.1 metrics for real vulnerabilities.
In the field
Well-known tools where this shows up on the job. They are listed to show the landscape, not as a recommendation.
-
CrowdStrike Falcon Commercial
An EDR agent that records process, file and network activity on each host and flags this kind of behavior.
-
Microsoft Defender for Endpoint Commercial
Microsoft's EDR, with advanced hunting tables you can query for this activity across Windows, macOS and Linux.
-
Velociraptor Open source
Collects and hunts for artifacts across many hosts at once, often during live response. Our notes.
-
Sysmon Free
Free Windows logging of process starts, network connections and more, which many detections rely on. Our notes.
Read next
- Use-After-Free: Using a pointer after its memory has been freed and possibly reused.
- Heap Overflow: Overflowing a heap allocation to corrupt adjacent chunks or metadata.
- Shellcode: Compact, self-contained machine code that runs from an injected buffer.