Skip to content

meltedinhex/analyst-ai-pack / skills/extracting-and-classifying-strings

extracting-and-classifying-strings

Verified

Extracts ASCII and Unicode strings from a binary and classifies them into investigative categories: URLs, IPs, file paths, registry keys, mutexes, commands, and API names, prioritizing the analyst's attention. Activates for requests to extract strings, classify strings output, or pull human-readable artifacts from a sample.

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

references/api-reference.md

View on GitHub
# API Reference: Extracting and Classifying Strings

## Overview

`scripts/analyst.py` extracts ASCII and UTF-16LE strings at a minimum length and classifies them
into investigative categories (urls, ips, paths, registry, commands, apis), flagging a sparse
dump as a possible obfuscation signal. It reads bytes only and never executes the sample.

## Dependencies

| Package | Version | Purpose |
|---------|---------|---------|
| (stdlib) | — | regex, JSON, file IO |

## Core functions

### `ascii_strings(data, min_len)` / `unicode_strings(data, min_len)`
Extract printable ASCII and UTF-16LE runs respectively.

### `classify(strings)`
Buckets strings into categories via per-category regexes.

### `run(path, min_len)`
Returns counts, categorized strings, and an obfuscation hint.

## Usage

```bash
python scripts/analyst.py strings sample.bin --min-len 5
```

## Sources

- GNU binutils `strings` — https://www.gnu.org/software/binutils/
- FLOSS (FLARE Obfuscated String Solver) for stacked/encoded strings —
  https://github.com/mandiant/flare-floss
- UTF-16LE wide-string extraction (printable byte + 0x00), standard Windows-analysis 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