Skip to content

meltedinhex/analyst-ai-pack / skills/detecting-process-injection-in-memory

detecting-process-injection-in-memory

Verified

Detects process injection in a memory image by identifying private executable regions with no file backing, RWX protections, and modified entry points using Volatility 3 malfind-style analysis. Activates for requests to detect process injection, find injected code in memory, or triage suspicious executable regions in a memory image.

FileKindSize
LICENSEother340 B
SKILL.mdskill md2.8 KB
references/api-reference.mdmarkdown1.2 KB
scripts/analyst.pyscript2.6 KB

references/api-reference.md

View on GitHub
# API Reference: Detecting Process Injection in Memory

## Overview

`scripts/analyst.py` parses Volatility 3 `windows.malfind` text output and ranks processes by
injection indicators: RWX private regions, PE/MZ headers and DOS stubs in private memory, and
shellcode prologue bytes in the hexdump. It parses text only and executes nothing.

## Dependencies

| Package | Version | Purpose |
|---------|---------|---------|
| (stdlib) | — | regex, JSON, file IO |
| volatility3 | latest | produces the `windows.malfind` input (run separately) |

## Core functions

### `score(path)`
Returns ranked injection candidates with PID, cumulative score, and contributing reasons.

## Scoring weights

- RWX region: +3
- PE/MZ in private memory: +3
- DOS stub ("This program cannot be run"): +2
- Shellcode prologue bytes: +1

## Usage

```bash
vol -f memory.raw windows.malfind > malfind.txt
python scripts/analyst.py score malfind.txt
```

## Sources

- MITRE ATT&CK T1055 Process Injection — https://attack.mitre.org/techniques/T1055/
- Volatility 3 documentation (windows.malfind, windows.vadinfo) — https://volatility3.readthedocs.io/
- malfind RWX / private-memory PE heuristics from published memory-forensics practice
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall