Skip to main content

NTLM Authentication

Status: Scaffold — content in progress

NTLM (NT LAN Manager) is a legacy challenge-response authentication protocol used by Windows. Despite being superseded by Kerberos, NTLM remains active in most environments because it is used as a fallback when Kerberos fails, and for local accounts and workgroup scenarios.

Protocol Flow

Client Server
│── NEGOTIATE_MESSAGE ────────>│
│<─ CHALLENGE_MESSAGE ─────────│ (8-byte random challenge)
│── AUTHENTICATE_MESSAGE ─────>│ (hash of password applied to challenge)

The server either validates the response locally (local account) or forwards it to a DC for validation (domain account).

NTLMv1 vs NTLMv2

NTLMv1NTLMv2
ChallengeServer 8-byte challenge onlyServer + client challenge
HashDES-based, weakHMAC-MD5 over full challenge + timestamp
CrackabilityVery easyHard but possible
Default sinceNTWindows Vista / Server 2008

NTLMv1 should never be enabled. Its hashes can be cracked in seconds or directly exploited.

Key Attack Primitives

AttackHowRequirement
Pass-the-HashAuthenticate using just the NTLM hash — no plaintext neededHave the target user's NT hash
NTLM RelayCapture and forward NTLM auth to a different targetNo signing, or signing not enforced
Credential capturePoison LLMNR/NBT-NS responses to make clients authenticate to attackerResponder on same network segment
Offline crackingCapture Net-NTLMv2 hash, crack offlineHashcat with wordlist

Why NTLM Persists

  • IP address authentication (Kerberos requires hostname)
  • Local account authentication
  • Non-domain-joined machines
  • Legacy applications hardcoded to NTLM
  • Cross-forest scenarios without trust

Hardening

  • Disable NTLMv1 and LM via GPO (Network security: LAN Manager authentication level → NTLMv2 only)
  • Enable SMB signing (breaks relay attacks)
  • Restrict NTLM for specific servers only (not global block — can break things)
  • Audit NTLM authentication: Event 4776 on DCs

Telemetry

Event IDLocationDescription
4776DCNTLM authentication attempt (success/fail + source)
4624 / 4625Target machineLogon success/fail (check LogonType 3 + NTLM)
TopicLink
Pass-the-Hashpass-the-hash
AD Overviewad-overview