Files
sif/modules/http/ldap-injection-error.yaml
TigahandGitHub f8f3b8cca6 feat(modules): add active web-vuln probe modules (#271)
* feat(modules): add active web-vuln probe modules

Add five active-probe modules to modules/http: ssti-reflected (arithmetic
eval proof), command-injection (id output, not payload echo), and error-based
xpath, nosql, and ldap injection. Each keys on a transformed response the
payload cannot produce by reflection, so a benign echo cannot trigger it.

* chore(modules): trim redundant module header comments

drop top-line comments that just restate the id/name fields already
present in the same file
2026-07-22 12:35:27 -07:00

53 lines
1.2 KiB
YAML

id: ldap-injection-error
info:
name: LDAP Injection (Error-Based)
author: sif
severity: high
description: Detects LDAP injection via LDAP filter and directory error messages
tags: [ldap, injection, directory, owasp-top10]
type: http
http:
method: GET
paths:
- "{{BaseURL}}/?user={{payload}}"
- "{{BaseURL}}/?username={{payload}}"
- "{{BaseURL}}/?uid={{payload}}"
- "{{BaseURL}}/?search={{payload}}"
- "{{BaseURL}}/?q={{payload}}"
- "{{BaseURL}}/?name={{payload}}"
payloads:
- "*"
- ")(cn=*"
- "*)(uid=*"
- "admin)(&"
- "*)(|(uid=*"
- "*()|"
threads: 10
matchers:
- type: regex
part: body
regex:
- "javax\\.naming\\.NameNotFoundException"
- "javax\\.naming\\.directory"
- "com\\.sun\\.jndi\\.ldap"
- "LDAPException"
- "Invalid DN syntax"
- "Bad search filter"
- "ldap_search"
- "supplied argument is not a valid ldap"
- "Protocol error occurred"
condition: or
extractors:
- type: regex
name: ldap_error
part: body
regex:
- "(LDAPException|javax\\.naming\\.[A-Za-z.]+|com\\.sun\\.jndi\\.ldap|Invalid DN syntax)"
group: 1