Back to skills
SKILL.md
Api Injection
ASecurityInjection through APIs — SQLi, NoSQL operator injection, command injection, LDAP, SSTI, and deserialization delivered via JSON body fields, XML, query/path params, and headers that APIs trust server-side. Tier 1. Use to test any API that puts request data into queries, commands, templates, or deserializers.
- 16 stars
- 0 votes
- 0 copies
- 1 view
- Added November 17, 2026
Works with
Security analysis
100/100npx -y skills add AnandJogawade/Zazy-Pentest-Plugin-for-Claude --skill api-injection --agent claude-codeAre you the author of Api Injection?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/anandjogawade-api-injection)---
name: api-injection
description: Injection through APIs — SQLi, NoSQL operator injection, command injection, LDAP, SSTI, and deserialization delivered via JSON body fields, XML, query/path params, and headers that APIs trust server-side. Tier 1. Use to test any API that puts request data into queries, commands, templates, or deserializers.
---
# API Injection (SQLi / NoSQLi / Command / SSTI via APIs)
APIs expose injection through JSON/XML bodies, params, and trusted headers. Enumerate every point, deliver the matching class payload. Points ref: `${CLAUDE_PLUGIN_ROOT}/payloads/INJECTION-POINTS.md`.
## Trigger phrases
`api injection, api sqli, nosql injection, operator injection, command injection api, json injection, header injection, ssti api, deserialization api`
## Method
1. **Enumerate injection points (INJECTION-POINTS.md)** — every JSON **value** and **key**, nested objects/arrays, type-confusion (string↔object), XML elements/attributes, query+path params, multipart fields/filenames, and **headers** APIs trust: `X-Forwarded-For`, `X-Forwarded-Host`, `X-Original-URL`, `User-Agent`, custom `X-*`, cookies.
2. **SQLi** — canary `'`/`"`, then UNION/boolean/error-based per `${CLAUDE_PLUGIN_ROOT}/payloads/sqli.md`; automate: `sqlmap -r req.txt --level 5 --risk 3` (point at the JSON/param). Time-based for blind.
3. **NoSQL operator injection (JSON)** —
```json
{"username":{"$ne":null},"password":{"$ne":null}} // auth bypass
{"username":"admin","password":{"$regex":"^a"}} // blind extraction
{"q":{"$gt":""}}
```
see `${CLAUDE_PLUGIN_ROOT}/payloads/nosql.md`.
4. **Command injection** — `; id`, `$(id)`, `` `id` ``, `| id`, `%0a id` in fields feeding shell/system calls (`${CLAUDE_PLUGIN_ROOT}/payloads/command-exec.md`).
5. **SSTI** — `${7*7}`, `{{7*7}}`, `#{7*7}` in values rendered into templates/emails (`${CLAUDE_PLUGIN_ROOT}/payloads/ssti.md`).
6. **Deserialization** — Java/.NET/PHP/Python pickle on `application/x-java-serialized-object` etc. (`${CLAUDE_PLUGIN_ROOT}/payloads/deserialization.md`); ysoserial gadget chains in lab.
7. **LDAP/XPath/XSLT** — `${CLAUDE_PLUGIN_ROOT}/payloads/ldap-xpath-xslt.md`.
8. **Content-type switch** — flip JSON→XML to unlock XXE where the JSON parser was safe (`api-content-type-confusion`, `api-soap-wsdl`).
## Bypass / evasion
JSON payloads often evade WAFs; add nesting, type confusion, encoding, comment insertion, keyword doubling. Header-based injection bypasses body-focused WAFs. See `${CLAUDE_PLUGIN_ROOT}/payloads/waf-bypass.md`.
## Modern / rare techniques
- **[RARE] NoSQL operator injection** — `$ne`/`$gt`/`$regex`/`$where` in JSON where strings are expected; reject-objects defense often missing.
- **[RARE] Second-order SQLi** — value stored now (username/filename) used in a later server-side query (`INJECTION-POINTS.md` §5).
- **[RARE] Header-sourced injection** — `X-Forwarded-For` → SQL log insert, `User-Agent` → SSTI in analytics, JNDI `${jndi:ldap://...}` in headers.
- **Blind everywhere** — time-based (`SLEEP`,`pg_sleep`,`WAITFOR`) + OAST (`api-oast-blind`).
## Escalation / chaining
SQLi → data dump/auth bypass/RCE; command injection/deserialization → RCE; SSTI → RCE; NoSQLi → auth bypass. Blind cases → `api-oast-blind`. Chain with `api-recon` for surface, `api-content-type-confusion` for parser pivots.
## Backend & tooling
Preferred Kali path (WSL+Kali / Kali-MCP / HexStrike): sqlmap/nosqlmap/tplmap/ysoserial, nuclei. Route through Burp, send PoCs to Repeater. See `zazy-orchestrator`.
## Verification (background, before reporting)
Confirm with a second method/payload or OAST callback (blind). For SQLi, extract a benign deterministic value (e.g., version) twice; reproduce before CONFIRMED. True positives only; use OAST before concluding negative on blind.
## Evidence
Request with payload + response/OAST proof (extracted data, command output, template eval, OOB hit), injection point named. Impact + remediation (parameterized queries, strict schema/type validation, safe-deser allow-lists, reject objects where strings expected).
Attribution
Related skills
View all in security →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.