Browse learn

NTLM Authentication

Learn how NTLM challenge-response authentication works, why Active Directory still uses it as a fallback, and which security risks require mitigation.

On this page

NTLM (NT LAN Manager) is a family of authentication protocols first developed by Microsoft to provide user and host authentication within Windows environments. Despite being considered legacy technology, NTLM continues to play a significant role in Active Directory (AD) infrastructures—often as an unseen fallback or legacy compatibility mode. For identity engineers and developers integrating LDAP and Windows authentication, understanding NTLM's mechanics, security implications, and transition path is critical as Microsoft moves toward deprecation.

Link to What is NTLM? (NT LAN Manager)What is NTLM? (NT LAN Manager)

NTLM is not a single protocol but a protocol family designed for authentication within Microsoft Windows networks. It evolved through multiple generations:

  • LAN Manager (LM): The original, now highly insecure predecessor, using outdated cryptography.
  • NTLMv1: An improvement over LM, but still fundamentally weak against modern attacks due to its use of unsalted hashes and DES encryption.
  • NTLMv2: Introduced stronger hashing and better challenge-response mechanisms, addressing certain cryptographic flaws but retaining core architectural limitations.

NTLM was developed to support authentication for resources and services (such as file shares and printers) in pre-Active Directory domains. It predates Kerberos, which became the default authentication protocol in Windows 2000 and later. Although NTLMv2 is substantially stronger than its predecessors, all NTLM variants suffer from inherent weaknesses and are preserved today primarily for backward compatibility.

Link to How the NTLM Challenge-Response Authentication WorksHow the NTLM Challenge-Response Authentication Works

The NTLM protocol uses a challenge-response sequence to authenticate users without sending their actual password over the network. The typical flow consists of the following steps:

  1. Initiation: The client requests access to a network resource and includes a username.
  2. Server Challenge: The server responds with a randomly generated challenge (nonce).
  3. Client Response: The client computes a response by encrypting the challenge with a hash derived from the user's password (the exact algorithm varies by LM/NTLMv1/NTLMv2) and sends this response back to the server.
  4. Verification: The server retrieves the stored password hash for the username, uses it to encrypt the same challenge, and verifies if its result matches the client's response.
  5. Result: If the values match, authentication is successful; otherwise, it fails.

Myth: NTLM transmits passwords on the wire. In reality, NTLM never sends the plaintext password. However, the challenge-response relies on password-derived hashes that, if intercepted or reused, can authenticate a user in subsequent sessions—an Achilles’ heel exploited by attackers (“pass-the-hash”).

Link to NTLM in Active Directory EnvironmentsNTLM in Active Directory Environments

Active Directory environments are designed to prefer Kerberos, but NTLM persists due to several scenarios:

  • Legacy Application Support: Applications or operating systems that do not support Kerberos will invoke NTLM.
  • Fallback Scenarios: When Kerberos cannot be used (e.g., due to missing or misconfigured SPNs, DNS issues, clock skew, or absence of a trust relationship), systems silently downgrade to NTLM.
  • Local Account Authentication: Authentication to local machine accounts—non-domain controllers—relies on NTLM since Kerberos is a domain-centric protocol.
  • Cross-Forest or Untrusted Domain Access: In cases where forests or domains do not have established trusts, or when AD trusts/configurations are misaligned, NTLM is often the only available method.

As a result, even organizations aiming for “Kerberos everywhere” will observe NTLM traffic in practice, especially during troubleshooting, legacy migrations, or in hybrid architectures.

Link to Security Weaknesses and Known VulnerabilitiesSecurity Weaknesses and Known Vulnerabilities

While NTLM was a step forward for its era, modern security analysis has exposed several critical weaknesses:

  • Relay Attacks: Since NTLM does not bind authentication to the initial connection or provide mutual authentication, attackers can intercept and relay authentication requests to another service (“NTLM relay”), effectively impersonating a user.
  • Pass-the-Hash (PTH): With access to password-derived hashes (e.g., via compromised endpoints or memory dumps), attackers can authenticate as users without ever learning their passwords.
  • Cryptographic Weaknesses: LM and NTLMv1 use obsolete algorithms (DES/MD4) susceptible to brute-force and collision attacks. Even NTLMv2, which uses improved cryptographic procedures, does not address the protocol’s architecture issues.
  • Replay Attacks: In certain network conditions, captured challenge-response pairs can be replayed to gain unauthorized access.

Misconception: NTLMv2 is secure.
NTLMv2 strengthens hash computation and expands the challenge construction, but cannot fix NTLM’s fundamental weaknesses—namely, the ability to reuse authentication material outside of its intended context.

Link to NTLM vs Kerberos: Authentication Protocols ComparedNTLM vs Kerberos: Authentication Protocols Compared

Kerberos is the default authentication protocol in modern Active Directory for good reason. Here’s how they differ:

AspectNTLMKerberos
Authentication ModelChallenge-responseTicket-based (trusted third-party)
Password Sent on WireNo (hash-based exchange)No (ticket-granting)
Mutual AuthenticationNo (client authenticates to server only)Yes (both parties validate each other)
Cryptographic AlgorithmsMD4/MD5, DES (weak); NTLMv2: HMAC-MD5Symmetric crypto (e.g., AES, RC4)
Network RequirementsMinimal (works with IP)Requires reliable domain connectivity, DNS, time sync
Support for SSOBasic, limited multi-hopFull single sign-on, delegated auth
Vulnerability ProfileRelay, pass-the-hash, replay attacksFar more resistant; not immune, but fundamentally stronger
Fallback AvailabilityUsed when Kerberos fails or unsupportedPrimary for domain logons

In practice, Kerberos is used for almost all domain-based authentication when configuration allows. NTLM is only used when Kerberos requirements are not met.

Link to Deprecation and Migration: The Road Away from NTLMDeprecation and Migration: The Road Away from NTLM

Microsoft has announced a phased deprecation and removal for NTLM:

  • Deprecation Timeline: The official deprecation process starts in 2025; full removal is targeted for after 2027 across all supported Windows versions.
  • Migration Guidance: Organizations are strongly encouraged to audit all NTLM dependencies—especially those buried in legacy applications, scripts, or network appliances—and plan transition to Kerberos-based authentication or other modern protocols.

The coexistence of both protocols does not mean NTLM is safe. The move to deprecate NTLM underscores the importance of identifying—and eradicating—its presence within the enterprise.

Link to Practical Guidance: Auditing, Restricting, and Eliminating NTLMPractical Guidance: Auditing, Restricting, and Eliminating NTLM

For developers and administrators, practical NTLM management involves:

  • Detection: Use Active Directory auditing tools and Windows event logs to identify NTLM authentication events and trace them back to specific applications, hosts, or users. Careful review is mandatory before any NTLM policy changes.
  • Restricting and Blocking: Windows Group Policy allows targeted restriction of NTLM (e.g., to only allow within specific domains or disable for servers and clients). Thorough testing is essential to prevent breaking critical services.
  • Phasing Out Use: Prioritize migration of applications and services to support Kerberos. Where NTLM cannot be eliminated immediately—such as on unmanaged endpoints or with certain embedded systems—monitor, segment, and minimize exposure to NTLM-enabled resources.

Impact on Directory-Integrated Applications:
NTLM may still be triggered via certain LDAP workflows, especially when authenticating with local credentials or when Kerberos is unavailable. Application developers should explicitly opt for Kerberos authentication where possible and be conscious of fallback scenarios.


By understanding NTLM’s protocol flow, security profile, and lingering presence in Active Directory, developers and engineers can anticipate authentication pitfalls, make informed architectural choices, and support secure, future-proof migration off legacy authentication protocols.

Link to SourcesSources