Skip to content
Back to skills

Api Injection

ASecurity

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.

  • 16 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 17, 2026
securitypythonrustjavaphpshellsqlapibackend

Works with

  • api
  • mcp

Security analysis

A100/100

Scanned November 17, 2026

npx -y skills add AnandJogawade/Zazy-Pentest-Plugin-for-Claude --skill api-injection --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Injection?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Api Injection
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anandjogawade-api-injection/badge)](https://www.skillsdirectory.com/skills/anandjogawade-api-injection)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.