hunt-ldap-injection

Validates LDAP filter and attribute boundaries in authentication and directory search interfaces.

10|3|Updated Aug 10, 2026
One-click install
npx skills add https://github.com/baiqigo/baiqi-redteam-lab --skill hunt-ldap-injection-baiqigo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hunt-ldap-injection
Source: https://github.com/baiqigo/baiqi-redteam-lab/tree/main/.agents/skills/hunt-ldap-injection
Command: npx skills add https://github.com/baiqigo/baiqi-redteam-lab --skill hunt-ldap-injection-baiqigo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Security testers need a disciplined, evidence-gated method to verify whether login forms, user search, group lookup, or directory sync interfaces properly escape LDAP filter metacharacters, without enumerating real directories or dumping user data. ## Core Features & Use Cases - Trigger Signal Detection: Recognizes ldap_query_input, directory_search, ldap_error, ad_login, group_lookup, and user_search_filter signals to route testing. - Baseline-Controlled Probing: Uses positive/negative control objects and single-variable probes on filter metacharacters, escaping, and parenthesis structure. - Strict Oracle and Stop Rules: Distinguishes real filter-boundary bypasses from false positives like 400/500 errors or ambiguous latency, and halts when real employee data or out-of-scope servers appear. - Use Case: During an authorized assessment of an AD login portal, use this Skill to test whether the authentication filter escapes special characters, confirming a bypass only when extra owned test objects are matched reproducibly. ## Quick Start Ask the agent to run the LDAP injection specialist against the authorized test directory login form using only the owned test accounts and baseline controls.

Frequently Asked Questions about hunt-ldap-injection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test for LDAP injection in a login form?

Establish positive and negative control objects in an owned test directory, then change one filter metacharacter, escape form, or parenthesis structure per probe. A valid finding requires the filter logic boundary to be bypassed reproducibly, matching extra owned objects or altering authentication semantics.

What signals indicate an input reaches an LDAP query?

Look for ldap_query_input, directory_search, ldap_error, ad_login, group_lookup, and user_search_filter signals. These suggest the input flows into an LDAP filter or directory search path worth validating.

Does this skill enumerate or dump real directory users?

No. It explicitly forbids enumerating real directories or dumping users, and stops immediately if results contain real employee or customer data. Testing is limited to owned test objects in an isolated tenant.

Why are LDAP errors not treated as proof of injection?

400/500 responses, framework errors, ambiguous latency, and legitimate multi-attribute searches are classified as inconclusive, not vulnerabilities. Only a reproducible filter-boundary bypass affecting owned test objects counts as valid evidence.

When should LDAP injection testing stop during an assessment?

Stop when directory objects cannot be isolated, results include real users, enumeration or export would be required, or the directory server crosses the authorized scope. Authentication-impact findings route to auth-bypass and SSO issues to SAML specialists.