hunt-ldap
O que ela faz
Esta skill verifica se recursos de login e de busca que usam diretórios LDAP ou XML podem ser manipulados por entradas elaboradas. Ela é para testes autorizados de sistemas de entrada baseados em diretórios.
Quando usar
- ✓Quando um formulário de login usa LDAP ou Active Directory para entrar.
- ✓Quando um recurso de busca consulta um diretório e pode não escapar caracteres especiais.
- ✓Quando um app usa um armazenamento de dados XML para autenticação.
Link da skill
https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-ldap/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Nosso login usa LDAP. Você pode verificar se caracteres especiais conseguem contornar o login, no nosso teste autorizado?”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
O agente envia caracteres especiais e entradas estruturadas e compara as respostas para ver se a lógica de busca mudou. Ele informa contornos ou vazamentos de dados confirmados.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
HUNT-LDAP — LDAP Injection & XPath Injection
Grounding note: LDAP injection is rarely disclosed with verbatim payloads on public platforms (most live on internal-pentest reports). This skill is grounded in the OWASP LDAP Injection Prevention / Testing Guide (WSTG-INPV-06), PortSwigger Web Security Academy (LDAP injection), and the RFC 4515 filter grammar — all publicly verifiable references rather than invented HackerOne IDs. Do not cite a report you cannot link.
Crown Jewel Targets
LDAP injection that bypasses authentication = Critical. Blind attribute exfiltration of credentials/secrets = High. AD enumeration alone = Medium-High.
Highest-value chains:
- LDAP auth bypass — close the
uidfilter and append an always-true OR so the bind/search returns the admin entry without a valid password. - Blind attribute exfil — char-by-char extraction of an attribute value via a boolean oracle (login success/failure, result count, or response length).
- userPassword hash exfil (non-AD only) — on OpenLDAP/389-DS the
userPasswordattribute can hold{SSHA}/{CRYPT}hashes that ARE readable by query. See the AD-vs-generic warning below. - XPath injection auth bypass —
' or '1'='1against XML-backed auth.
CRITICAL — Active Directory vs generic LDAP
Do not conflate the two. They behave very differently:
| Generic LDAP (OpenLDAP, 389-DS, ApacheDS) | Active Directory | |
|---|---|---|
| Password attribute | userPassword — may hold {SSHA}/{MD5}/{CRYPT} and is readable if ACL allows |
unicodePwd — write-only, never returned by any search |
| Hash exfil via injection | Possible where ACLs leak userPassword |
Not possible — there is no readable hash attribute over LDAP |
| Useful enum attrs | uid, cn, mail, userPassword |
sAMAccountName, userPrincipalName, mail, memberOf, description (often holds plaintext secrets!) |
Do not tell a reader that blind LDAP injection yields AD password hashes — it
does not. unicodePwd is write-only. Against AD, the win is enumeration
(sAMAccountName, memberOf, description/info fields that admins misuse to
store passwords) and auth bypass — not hash dumping. The hash-exfil technique
applies only to non-AD directories exposing userPassword.
Attack Surface Signals
Corporate SSO / intranet login pages (often legacy Java/Spring/PHP)
Windows + IIS + "integrated" directory auth
/api/ldap/* /api/directory/* /people /address-book /search?dir=
"Find a colleague" / org-chart / employee-search features
XML-backed config or auth → XPath injection candidate
Error strings that confirm an LDAP backend:
javax.naming.NameNotFoundException
javax.naming.directory.InvalidSearchFilterException
LDAP: error code 49 - 80090308 (AD invalid creds / bind failure)
com.sun.jndi.ldap.* / System.DirectoryServices / ldap_search():
"Bad search filter" / net.ldap (Go) / python-ldap SERVER_DOWN
LDAP filter grammar (RFC 4515) — why injection works
A login filter is typically built by string-concat:
(&(uid=<USERNAME>)(userPassword=<PASSWORD>))
& = AND, | = OR, ! = NOT. Filters are prefix/Polish notation — the
operator comes first and every sub-filter is parenthesised. To inject you must
(a) escape the current (uid=...) group, (b) inject your own logic, and
(c) leave the overall parenthesis count balanced or the server throws a
filter-syntax error instead of executing.
The special-character set — TEST EACH ONE
These characters are syntactically meaningful and MUST be escaped by a safe app (RFC 4515 §3). If the app reflects an error or behaves differently when you send them raw, the input is unescaped → injectable:
| Char | Filter escape | Why it matters |
|---|---|---|
* |
\2a |
wildcard — matches any value |
( |
\28 |
opens a filter group |
) |
\29 |
closes a filter group |
\ |
\5c |
escape char itself |
| NUL | \00 |
string terminator — truncates filter in C-backed servers |
/ |
(DN context) | RDN separator — relevant for DN injection |
Search-filter context vs DN injection are different bugs:
- Search-filter injection (most common): your input lands inside a
(attr=VALUE)filter. Payloads use* ( ) & | !. - DN injection: your input is concatenated into a Distinguished Name
(
uid=VALUE,ou=people,dc=corp). Here,=+`
Perguntas frequentes
Quais caracteres importam?
A skill lista caracteres especiais do LDAP, como asteriscos, parênteses e barras invertidas.
Funciona no Active Directory?
Sim, mas a skill alerta que o Active Directory e o LDAP genérico se comportam de forma diferente e devem ser testados separadamente.
A injeção de LDAP é comum em relatórios públicos?
A skill diz que ela raramente é divulgada publicamente, então se apoia em guias padrão de teste.
Detalhes
Descrição original do autor
Hunt LDAP Injection and XPath Injection — authentication bypass, blind char-by-char attribute exfiltration, AD user/group enumeration, XML-store XPath bypass. Covers the LDAP special-character set (* ( ) \\ NUL /), search-filter-context vs DN-injection, parenthesis-balancing, AND/OR filter logic, and {SSHA}/{CRYPT} userPassword exfil on non-AD directories. Use when target uses LDAP/AD authentication, corporate SSO with a directory backend, an address-book/people-search API, or XML-based data stores queried with XPath.
Popularidade
- Estrelas no GitHub
- 5,4 mil
- Posição no ranking
- #14918
- Licença
- MIT
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
apk-redteam-pipeline
5,4 milAjuda seu agente a testar um app Android em busca de falhas de segurança, desde encontrar o arquivo APK e descompilá-lo até verificar segredos expostos.
bugcrowd-reporting
5,4 milAjuda seu agente a escrever relatórios de vulnerabilidade melhores para o Bugcrowd, escolhendo a categoria certa e respondendo a alegações de fora de escopo.
cloud-iam-deep
5,4 milAjuda seu agente a verificar o que uma credencial de nuvem encontrada pode acessar na AWS, no Azure ou no Google Cloud, durante um teste de segurança autorizado.
enterprise-vpn-attack
5,4 milAjuda seu agente a verificar equipamentos de VPN e de acesso remoto da Cisco, Fortinet, Citrix e outros em busca de falhas conhecidas, durante um teste autorizado.
Skills parecidas
reverse-engineer-anything
422 milAjuda seu agente a analisar apps e pacotes já publicados para explicar recursos, comparar versões ou orientar uma reconstrução, usando a ferramenta REA.
1password
394 milAjuda seu agente a configurar a CLI do 1Password, fazer login e ler ou injetar segredos sem imprimir seus valores no chat.
healthcheck
394 milAjuda seu agente a auditar o computador ou servidor que roda o OpenClaw em busca de riscos como SSH, firewall, atualizações e backups, com correções seguras.