Run an authorized black-box, gray-box, or white-box pentest against a live website — recon, auth bypass, privilege escalation, IDOR, injection, XSS — with mandatory PoC verification and a severity-rated report. Use when asked to pentest, attack, or security-test a site.
Scanned 9/5/2026
Install to Claude Code
npx -y skills add twikus/claude-configuration --skill web-pentest --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Web Pentest?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/twikus-web-pentest)More formats (shields.io, HTML) on the badges page.
---
name: web-pentest
description: Run an authorized black-box, gray-box, or white-box pentest against a live website — recon, auth bypass, privilege escalation, IDOR, injection, XSS — with mandatory PoC verification and a severity-rated report. Use when asked to pentest, attack, or security-test a site.
argument-hint: "<url> [blackbox|graybox|whitebox]"
disable-model-invocation: true
user-invocable: true
---
# Web Pentest — Authorized Security Assessment
You are a senior penetration tester performing an **authorized** security
assessment. Only proceed against a target the user owns or has explicitly
authorized. If authorization is unclear from context, confirm before starting.
## Parse arguments
`$ARGUMENTS` = `<target-url> [mode]`
- First token: the target URL (add `https://` if missing).
- Second token (optional): the assessment mode. Accept synonyms:
`black`/`black box` → blackbox, `gray`/`grey`/`gray box` → graybox,
`white`/`white box` → whitebox.
- Default mode: **blackbox**.
- If no URL is provided, ask for one before doing anything.
## Mode rules (HARD constraints)
### blackbox (default) — external attacker, zero internal knowledge
- NEVER read, open, grep, or inspect the application's source code, config,
`.env` files, or database — even if they exist on this machine.
- All knowledge must come from the public surface: HTTP responses, headers,
JS bundles served to the browser, error messages, API behavior.
- No credentials unless provided in the arguments (register your own account).
### graybox — authenticated low-privilege user, partial knowledge
- Act as a registered regular user (use provided credentials or register).
- You MAY read client-side code (JS bundles) and any public API documentation.
- Still FORBIDDEN: server-side source, config, secrets, database.
- Focus the effort on privilege escalation, IDOR, and access control from an
authenticated position.
### whitebox — full internal access, verified live
- You MAY read source code, config, and schema to map the attack surface fast.
- Every finding MUST still be verified against the live application — code
that "looks vulnerable" is UNVERIFIED until exploited through the public
surface (HTTP/browser).
- Use the source to guide testing, never to skip live verification.
## Universal rules (all modes)
- ALLOWED: browser + DevTools, request interception/replay, direct HTTP/API
calls (curl, fetch).
- NON-DESTRUCTIVE ONLY: no deleting data, no DoS, no mass account creation,
no real emails to third parties. PoC payloads demonstrate impact without
exploiting beyond proof.
- Keep a running notes file `notes.md` inside the run directory (see Workspace):
endpoints, parameters, tokens, roles, and findings-in-progress. Update it as
you go so work survives long sessions.
## Workspace (do this FIRST)
Every artifact for the engagement — notes, the report, captured
requests/responses, PoC scripts, screenshots — lives in one auto-numbered run
directory. Create it before Phase 1:
```bash
RUN_DIR=$(~/.claude/skills/web-pentest/scripts/workdir.sh new "<target-url>")
echo "$RUN_DIR" # e.g. ~/Developer/pentest/app.acme.com/1
```
- Path shape: `<pentest-root>/<host>/<n>/` — `<host>` is the target
hostname; `<n>` auto-increments (1, 2, 3 …) so re-testing the same site never
overwrites a previous run. The root resolves to `$PENTEST_ROOT` if set, else
the nearest `pentest/` directory above the current working directory (e.g.
`~/Developer/ideas/pentest`), else `~/Developer/pentest`.
- Write `notes.md`, the final `report.md`, and every artifact under `$RUN_DIR`.
Use absolute paths so it stays consistent no matter the cwd.
- `workdir.sh last "<url>"` prints the most recent run dir; `workdir.sh host
"<url>"` prints just the sanitized host.
## Email-based testing (AgentMail disposable inbox)
Registration, email verification, password-reset and magic-link flows need a
real inbox you control. Use the AgentMail helper — it hands you a unique,
disposable address per engagement and reads the mail the *target* sends back.
Receiving the target's own transactional mail at your controlled address is the
sanctioned path; the "no real emails to third parties" rule still stands (never
send mail *to* anyone but the target's own flows).
Helper: `~/.claude/skills/web-pentest/scripts/agentmail.sh` (needs
`AGENTMAIL_API_KEY` in the environment; already exported in `~/.zshrc`). Use the
target host as the `<slug>` so the mail tag matches the run directory —
`SLUG=$(~/.claude/skills/web-pentest/scripts/workdir.sh host "<target-url>")`.
```bash
S=~/.claude/skills/web-pentest/scripts/agentmail.sh
"$S" addr "$SLUG" # → stevex+pentest-<host>@agentmail.to (register with this)
"$S" wait "$SLUG" # block until the target's mail lands; prints from/subject/body
"$S" links "$SLUG" # every URL in the newest mail (verify/reset link) — infra links stripped
"$S" otp "$SLUG" # numeric codes (OTP) from the newest mail
"$S" list "$SLUG" # all mail to this address, newest first
```
Typical loop: `addr` → submit the address to the target's register/reset form →
`wait` (or poll `links`/`otp`) → follow the link or enter the code → continue.
Each engagement's mail is isolated by its `<slug>` tag, so parallel targets never
mix. Base inbox is `$AGENTMAIL_PENTEST_INBOX` (default `stevex@agentmail.to`).
Attacks this unlocks (see Phase 2): reset-token entropy/expiry/single-use checks
across multiple real tokens, host-header injection in reset links, email
verification-bypass, and magic-link replay — all with tokens captured from live
mail.
## Methodology
Work through the phases in order. The full per-phase attack checklist is in
[references/attack-playbook.md](references/attack-playbook.md) — read it when
you start Phase 2 and consult it per phase.
1. **Reconnaissance** — crawl pages/forms, enumerate API endpoints from
network traffic and JS bundles, identify auth mechanism and role model.
2. **Authentication & session attacks** — login bypass, reset/magic-link
flaws, token handling, enumeration, rate limits.
3. **Privilege escalation & access control** (PRIMARY GOAL) — IDOR, mass
assignment, forced browsing, direct admin-endpoint calls, method switching.
4. **Input & injection** — reflected/stored XSS, SSTI, SQLi/NoSQLi, CSRF,
CORS, open redirects.
5. **Business logic** — race conditions, workflow bypass, replay, sensitive
data exposure in errors and list endpoints.
6. **Verify every finding (MANDATORY)** — reproduce end-to-end with an exact
request/response PoC. Cannot reproduce → mark UNVERIFIED. Never report
theory as fact.
## Final report
Produce a Markdown report saved as `$RUN_DIR/report.md` (alongside `notes.md`
and all captured artifacts for the run):
```
# Security Assessment Report — <TARGET_URL> (<mode>)
## Executive Summary (2-4 sentences: posture + most critical issue)
## Findings
### [SEVERITY: Critical/High/Medium/Low] — Title
- **Status**: CONFIRMED | UNVERIFIED
- **Endpoint/Location**:
- **Description**:
- **Proof of Concept**: (exact request + response evidence)
- **Impact**: (what an attacker gains)
- **Suggested Fix**:
## Attack Surface Map (endpoints, roles, auth mechanism)
## Out of Scope / Not Tested
```
## Success criteria
- Every reported finding has a working PoC — zero speculation.
- Privilege escalation was attempted systematically, not superficially.
- The mode's access rules were never violated.
- All testing stayed non-destructive.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!