hunt-ldap

Detects and exploits LDAP and XPath injection flaws in authentication and directory search endpoints.

1|Updated Aug 21, 2026
One-click install
npx skills add https://github.com/marcboggs/BMAD-AppSec-Orchestrator --skill hunt-ldap-marcboggs
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: hunt-ldap
Source: https://github.com/marcboggs/BMAD-AppSec-Orchestrator/tree/main/.claude/skills/hunt-ldap
Command: npx skills add https://github.com/marcboggs/BMAD-AppSec-Orchestrator --skill hunt-ldap-marcboggs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Security testers need a rigorous, false-positive-resistant methodology for finding LDAP and XPath injection vulnerabilities in login forms, SSO portals, and directory search APIs, where naive payload spraying produces syntax errors and unreliable results. ## Core Features & Use Cases - LDAP Injection Testing: Confirms injectable backends via unbalanced-parenthesis probes, then executes auth-bypass payloads with correct parenthesis balancing per RFC 4515 filter grammar. - Blind Attribute Exfiltration: Extracts attribute values char-by-char using paired true/false control oracles instead of noisy raw byte-count diffing, with repeat-validation guards against length jitter. - AD vs Generic LDAP Discipline: Distinguishes Active Directory (write-only unicodePwd, enumeration-focused) from OpenLDAP/389-DS (readable userPassword hashes), preventing incorrect claims in reports. - XPath Injection: Covers XML-backed auth bypass with balanced quote/bracket payloads, since XPath has no comment syntax. - Use Case: During a bug bounty engagement against a corporate SSO login, use this methodology to confirm an LDAP backend, bypass authentication with an always-true filter, and enumerate sAMAccountName and memberOf attributes to identify privileged accounts. ## Quick Start Test the target login endpoint for LDAP injection by sending an unbalanced parenthesis probe and comparing the response against a captured baseline.

Frequently Asked Questions about hunt-ldap

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

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

Send a single unbalanced parenthesis in the username field and compare the response to a captured baseline. A filter-syntax error or 500 on the unbalanced input but not on balanced input indicates the input reaches an LDAP filter unescaped.

How does blind LDAP injection exfiltrate attribute values?▼

Blind exfiltration uses a boolean oracle: pair a known-true filter with a known-false filter to establish response classes, then test each character position with a wildcard suffix. Repeat each positive character three times and re-verify the false control to rule out length jitter.

Can LDAP injection extract Active Directory password hashes?▼

No. Active Directory stores passwords in unicodePwd, which is write-only and never returned by searches. Against AD the win is enumeration of sAMAccountName, memberOf, and description fields; hash exfiltration via userPassword only works on non-AD directories like OpenLDAP or 389-DS.

What is the difference between search-filter injection and DN injection?▼

Search-filter injection places input inside an (attr=VALUE) filter where * ( ) & | ! are meaningful. DN injection places input inside a Distinguished Name where , = + " \ < > ; and / matter and * is not a wildcard. Payloads do not transfer between the two contexts.

Why does my LDAP auth bypass payload return a syntax error?▼

The resulting full filter has unbalanced parentheses. Count opening minus closing parentheses in the final concatenated filter, including whatever the application appends after your input, and adjust trailing parentheses so the complete string is balanced.

How is XPath injection different from SQL injection?▼

XPath has no comment syntax, so you cannot truncate the rest of the query with --. Payloads must keep quotes and brackets balanced, using expressions like ' or '1'='1 or node-dumping constructs like x'] | //user/* | //user[name()='x.