Skip to content
Back to skills

Analyzing Rich Header And Compiler Artifacts

ASecurity

'Analyzes the PE Rich header and related compiler artifacts to fingerprint the build

  • 22 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 11, 2026
securitypythonbashapisecuritydocumentation

Works with

  • api

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned September 11, 2026

npx -y skills add meltedinhex/analyst-ai-pack --skill analyzing-rich-header-and-compiler-artifacts --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Analyzing Rich Header And Compiler Artifacts?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Analyzing Rich Header And Compiler Artifacts
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/meltedinhex-analyzing-rich-header-and-compiler-artifacts/badge)](https://www.skillsdirectory.com/skills/meltedinhex-analyzing-rich-header-and-compiler-artifacts)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: analyzing-rich-header-and-compiler-artifacts
description: '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.'
domain: cybersecurity
subdomain: malware-analysis
tags:
  - malware-analysis
  - pe
  - rich-header
  - toolchain
  - clustering
version: 1.0.0
author: analyst-ai-pack
license: Apache-2.0
mitre_attack:
  - T1027
  - T1587.001
  - T1036
d3fend:
  - D3-SDA
  - D3-FA
references:
  - 'PE Format — https://learn.microsoft.com/windows/win32/debug/pe-format'
  - 'Rich header structure (public reverse-engineering research) — https://learn.microsoft.com/windows/win32/debug/pe-format'
---

# Analyzing Rich Header and Compiler Artifacts

## When to Use

- You have a Windows PE and want to fingerprint its build toolchain (compiler/linker product IDs
  and build numbers) from the Rich header.
- You are clustering samples by toolchain or detecting Rich-header tampering/forgery.

**Do not use** the Rich header as definitive attribution — it can be copied or stripped. This skill
reads the PE statically and executes nothing.

## Prerequisites

- The PE sample (read inertly).

## Safety & Handling

- Read bytes statically; treat the sample as malicious data.

## Workflow

### Step 1: Parse and decode the Rich header

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

Locates the `Rich` marker, recovers the XOR key (the DWORD after `Rich`), decodes the `DanS`-
prefixed entries, and lists `(product_id, build_id, use_count)` tuples.

### Step 2: Fingerprint the toolchain

Map product IDs to compiler/linker products and build numbers to identify the Visual Studio
version(s) used.

### Step 3: Compute a clustering hash

Hash the decoded Rich entries to produce a toolchain fingerprint for grouping related samples.

### Step 4: Check for inconsistencies

Compare the Rich-derived linker version against the PE optional-header linker version; mismatches
suggest tampering or a copied header.

## Validation

- The XOR key correctly decodes the `DanS` signature at the start of the block.
- Decoded entries have plausible product IDs and use counts.
- The toolchain fingerprint is reproducible across identical builds.

## Pitfalls

- Samples with no Rich header (non-MSVC toolchains, stripped headers).
- Forged Rich headers copied from a benign binary.
- Confusing the Rich checksum/key handling and misdecoding entries.

## References

- See [`references/api-reference.md`](references/api-reference.md) for the parser.
- PE format documentation (linked in frontmatter).

Files in this skill

  • LICENSE340 B
  • SKILL.md2.7 KB
  • references/api-reference.md1.2 KB
  • scripts/analyst.py2.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.