Skip to content

meltedinhex/analyst-ai-pack / skills/analyzing-authenticode-signatures

analyzing-authenticode-signatures

Verified

Analyzes Windows Authenticode signatures on PE files: checking for a signature, reading the signer certificate chain, detecting revoked/expired/stolen certs, and recognizing signature-stripping and catalog-signing abuse. Activates for requests to analyze a code signature, verify Authenticode, or assess signer trust on a PE.

FileKindSize
LICENSEother340 B
SKILL.mdskill md3.2 KB
references/api-reference.mdmarkdown1.2 KB
scripts/analyst.pyscript2.3 KB

references/api-reference.md

View on GitHub
# API Reference: Analyzing Authenticode Signatures

## Overview

`scripts/analyst.py` parses the PE security data directory (index 4) to detect an embedded PKCS#7
Authenticode signature (WIN_CERTIFICATE), reporting presence, size, revision, and type. It is a
dependency-free presence check; cryptographic verification requires OS tooling. It parses bytes
statically and never executes the sample.

## Dependencies

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

## External tools

| Tool | Purpose |
|------|---------|
| signtool / Get-AuthenticodeSignature | Cryptographically verify the signature and revocation |

## Core functions

### `check(path)`
Returns whether an embedded signature exists and the WIN_CERTIFICATE header fields.

## Usage

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

## Sources

- Windows Authenticode PE signature format —
  https://learn.microsoft.com/windows-hardware/drivers/install/authenticode
- PE/COFF security data directory (index 4, file-offset semantics) —
  https://learn.microsoft.com/windows/win32/debug/pe-format
- Stolen/abused signing certificates (T1553.002), MITRE ATT&CK
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