Skip to content

meltedinhex/analyst-ai-pack / skills/solving-malware-with-symbolic-execution

solving-malware-with-symbolic-execution

Verified

Uses symbolic execution (angr) to solve constraint-based malware problems — finding inputs that reach a target branch, recovering keys/passwords from a check routine, and brute-forcing opaque predicates — by generating a ready-to-edit angr harness. Activates for requests to use symbolic execution, solve a malware unlock check with angr, or recover an input that reaches a code path.

FileKindSize
LICENSEother340 B
SKILL.mdskill md3.2 KB
references/api-reference.mdmarkdown1.4 KB
scripts/analyst.pyscript3.1 KB

references/api-reference.md

View on GitHub
# API Reference: Solving Malware With Symbolic Execution

## Overview

`scripts/analyst.py` generates an angr harness that loads a binary, explores to a target address
while avoiding another, constrains a symbolic input, and prints the solving input. `check` reports
angr availability. The tool only generates text — it does not load the binary or run the sample.

## Dependencies

| Package | Version | Purpose |
|---------|---------|---------|
| angr | latest | runs the generated harness (optional for generation) |
| (stdlib) | — | JSON, file IO |

## Core functions

### `check()`
Reports whether `angr` is importable.

### `harness(binary, find, avoid, out)`
Writes an angr script using `full_init_state`, a `claripy` symbolic stdin (printable-constrained),
`Veritesting`, and `simgr.explore(find=…, avoid=…)`.

## Tuning for convergence

- Constrain input length and charset (the skeleton sets printable bytes).
- Use `Veritesting` (enabled) and consider `LAZY_SOLVES` for branchy code.
- Provide accurate load-base addresses for `find`/`avoid`.

## Usage

```bash
python scripts/analyst.py check
python scripts/analyst.py harness --binary sample.bin --find 0x401234 --avoid 0x401260 --out solve.py
```

## Sources

- angr documentation (simulation managers, exploration techniques) — https://docs.angr.io/
- MITRE ATT&CK T1480 Execution Guardrails — https://attack.mitre.org/techniques/T1480/
- claripy symbolic-variable and constraint API from the angr docs
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