Skip to content

meltedinhex/analyst-ai-pack / skills/analyzing-rich-header-and-compiler-artifacts

analyzing-rich-header-and-compiler-artifacts

Verified

Analyzes the PE Rich header and related compiler artifacts to fingerprint the build toolchain, cluster related samples, and detect inconsistencies that suggest tampering. Activates for requests to analyze a Rich header, fingerprint the compiler/linker, or cluster samples by build toolchain.

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

references/api-reference.md

View on GitHub
# API Reference: Analyzing Rich Header and Compiler Artifacts

## Overview

`scripts/analyst.py` parses the PE Rich header: it finds the `Rich` marker, recovers the XOR key,
locates the XOR-encoded `DanS` signature, decodes the comp.id entries into
`(product_id, build_id, use_count)` tuples, and emits a toolchain fingerprint hash. It reads bytes
statically and executes nothing.

## Dependencies

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

## Core functions

### `rich(path)`
Returns Rich-header presence, XOR key, decoded entries, and a clustering fingerprint.

### `_find_dans(data, rich_off, key)`
Scans backward for the XOR-encoded `DanS` (`0x536E6144`) signature.

## Rich header layout

`DanS` + 3 padding DWORDs, then 8-byte entries (`comp.id` = product_id<<16 | build_id, and
use_count), all XOR'd with the key, terminated by `Rich` + key.

## Usage

```bash
python scripts/analyst.py rich sample.exe
```

## Sources

- PE Format — https://learn.microsoft.com/windows/win32/debug/pe-format
- Rich header `DanS`/comp.id structure from public PE reverse-engineering research
- Toolchain-clustering use of the Rich header from public malware-clustering practice
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall