hunt-ldap
ما الذي تفعله
تفحص هذه المهارة ما إذا كان يمكن التلاعب بميزات تسجيل الدخول والبحث التي تستخدم أدلة LDAP أو XML عبر مدخلات مصمَّمة. وهي للاختبار المصرّح به لأنظمة تسجيل الدخول المعتمدة على الأدلة.
متى تستخدمها
- ✓عندما يستخدم نموذج تسجيل الدخول LDAP أو Active Directory للدخول.
- ✓عندما تستعلم ميزة البحث من دليل وقد لا تهرب الأحرف الخاصة.
- ✓عندما يستخدم التطبيق مخزن بيانات XML للمصادقة.
رابط المهارة
https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-ldap/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“تسجيل الدخول لدينا يستخدم LDAP. هل يمكنك التحقق مما إذا كانت الأحرف الخاصة تتجاوزه في اختبارنا المصرّح به؟”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يرسل الوكيل أحرفًا خاصة ومدخلات منظمة، ثم يقارن الاستجابات ليرى هل تغيّر منطق البحث. ويبلغ عن التجاوزات المؤكدة أو تسريبات البيانات.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من 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,=+`
الأسئلة الشائعة
أي الأحرف مهمة؟
تذكر المهارة أحرف LDAP الخاصة، مثل النجمة والأقواس والشرطة المائلة الخلفية.
هل تعمل على Active Directory؟
نعم، لكن المهارة تحذّر من أن Active Directory وLDAP العام يتصرفان بشكل مختلف، ويجب اختبارهما بشكل منفصل.
هل حقن LDAP شائع في التقارير العامة؟
تقول المهارة إنه نادرًا ما يُنشر علنًا، لذلك تعتمد على أدلة الاختبار المعيارية.
التفاصيل
الوصف الأصلي من المؤلف
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.
الشعبية
- نجوم GitHub
- 5.4k
- الترتيب
- #14918
- الترخيص
- MIT
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
apk-redteam-pipeline
5.4kيساعد وكيلك على اختبار تطبيق Android بحثًا عن نقاط ضعف أمنية، من العثور على ملف APK وفك تجميعه إلى فحص الأسرار المكشوفة.
bugcrowd-reporting
5.4kيساعد وكيلك على كتابة تقارير ثغرات أفضل لمنصة Bugcrowd، باختيار الفئة الصحيحة والرد على اعتراضات خارج النطاق.
cloud-iam-deep
5.4kيساعد وكيلك على فحص ما يمكن أن تصل إليه بيانات اعتماد سحابية وُجدت على AWS أو Azure أو Google Cloud، أثناء اختبار أمني مصرّح به.
enterprise-vpn-attack
5.4kيساعد وكيلك على فحص أجهزة VPN والوصول عن بُعد من Cisco وFortinet وCitrix وغيرها بحثًا عن نقاط ضعف معروفة، أثناء اختبار مصرّح به.
مهارات مشابهة
reverse-engineer-anything
422kيساعد وكيلك على فحص التطبيقات والحزم المنشورة من الداخل ليشرح الميزات ويقارن الإصدارات ويرشد إلى إعادة البناء، باستخدام أداة REA.
1password
394kيساعد وكيلك على إعداد واجهة سطر أوامر 1Password وتسجيل الدخول، وقراءة الأسرار أو حقنها دون طباعة قيمها في المحادثة.
healthcheck
394kيساعد وكيلك على تدقيق جهاز OpenClaw أو خادمه أمنيًا، مثل SSH والجدار الناري والتحديثات، ويقترح إصلاحات آمنة قابلة للتراجع.