MR
Mayur Rathi
@sickn33
⭐ 47.3k GitHub stars

hunt-shadow-api

hunt-shadow-api is an code AI skill with a core value of Hunt shadow / zombie / undocumented API surface (OWASP API9 Improper Inventory Management). It helps developers solve real-world problems in the code domain, boosting efficiency, automating repetitive tasks, and optimizing workflows.

Hunt shadow / zombie / undocumented API surface (OWASP API9 Improper Inventory Management)

Last verified on: 2026-10-06

Quick Facts

Category code
Works With Claude
Source sickn33/antigravity-awesome-skills
Stars ⭐ 47.3k
Last Verified 2026-10-06
Risk Level Low
mkdir -p ./skills/hunt-shadow-api && curl -sfL https://raw.githubusercontent.com/sickn33/antigravity-awesome-skills/main/skills/hunt-shadow-api/SKILL.md -o ./skills/hunt-shadow-api/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

> **⚠️ AUTHORIZED USE ONLY**

> This skill is for educational purposes or authorized security assessments only.

> You must have explicit, written permission from the system owner before using this tool.

> Misuse of this tool is illegal and strictly prohibited.


> **Mandatory confirmation gate**

> Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:

> 1. Ask the user to state the exact target URL, IP, account, or resource.

> 2. Ask the user to confirm written authorization and the permitted scope.

> 3. Show the exact command(s) and explain their expected effect.

> 4. Wait for explicit confirmation in the current conversation.

>

> Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.


OWASP API9 — Improper Inventory Management (Shadow / Zombie APIs)


As an API evolves, old versions and internal/staging routes routinely stay reachable without

receiving the same security fixes as the current version — because nobody tracks that they

still exist. The bug is rarely in one endpoint; it's in the **delta** between what an old

version enforces and what the current version enforces on the same operation.


When to use


Trigger when:

- Versioned paths are visible (`/v1/`, `/v2/`, `/api/2023-01-01/`) or `Accept`/`X-API-Version`

headers are in play.

- A changelog, release notes, or deprecation notice references removed/old API behavior.

- A mobile APK/IPA (via `apk-redteam-pipeline` / `ios-redteam-pipeline`) hardcodes endpoints

that look like an older backend version than the current web app calls.

- Multiple OpenAPI/Swagger specs are discoverable, or `info.version` in one spec implies others

exist.


DO NOT use for single-version APIs with no version history — there's nothing to diff; go

straight to `hunt-api-misconfig` for direct exploitation of the one surface that exists.


---


Stage 1 — Enumerate the Full Version Surface


bash
# Path-based versioning
for v in v1 v2 v3 v4 beta alpha internal legacy old 2022-01-01 2023-01-01 2024-01-01; do
  curl -s -o /dev/null -w "%{http_code} /api/$v/\n" "https://$TARGET/api/$v/"
done

# Header-based versioning
curl -s -H "X-API-Version: 1" https://$TARGET/api/users
curl -s -H "Accept: application/vnd.company.v1+json" https://$TARGET/api/users

# Subdomain-based versioning
for sub in api api-v1 api-v2 apiv1 apiv2 legacy-api old-api internal-api staging-api; do
  curl -s -o /dev/null -w "%{http_code} $sub\n" "https://$sub.$TARGET/"
done

A `200`/`401`/`403` on an old version path (anything but `404`/connection-refused) means the

version is still live and worth carrying into Stage 3, even if it demands auth.


---


Stage 2 — Pull Every Reachable Spec, Not Just the Linked One


bash
for path in openapi.json swagger.json v1/swagger.json v2/swagger.json v3/api-docs \
            api-docs.json swagger/v1/swagger.json .well-known/openapi.json; do
  curl -s -o /dev/null -w "%{http_code} /$path\n" "https://$TARGET/$path"
done

# Wayback Machine — a DEPRECATED version's spec often stays indexed after the live link is removed
curl -s "http://web.archive.org/cdx/search/cdx?url=$TARGET/*swagger*&output=json&collapse=urlkey"
curl -s "http://web.archive.org/cdx/search/cdx?url=$TARGET/*openapi*&output=json&collapse=urlkey"

When more than one spec resolves (a current one and an archived/old one), diff the endpoint

inventories directly:

bash
jq -r '.paths | keys[]' v1-swagger.json | sort > /tmp/v1_paths.txt
jq -r '.paths | keys[]' v2-swagger.json | sort > /tmp/v2_paths.txt
comm -23 /tmp/v1_paths.txt /tmp/v2_paths.txt   # in v1 only — candidates for "still live but forgotten"

For every path in that diff, confirm it's still reachable against the v1 base URL. A route

documented only in the old spec that still returns something other than `404` is a zombie-

endpoint candidate — carry it into Stage 3.


---


Stage 3 — Behav

🎯 Best For

  • Technical writers
  • API documentation teams
  • Claude users
  • Software engineers
  • Development teams

💡 Use Cases

  • Generating JSDoc/TSDoc comments
  • Writing README files for new projects
  • Code quality improvement
  • Best practice enforcement

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply hunt-shadow-api to Your Work

    Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.

  4. 4

    Review and Refine

    Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.

❓ Frequently Asked Questions

Does it follow my documentation style?

Most documentation skills respect existing style. Provide a style guide or example in your prompt.

Is hunt-shadow-api compatible with Cursor and VS Code?

Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.

Do I need specific dependencies for hunt-shadow-api?

Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.

How do I install hunt-shadow-api?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/hunt-shadow-api/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Auto-generating without reviewing

AI documentation can contain inaccuracies. Always verify technical accuracy.

Skipping validation

Always test AI-generated code changes, even for simple refactors.

Missing dependency updates

Check if the skill requires updated dependencies or new packages.

🔗 Related Skills