credential-hunter

credential-hunter is an agent for Claude Code from allsmog/blackbox-claude-plugin. It costs 134 tokens per session (1,772 once invoked), scanned E, original, MIT.

An agent for finding and extracting credentials such as passwords, environment variables, and database connection details from application files.

In plain words
What is it for?
It is for searching for `.env` files, database settings, connection strings, and other stored credentials, then recording what it finds.
Why use it?
It helps locate authentication information scattered across configuration files, environment files, and databases.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; names the TodoWrite tool.

Part of the blackbox-htb plugin — 17 skills, 11 commands, 9 agents shipped together

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 agents/allsmog/blackbox-claude-plugin/credential-hunter
Clone the repo
git clone --depth 1 https://github.com/allsmog/blackbox-claude-plugin

Made for: Claude Code.

Or install blackbox-htb, the plugin that ships this one along with the rest of its 17 skills, 11 commands, 9 agents.

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 credential-hunter

README.md
[![agentmods](https://agentmods.dev/badge/agents/allsmog/blackbox-claude-plugin/credential-hunter.svg)](https://agentmods.dev/agents/allsmog/blackbox-claude-plugin/credential-hunter)
Your own site
<a href="https://agentmods.dev/agents/allsmog/blackbox-claude-plugin/credential-hunter"><img src="https://agentmods.dev/badge/agents/allsmog/blackbox-claude-plugin/credential-hunter.svg" alt="Measured on agentmods" height="20"></a>
Per session 134 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,772 The whole file, excluding the scripts and references it only reads on demand.
Security scan E 3 findings. 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.1 $0.00134 $0.01772
Opus 5 $0.00067 $0.00886
Sonnet 5 $0.00027 $0.00354
Haiku 4.5 $0.00013 $0.00177

Measured 5d ago against content hash 008f22033cdd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade E, and why

credential-hunter scanned grade E with 3 findings 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 5d 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.

2. Extract all credentials found

Enumerates the file system for secretshighData exfiltration

Searching home directories for .env, .ssh, .aws or credential files is reconnaissance for credential theft.

find / -name ".env" -o -name ".env.*" -o -name "*.env" 2>/dev/null

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

cat /home/*/.bash_history | grep -E "mysql|ssh|curl.*-u|scp"
blackbox-htb/agents/credential-hunter.md · 248 lines

How it starts

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

Credential Hunter Agent

Purpose

Systematically discovers and extracts credentials from configuration files, environment files, databases, and other sources. Tracks multiple databases and tests credential reuse.

Behavior

On Invocation

  1. Scan for configuration files
  2. Extract all credentials found
  3. Identify multiple database connections
  4. Document findings in state file
  5. Suggest credential testing

Search Patterns

Environment Files
# Find all .env files
find / -name ".env" -o -name ".env.*" -o -name "*.env" 2>/dev/null

# Common locations
cat /var/www/*/.env
cat /var/www/html/*/.env
cat /opt/*/.env
cat /home/*/.env
cat /app/.env
Database Configurations
# PHP applications
find / -name "config.php" -o -name "database.php" -o -name "db.php" 2>/dev/null
grep -r "DB_PASSWORD\|DB_HOST\|mysql_connect\|mysqli_connect" /var/www/ 2>/dev/null

# Python applications
find / -name "settings.py" -o -name "config.py" 2>/dev/null
grep -r "DATABASE\|SQLALCHEMY" /var/www/ /opt/ 2>/dev/null

# Node.js applications
find / -name "*.json" -path "*/config/*" 2>/dev/null
grep -r "mongodb://\|mysql://\|postgres://" /var/www/ /opt/ 2>/dev/null
Application-Specific Configs
# WordPress
cat /var/www/*/wp-config.php

# Laravel
cat /var/www/*/.env
cat /var/www/*/config/database.php

# Cacti
cat /var/www/cacti/include/config.php
cat /usr/share/cacti/include/config.php

# Drupal
cat /var/www/*/sites/default/settings.php

Multi-Database Detection

Critical pattern from MonitorsFour: Applications often have secondary databases.

# Look for multiple DB configurations in same file
grep -E "DB_.*=" /var/www/*/.env | sort -u

# Example output showing secondary DB:
# DB_HOST=localhost
# DB_PASSWORD=primary_pass
# DB_DATABASE=app
# DB_HOST_SECONDARY=10.0.0.5      # Secondary DB!
# DB_PASSWORD_SECONDARY=other_pass
Secondary Database Indicators
  • Variables ending in _SECONDARY, _2, _BACKUP, _REPLICA
  • Multiple DB_HOST or DATABASE_URL entries
  • Comments mentioning "old", "backup", "secondary"
  • Different port numbers (3306 vs 3307)

Read the full file on GitHub · 248 lines

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. 5d ago First seen · 248 lines · 134 tokens per session scan E 008f22033cdd

Subscribe to this mod's changes

credential-hunter is an agent published in the GitHub repository allsmog/blackbox-claude-plugin (5 stars, last pushed 6mo ago), licensed MIT. It adds 134 tokens to every session and 1,772 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it E with 3 findings (harvests environment variables, enumerates the file system for secrets, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

csp-bypass-tester

Inspects Content Security Policy headers for policy weaknesses and tests bypass vectors including unsafe-inline, unsafe-eval, wildcard sources, JSONP endpoints, Angular sandbox escape, and open redirects in whitelisted domains. Uses Playwright for browser-based CSP inspection and script execution testing. Follows…

Stickman230/claude-pentest · 78 tokens

Pentester Orchestrator

Penetration-test PLANNER. Reads confirmed scope and recon results, then returns a structured deployment plan (which executors, against which surfaces, in what order, with time allocation and escalation directives). Does NOT deploy executors itself — the /pentest:pentest command (main session) owns dispatch…

Stickman230/claude-pentest · 75 tokens

domain-assessment

Performs comprehensive domain reconnaissance including passive and active subdomain discovery (subfinder, amass, certificate transparency), port scanning (nmap, masscan), and service enumeration. Builds attack surface inventory. Follows 4-phase workflow. Deployed by domain-assessment skill coordinator.

Stickman230/claude-pentest · 60 tokens

inventory-api-discovery

Discovers REST API endpoints, GraphQL schemas, SOAP/WSDL services, WebSocket connections, and API documentation (Swagger/OpenAPI/Postman). Enumerates versioned APIs (v1/v2/v3) and undocumented endpoints. Produces structured API endpoint inventory. Follows 4-phase workflow. Deployed by web-application-mapping skill…

Stickman230/claude-pentest · 76 tokens

inventory-directory-scanner

Runs active directory and file brute-forcing using ffuf, gobuster, feroxbuster, nikto, and dirsearch to discover directories, files, backup files, configuration files, admin panels, and hidden resources. Produces structured directory inventory. Follows 4-phase workflow. Deployed by web-application-mapping skill…

Stickman230/claude-pentest · 73 tokens

inventory-javascript-mapper

Discovers JavaScript-rendered pages, SPA client-side routes, dynamically-loaded scripts, AJAX-triggered endpoints, and hidden features invisible to standard scanners. Uses Playwright headless browser automation to execute JavaScript and extract framework route registries (React Router, Vue Router, Angular). Follows…

Stickman230/claude-pentest · 80 tokens