secret-extraction

secret-extraction is a skill for Claude Code, Codex from ogrodev/fsociety. It costs 548 tokens per session (3,177 once invoked), scanned C, original, MIT.

A security-analysis guide for extracting secrets such as passwords, API keys, certificates, and encryption keys from compiled programs. It covers identifying a binary, hashing it, extracting strings, and matching suspicious patterns.

In plain words
What is it for?
Use it to analyze binaries for hardcoded credentials, cryptographic material, certificates, configuration secrets, and other sensitive data.
Why use it?
Compilation does not reliably hide credentials embedded in a program. Finding them can reveal access to cloud services, databases, or encrypted communications.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside the plugin that ships it — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ogrodev/fsociety/secret-extraction
Any agent
npx skills add ogrodev/fsociety --skill secret-extraction
Clone the repo
git clone --depth 1 https://github.com/ogrodev/fsociety

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for secret-extraction

README.md
[![agentmods](https://agentmods.dev/badge/skills/ogrodev/fsociety/secret-extraction.svg)](https://agentmods.dev/skills/ogrodev/fsociety/secret-extraction)
Your own site
<a href="https://agentmods.dev/skills/ogrodev/fsociety/secret-extraction"><img src="https://agentmods.dev/badge/skills/ogrodev/fsociety/secret-extraction.svg" alt="Measured on agentmods" height="20"></a>
Per session 548 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,177 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00548 $0.03177
Opus 5 $0.00274 $0.01588
Sonnet 5 $0.00110 $0.00635
Haiku 4.5 $0.00055 $0.00318

Measured 4d ago against content hash 959605970cbc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

secret-extraction scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Harvests environment variableshighData exfiltration

Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.

This skill activates when the user mentions "extract secrets", "find credentials",
romero/skills/secret-extraction/SKILL.md · 303 lines

How it starts

The opening of the file, as written. The whole thing — 303 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Secret & Credential Extraction

Extract hardcoded credentials, API keys, cryptographic material, certificates, configuration secrets, and sensitive data from compiled binaries. This skill covers the full pipeline: string extraction, pattern matching, entropy analysis, crypto identification, format-specific extraction, and anti-analysis bypass.

Why This Matters

Hardcoded secrets in binaries are among the highest-impact findings in both penetration testing and malware analysis. A single embedded AWS key grants cloud access. A hardcoded database password opens the entire backend. An extracted C2 encryption key lets you decrypt all traffic. Developers embed secrets assuming compilation hides them -- it does not.

Methodology Overview

Execute these phases in order. Each phase feeds the next.

Phase 1 — Triage and Hash

Before touching strings, identify what you have. File type determines extraction strategy.

file <binary>
sha256sum <binary>
node ${CLAUDE_PLUGIN_ROOT}/scripts/binary-hasher.js hash <binary>

Record the hash. Check if this binary was already analyzed:

node ${CLAUDE_PLUGIN_ROOT}/scripts/analysis-tracker.js check <sha256> string-extraction

Phase 2 — Static String Extraction

Extract all readable strings. Start broad, then filter.

# ASCII strings, 6+ chars (reduces noise vs default 4)
strings -a -n 6 <binary> > strings_ascii.txt

# UTF-16 LE (Windows wchar_t, most common for Windows binaries)
strings -a -n 6 -el <binary> > strings_utf16.txt

# Combine and deduplicate
cat strings_ascii.txt strings_utf16.txt | sort -u > strings_all.txt

Count and triage:

wc -l strings_all.txt
# < 500 lines: review manually
# 500-5000: filter with patterns below
# > 5000: use targeted extraction only

Phase 3 — Obfuscated String Recovery

FLOSS recovers strings that strings cannot see: stack-built strings, tight loops, and runtime-decoded strings. This is where the real secrets hide.

# Full analysis (slow but thorough)
floss <binary>

# Stack strings only (fast, catches char-by-char construction)
floss --only stack <binary>

# Decoded strings (emulation-based, slowest, highest value)
floss --only decoded <binary>

# JSON output for automated processing
floss -j <binary> > floss_output.json

Read the full file on GitHub · 303 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 303 lines · 548 tokens per session scan C 959605970cbc

Subscribe to this mod's changes

secret-extraction is a skill published in the GitHub repository ogrodev/fsociety (20 stars, last pushed 5mo ago), licensed MIT. It adds 548 tokens to every session and 3,177 once invoked, about $0.0027 per session on Opus 5. A static security scan graded it C with 1 finding (harvests environment variables). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

setup-timescaledb-hypertables

Use this skill when creating database schemas or tables for Timescale, TimescaleDB, TigerData, or Tiger Cloud, especially for time-series, IoT, metrics, events, or log data. Use this to improve the performance of any insert-heavy table. Trigger when user asks to: Create or design SQL schemas/tables AND…

timescale/pg-aiguide · 219 tokens

addin-operations

TIA Portal Add-In development in Visual Studio Code: creating Add-In C# projects, adding Add-In templates, compiling and debugging Add-Ins, converting Add-Ins from older TIA Portal versions and configuring Add-In project parameters.

Czarnak/totally-integrated-claude · 50 tokens

tia-doctor

Manual, read-only prerequisite probe for TIA Portal V21 and its modular Openness API, with optional Python TIA Scripting and TIA MCP checks.

Czarnak/totally-integrated-claude · 36 tokens

tia-multiuser

TIA Portal Multiuser Engineering operations. Use for managing server projects, local sessions, and multiuser commissioning workflows.

Czarnak/totally-integrated-claude · 27 tokens

tia-openness-roadmap

Entry point for TIA Portal engineering automation tasks. Routes to the requested or appropriate MCP, Python, C#, MAC Module Builder, diagnostic, or Add-In implementation. Pure review of already supplied/exported PLC code uses the standalone plc-code-analysis skill.

Czarnak/totally-integrated-claude · 56 tokens

tia-hmi-operations

C# Openness implementation of HMI engineering.

Czarnak/totally-integrated-claude · 16 tokens