Fact-checked by Grok 2 weeks ago

NTLM

NTLM, or NT LAN Manager, is a suite of challenge-response authentication protocols developed by for use in Windows operating systems and networks, providing mechanisms for user and computer , message integrity, and session confidentiality without transmitting in clear text. It authenticates clients to servers by having the server issue a random , which the client encrypts using a of the user's , allowing verification against a or local account database. Originally introduced with , NTLM has evolved through multiple versions but remains a legacy protocol, with preferred for modern environments due to its stronger security features. The protocol family includes earlier variants like (LM) v1 and v2, which used weaker DES-based , and the more secure NTLM v1 and v2, with NTLMv2 incorporating enhanced hashing and to mitigate vulnerabilities such as pass-the-hash attacks. NTLM operates within the Security Support Provider Interface (SSPI) framework, implemented via the MSV1_0.dll library, and is invoked when applications request the "Negotiate" package, which falls back to NTLM if fails. It supports both local logons on standalone systems and network authentication in workgroups or domains, particularly for or non-Microsoft applications that do not support . Despite its widespread historical use, NTLM has known security weaknesses, including susceptibility to offline cracking and relay attacks, prompting to recommend auditing and restricting its usage through tools like NTLM audit policies and Extended Protection for Authentication. In recent developments, has deprecated NTLM, with NTLMv1 fully removed in version 24H2 and 2025, while NTLMv2 is no longer under active development but continues to function for . Administrators are encouraged to transition to or other modern protocols to enhance , with ongoing support for NTLM limited to essential scenarios.

Overview

Introduction

NTLM, or NT LAN Manager, is a suite of challenge-response authentication protocols developed by Microsoft for securing communications within Windows-based networks. It enables the authentication of users and computers without transmitting passwords directly over the network, instead relying on encrypted responses to server-generated challenges derived from password hashes. As a security package, NTLM provides core functions of authentication to verify identities, integrity to ensure data has not been tampered with, and confidentiality through optional session encryption. In ecosystems, NTLM plays a key role in facilitating secure access to resources, particularly in workgroup scenarios or on non-domain-joined systems where more modern protocols like may not apply. It is commonly integrated with protocols such as (SMB) for file sharing, (RPC) for distributed services, and HTTP for web-based authentication, allowing seamless verification in heterogeneous or legacy setups. This integration supports remote user logons and protects network communications in environments like local area networks. Originating as an enhancement to the earlier authentication system, NTLM has evolved into versions including NTLMv1 and NTLMv2 to address security limitations. As of November 2025, it is a deprecated legacy protocol, with NTLMv1 removed in version 24H2 and 2025, and NTLMv2 no longer under active development but functional for . Despite recommendations to minimize its use in favor of , NTLM continues to authenticate in specific legacy contexts.

History and Development

The NTLM authentication protocol originated from the (LM) authentication mechanism developed by in the late 1980s. , released in version 1.0 in 1987, was designed to provide network authentication for and OS/2-based systems using the (SMB) protocol over NetBEUI. This early protocol relied on weak challenge-response methods to secure and printer access in local area networks, but its design prioritized compatibility over robust security. Microsoft introduced NTLM with the release of in July 1993, positioning it as a significant upgrade to address the vulnerabilities in hashing, such as the use of a simplified -based encryption that limited passwords to 14 characters and upper-case only, making them susceptible to brute-force attacks. NTLM adopted stronger cryptographic elements, including the hashing algorithm for password storage and for key derivation in its challenge-response process, enabling better protection for and workgroup authentication in enterprise environments. These influences from and were chosen for their availability and performance on the hardware of the era, though they later contributed to ongoing security concerns. NTLM version 1 (NTLMv1) was introduced with and continued in subsequent versions. Optional support for NTLM version 2 (NTLMv2) was added in Service Pack 4 in 1998, incorporating enhanced session features while maintaining with earlier NT systems. To further bolster resistance against replay and offline attacks, NTLMv2 was introduced natively in in February 2000, replacing weaker operations with HMAC-MD5 for key generation and adding timestamping and elements. Microsoft's support for NTLM has evolved toward deprecation amid recommendations for more secure alternatives like Kerberos. Beginning in the early 2010s, Microsoft advised developers to avoid NTLM in new applications, citing its cryptographic weaknesses, and by 2018, official guidance urged the retirement of legacy variants like NTLMv1 through auditing and policy enforcement. Partial deprecation announcements continued into the 2020s, with tools introduced to block NTLM usage in Windows 7 and Server 2008 R2. In October 2023, Microsoft announced plans to deprecate all NTLM variants, followed by official deprecation in June 2024. As of November 2025, NTLMv1 is removed from Windows 11 version 24H2 and Windows Server 2025, while NTLMv2 remains available only for essential legacy compatibility but is no longer under active development.

Protocol Fundamentals

Message Types and Structure

The NTLM authentication protocol employs three primary message types exchanged between the client and server to establish a secure session: the Type 1 Negotiate message, the Type 2 Challenge message, and the Type 3 Authenticate message. These messages form the core of the protocol's handshake, with each type building upon the previous to negotiate capabilities and verify identity. The protocol specifies a binary format for all messages, using little-endian byte order for multi-byte values and supporting either OEM (ANSI) or Unicode (UTF-16LE) character encoding based on negotiation flags. All NTLM messages share a common fixed-length header consisting of an 8-byte ASCII signature "" followed by a 4-byte message type identifier. This header is immediately followed by variable-length sections, which include buffers for strings (such as and username) and other fields like flags and challenges. buffers are structured as 8-byte descriptors containing length, maximum length, and offset to the actual data, allowing flexible positioning of elements to optimize size and alignment. The may also include optional fields like version information if negotiated. The Type 1 Negotiate message (message type 0x00000001), sent from the client to the , initiates the process by advertising the client's supported features. Its includes a 4-byte NegotiateFlags field specifying options, followed by optional security buffers for the client's and workstation name (in OEM encoding by default). If the NTLMSSP_NEGOTIATE_VERSION flag is set, an 8-byte structure is appended, containing the protocol version, but this is typically zeroed otherwise. This message lacks any response data, focusing solely on capability negotiation. The Type 2 Challenge message (message type 0x00000002), sent from the to the client, responds to the negotiation by confirming supported features and providing a for . Its payload begins with an optional TargetName security buffer (8 bytes descriptor plus variable data) representing the 's realm, such as a or name, encoded in the negotiated character set. This is followed by the 4-byte NegotiateFlags, an 8-byte ServerChallenge (a random 64-bit generated by the to prevent replay attacks), an 8-byte Reserved field (set to zero), and an optional TargetInfo security buffer. The TargetInfo block contains a sequence of attribute-value (AV) pairs, each prefixed by a 2-byte type identifier and 2-byte length, terminated by an MsvAvEOL (type 0x00) entry; these pairs may include details like channel bindings or timestamps for enhanced security context. A Version structure may follow if negotiated. The Type 3 Authenticate message (message type 0x00000003), sent from the client to the server, completes the by supplying proof of identity in response to the . Its includes security buffers for the LM and NT challenge responses (each 8-byte descriptors plus 8- to 16-byte opaque response fields), domain name, username, and workstation name (encoded per ), followed by an optional SessionKey buffer (for if requested), the 4-byte NegotiateFlags, an optional TargetInfo buffer (echoing or extending the server's), and a Version structure if applicable. This message encapsulates the client's credentials indirectly through challenge-response mechanisms without transmitting passwords. Central to all messages are the NegotiateFlags, a 32-bit bitfield that dictates behavior, such as , features, and types. Key flags include NTLMSSP_NEGOTIATE_UNICODE (bit 0, 0x00000001), which requests UTF-16LE encoding for strings if set (mutually exclusive with NTLMSSP_NEGOTIATE_OEM, bit 1, 0x00000002); NTLMSSP_REQUEST_TARGET (bit 2, 0x00000004), requesting the 's target name; NTLMSSP_NEGOTIATE_SIGN (bit 4, 0x00000010) and NTLMSSP_NEGOTIATE_SEAL (bit 5, 0x00000020) for message signing and sealing; NTLMSSP_NEGOTIATE_KEY_EXCH (bit 26, 0x4000000), enabling explicit exchange in the Type 3 message; and NTLMSSP_NEGOTIATE_TARGET_INFO (bit 29, 0x20000000), indicating the presence of the TargetInfo block. Other flags specify types (e.g., NTLMSSP_TARGET_TYPE_DOMAIN, bit 22, 0x00400000) or request version negotiation (NTLMSSP_NEGOTIATE_VERSION, bit 30, 0x40000000). Unused or reserved bits must be zero. The flags in Type 2 reflect the intersection of client requests and server capabilities.
Flag NameBit PositionValueDescription
NTLMSSP_NEGOTIATE_UNICODE00x00000001If set, strings use (UTF-16LE); otherwise, OEM encoding.
NTLMSSP_REQUEST_TARGET20x00000004Requests the server to include a TargetName in the Type 2 message.
NTLMSSP_NEGOTIATE_SIGN40x00000010Requests message integrity via signing.
NTLMSSP_NEGOTIATE_SEAL50x00000020Requests message confidentiality via sealing.
NTLMSSP_NEGOTIATE_KEY_EXCH260x4000000Requests the client to provide an encrypted in Type 3.
NTLMSSP_NEGOTIATE_TARGET_INFO290x20000000Indicates the TargetInfo block is present and populated.
NTLMSSP_NEGOTIATE_VERSION300x40000000Requests inclusion of the structure for protocol identification.
This table highlights representative flags that influence message structure and encoding, establishing the protocol's flexibility without delving into cryptographic details.

Authentication Mechanism

The NTLM authentication mechanism follows a three-phase challenge-response exchange consisting of the Type 1 Negotiate message from the client, the Type 2 Challenge message from the server, and the Type 3 Authenticate message from the client. The client initiates the process by sending the Type 1 message, which specifies negotiation flags for supported protocol features, including preferences and capabilities, using the OEM character set by . The server then responds with the Type 2 message, which includes a random 8-byte (the challenge) and its supported flags, enabling the client to compute an appropriate response. Finally, the client transmits the Type 3 message containing the challenge responses, , username, and workstation details, allowing the server to validate the authentication attempt. At its core, the challenge-response principle ensures secure authentication without exposing the user's password in . The server generates and sends the nonce to uniquely identify the session and resist replay attacks, while the client proves possession of the password by computing a response value based on the nonce and a function of the password-derived secret. The server independently computes the expected response using its copy of the user's credentials and compares it to the client's submission; a match confirms authenticity. This approach embeds NTLM messages within the packets of an underlying application protocol, such as or HTTP, for transport. Following successful , both parties derive a shared from the password-based secret and elements exchanged during , including the challenge nonce. This key enables optional session security features, such as message signing for and (sealing) for in follow-on communications. Negotiation flags in the Type 1 and Type 2 messages dictate the for all string fields across the exchange; mutual support for the flag results in UTF-16 little-endian encoding, enhancing , whereas absence of this flag defaults to the OEM character set. The OEM fallback assumes an agreement on the specific between client and server to ensure compatibility. Error handling in NTLM negotiation primarily involves fallback mechanisms for mismatched flags, with the protocol defaulting to conservative options like OEM encoding when Unicode is not supported, rather than explicit error codes within the messages themselves. Any negotiation failures or invalid responses are typically propagated as errors by the hosting application protocol, prompting retries or alternative authentication paths if configured.

Protocol Versions

NTLMv1

NTLMv1, the original version of the NTLM authentication protocol, was introduced as the default mechanism in Windows NT 3.1 through Windows Server 2003, relying on DES-based LAN Manager (LM) hashes and NT hashes for challenge-response authentication. It employs weak cryptographic primitives, including DES for LM operations and MD4 for NT password hashing, which form the baseline for subsequent enhancements in later versions. In NTLMv1, the client computes two responses to the server's 8-byte random challenge: the LM response and the NT response. The LM response is derived from the LM one-way function (LMOWF), which processes the uppercase password (truncated to 14 characters, padded if shorter) by splitting it into two 7-byte halves. Each half is used as a DES key (with odd parity adjustment) to encrypt the fixed 8-byte magic string "KGS!@#$%", producing two 8-byte outputs that are concatenated to form the 16-byte ResponseKeyLM. To generate the 24-byte LM response, this key is padded with five zero bytes to 21 bytes, split into three 7-byte segments (each adjusted for odd parity), and each segment encrypts the 8-byte server challenge using DES, with the results concatenated. The response uses the one-way function (NTOWF), computed as the hash of the representation of the full , yielding a 16-byte ResponseKeyNT. Similar to the response, the 24-byte response is produced by padding ResponseKeyNT to 21 bytes with zeros, splitting into three 7-byte keys (with parity), and encrypting the server challenge three times, concatenating the outputs. If the NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY flag is set (indicating NTLMv1 with session security), the response instead encrypts the first 8 bytes of an hash of the concatenated server challenge and an 8-byte client challenge. The response may be replaced with the client challenge padded to 24 bytes in this mode. The session base key in NTLMv1 is derived directly from the NTOWF by applying again, resulting in an 16-byte used as the foundation for message signing and sealing operations. Signing employs this (or a derived version) with or for integrity checks, while sealing uses encryption based on the key exchange (typically the ResponseKeyNT or ResponseKeyLM, depending on available responses) to provide . These derivations enable limited session but expose the protocol to compromise if responses are intercepted. NTLMv1 has inherent limitations that undermine its , including a fixed 8-byte size that limits and facilitates precomputation attacks. It lacks , allowing servers to impersonate clients without , and omits timestamps or nonces, making it susceptible to replay attacks where captured responses can be reused. Additionally, the component's 14-character limit and usage severely weaken resistance to brute-force and attacks.

NTLMv2

NTLMv2, an enhanced version of the NTLM authentication protocol, was first made available via Service Pack 4 in 1997 and received native support in Windows 2000. It requires the client to set the NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY flag (0x00080000) in the NEGOTIATE_MESSAGE to indicate support, which the server echoes back in the CHALLENGE_MESSAGE if compatible. This version addresses vulnerabilities in NTLMv1 by incorporating stronger , including HMAC-MD5 for key derivation and response generation, replacing the weaker DES-based computations. The core of NTLMv2 authentication lies in its response structure, computed during the AUTHENTICATE_MESSAGE. The NTLMv2 hash, serving as the effective password hash, is derived as follows:
NTLMv2_Hash = HMAC-MD5(NT_Hash, UNICODE(Uppercase(Username) + Domain))
where NT_Hash is the MD4 hash of the Unicode password, and Username and Domain are concatenated after uppercasing only the username. The NTLMv2 response then combines a proof string with a challenge structure (blob). The proof string (NTProofStr) is:
NTProofStr = HMAC-MD5(NTLMv2_Hash, [ServerChallenge](/page/Challenge) + [Temp](/page/Temp))
Here, is the 8-byte from the server, and is a including a 1-byte response version (0x01), a 1-byte high response version (0x01), 6 zero bytes, an 8-byte client-generated (in FILETIME format), an 8-byte client (client challenge), 4 zero bytes, the target information ( pairs provided by the server), and 4 trailing zero bytes. The full response is NTProofStr concatenated with Temp, ensuring the proof binds to the dynamic elements without revealing the hash. This structure approximates HMAC-MD5(NT_Hash, Uppercase(Username) || ClientChallenge || ), where encapsulates the timestamp and target pairs for contextual binding. The client , an 8-byte random , and the provide mutual elements and replay protection; the verifies the 's recency and the client's knowledge of the , while the (e.g., name, ) ties the response to the specific . For session , the session base key is derived as:
SessionBaseKey = HMAC-MD5(NTLMv2_Hash, NTProofStr)
This enables stronger message signing using HMAC-MD5 (with sequence numbers for ) and sealing via (with keys derived from the session base ), offering improved against modification and compared to NTLMv1's weaker mechanisms.

NTLM2 Session Security

NTLM2 session , also known as extended session , is an optional layer added to NTLMv1 to provide message through signing and confidentiality through sealing, without altering the core process of NTLMv1. It is negotiated in the NTLM NEGOTIATE_MESSAGE via the NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY (0x00080000), which enables the use of stronger for session , and often in conjunction with the NTLMSSP_NEGOTIATE_LM_KEY (0x00000080) to utilize the LM for during . This mechanism operates in a half-duplex mode when using NTLMv1, meaning signing and sealing alternate directions rather than supporting full-duplex simultaneously. The key exchange process begins with the client generating a random 16-byte ExportedSessionKey upon receiving the CHALLENGE_MESSAGE. To securely share this key with the server, the client encrypts the first 8 bytes of the ExportedSessionKey using the session key—derived from the client's LM hash truncated to 8 bytes for encryption—and includes the resulting 8-byte in the EncryptedRandomSessionKey field of the AUTHENTICATE_MESSAGE. The server, possessing the same session key from the verified LM challenge response, decrypts this field to recover the first 8 bytes; the full 16-byte is then reconstructed by appending 8 zero bytes to these decrypted bytes if necessary, though in practice, the random generation ensures the full key's entropy. This approach leverages the shared LM key without requiring NTLMv2's enhanced challenge-response computations. Message signing for integrity uses a derived signing key based on the ExportedSessionKey. The client-to-server signing key (ClientSignKey) is computed as the MD5 hash of the ExportedSessionKey concatenated with the magic constant "session key to client-to-server signing key magic constant" (a 20-byte ASCII string). \text{ClientSignKey} = \text{MD5}(\text{ExportedSessionKey} \parallel \text{"session key to client-to-server signing key magic constant"}) The server-to-client signing key is derived analogously using "session key to server-to-client signing key magic constant". Signing involves computing a 16-byte (MAC) by DES-encrypting a sequence number and with keys derived from the signing key, ensuring tamper detection for subsequent messages. For confidentiality, sealing employs encryption with a derived sealing key. The sealing key (SealKey) depends on negotiated key strengths: if NTLMSSP_NEGOTIATE_128 (0x20000000) is set, SealKey is the full 16-byte ExportedSessionKey; for NTLMSSP_NEGOTIATE_56 (0x8000000), it uses the first 7 bytes plus parity for a 56-bit effective key; otherwise, the first 5 bytes are used for 40-bit. This base is then processed with using mode-specific magic constants, such as "session key to client-to-server sealing key magic constant" for client-side operations. \text{ClientSealKey} = \text{MD5}(\text{ExportedSessionKey} \parallel \text{"session key to client-to-server sealing key magic constant"}) Encryption reinitializes the state with this SealKey and a per-message sequence number to handle potential in connectionless modes. This session security enhances NTLMv1 compatibility by adding protections atop legacy authentication, commonly implemented in older Windows versions (e.g., SP4 and later) for protocols like to enable signing without mandating NTLMv2's full protocol upgrade. It supports anonymous or guest logons only without security, disabling signing and sealing in those cases to prevent exposure.

Implementation and Usage

NTLM Security Support Provider

The NTLM Security Support Provider (SSP), implemented in the msv1_0.dll , serves as a core component within the Windows Security Support Provider Interface (SSPI) framework, enabling , , and services for distributed applications. It operates as a security package that the Local Security Authority (LSA) loads by default, allowing protocols to perform challenge-response without direct access to underlying credentials or session keys. Initialization of the NTLM SSP begins with the AcquireCredentialsHandle function, which obtains a handle to the credentials of a principal, such as a logged-on user, for subsequent operations. This handle is then used in calls to InitializeSecurityContext on the client side or AcceptSecurityContext on the server side to iteratively build a context through token exchanges, establishing and optional session features like signing and . The NTLM SSP integrates seamlessly into Windows protocols via SSPI calls, providing a protocol-agnostic interface for secure communications; for example, it supports authentication in (SMB) for , HTTP Negotiate for web access, and (RPC) or (DCOM) services. Configuration of the NTLM SSP occurs through registry settings under the HKLM\SYSTEM\CurrentControlSet\Control[Lsa](/page/LSA) key, where administrators can adjust SSP ordering, enable restrictions on NTLM usage, and specify parameters like minimum session security levels via subkeys such as MSV1_0. In environments where authentication is unavailable or fails, such as in workgroup configurations or non-domain-joined scenarios, the NTLM acts as the default fallback mechanism to ensure compatibility and continued access. It supports both NTLMv1 and NTLMv2 protocols within this framework.

Version Deployment and Availability

NTLMv1, introduced as the initial version of the protocol, was deployed in early Windows operating systems including through , where it served as the primary authentication mechanism for domain and local logons. However, due to its security limitations, NTLMv1 became legacy in subsequent releases; it was disabled by default starting with and , though it remained available for until its removal in version 24H2 and Windows Server 2025. In contrast, NTLMv2 has been the default authentication variant since , with native support added in that OS and retrofitted to via 4; and later versions enforce NTLMv2 responses by default for enhanced session security, requiring it for features like certain remote desktop connections and protocols. NTLMv1 continues to be available in and for compatibility, but has been removed from version 24H2 and Windows Server 2025. NTLMv2 remains available across , (including 24H2), and , integrated through the NTLM Support Provider (), though administrators can restrict usage via policy settings. In practical deployment, NTLM serves primarily as a fallback mechanism when authentication fails, such as in intra-domain scenarios where domain controllers are unreachable or misconfigured. It is commonly used for extranet HTTP in web applications employing the Negotiate protocol, particularly in mixed-trust environments without full ticket-granting support. Legacy shares also rely on NTLM for client-server in workgroup configurations or when accessing older file servers, ensuring compatibility with pre-Active Directory systems. Negotiation between NTLM versions occurs during the initial handshake, influenced by server-side policies; for instance, the setting "Network security: authentication level" allows administrators to mandate NTLMv2 only (e.g., by selecting "Send NTLMv2 response only. Refuse LM & NTLM"), blocking weaker variants like NTLMv1 and enforcing stronger across domain-joined devices. As of November 2025, NTLMv2 remains enabled by default in , (including version 24H2), and to support legacy applications and devices, but its use is increasingly restricted in modern infrastructures. In cloud environments like ( AD), NTLM is largely unsupported for services such as Files, where authentication falls back to or identity-based methods, prompting hybrid setups to migrate away from it. Usage has declined significantly since 2010, driven by Microsoft's preference for in domains and ongoing deprecation efforts, yet NTLM persists in air-gapped networks isolated from domain infrastructure and mixed environments with legacy hardware, where full deployment is impractical.

Deprecation and Modern Alternatives

Microsoft has pursued the deprecation of NTLM through a series of milestones aimed at reducing its usage and eventually eliminating it from Windows environments. Auditing and restriction policies for NTLM were first introduced in and , allowing administrators to monitor and limit NTLM authentication traffic. These capabilities were expanded in subsequent versions, with enhanced auditing features becoming available in and later. In June 2024, officially deprecated all versions of NTLM, announcing that it is no longer under active development. For version 24H2 and 2025, NTLMv1 was removed entirely, with default auditing of NTLMv1 usage enabled starting in late August 2025 for version 24H2 clients and the rollout of 2025 beginning in November 2025, culminating in a default block of NTLMv1 via update in October 2026. Full disablement options for NTLM, including NTLMv2, are configurable through and registry settings in [Windows 11](/page/Windows 11), enabling organizations to prohibit NTLM authentication domain-wide. The primary reasons for deprecating NTLM include its persistent vulnerabilities, such as susceptibility to attacks and pass-the-hash exploits, which undermine modern architectures. Additionally, NTLM is incompatible with zero-trust models due to its lack of , absence of certificate-based validation, and reliance on weaker challenge-response mechanisms that do not align with contemporary requirements for explicit verification at every access point. As the primary alternative, recommends , a ticket-based protocol that provides and is the default in environments since Windows 2000. For transport-layer , TLS (particularly TLS 1.3) should be used to encrypt communications, such as in LDAPS or , replacing NTLM's insecure fallback role. In web and cloud scenarios, OAuth 2.0 with JWT tokens via offers scalable, token-based authorization without NTLM's limitations. To facilitate the transition, provides tools like Windows Local Administrator Password Solution (LAPS), which automates the randomization and secure management of local administrator passwords, reducing reliance on domain credentials that might trigger NTLM in lateral movement scenarios. For (RDP) sessions, Restricted Admin mode prevents the forwarding and storage of domain credentials on remote systems, mitigating NTLM-related risks by enforcing network-level logons and limiting exposure during administrative access. Looking ahead, plans a phased elimination of NTLM support, with mandatory disabling in Microsoft Entra Domain Services as a already, and broader enforcement expected across and hybrid environments by mid-2026 to align with zero-trust principles.

Security Analysis

Known Vulnerabilities

One of the most prominent vulnerabilities in NTLM is the Pass-the-Hash (PtH) attack, which enables adversaries to reuse stolen NTLM password hashes to authenticate to remote systems without knowledge of the password. This technique exploits the design of NTLM, where hashes serve as proof of in challenge-response exchanges, and has been feasible since NTLMv1 due to the static nature of the hashes until password changes occur. Tools like facilitate PtH by extracting NTLM hashes from LSASS process memory, allowing lateral movement across Windows networks. NTLM relay attacks represent another critical flaw, where an attacker intercepts authentication messages and forwards them to services like or RDP to impersonate the victim. These attacks thrive on NTLM's lack of inherent and are especially potent against NTLMv1, as it does not enforce message signing, though partial mitigations exist via SMB signing requirements. Even in NTLMv2, remains viable if signing is disabled or bypassed, enabling or unauthorized access. Recent analyses as of 2025 highlight a "" in NTLM techniques, including low-privilege HTTP-to-LDAP relaying and bypasses of default protections in services like and AD CS. A specific tampering in NTLMv2, identified as CVE-2019-1040, allows man-in-the-middle attackers to bypass the Message Integrity Code () protection, enabling modification of messages without detection. This flaw, exploitable over HTTP, leverages weaknesses in PKCS#7 padding validation to recover hashes or alter fields like target information, facilitating advanced relay scenarios and remote code execution in affected Windows versions. Version-specific weaknesses exacerbate NTLM's risks: in NTLMv1, the LM hash's reliance on encryption permits efficient attacks, as the 56-bit key length and password splitting into uppercase 7-character halves allow precomputed lookups for millions of common passwords in seconds using modern . For NTLMv2, weak server generation in implementations enables prediction attacks, including replay of timestamped responses if the attacker's knowledge of allows simulation of valid challenges. Historical CVEs highlight early NTLM flaws, such as those enabling LM downgrades where attackers force fallback to the weaker LM/NTLMv1 protocol, exposing systems to brute-force cracking. Additionally, MS08-068 addressed SMB vulnerabilities tied to NTLM credential reflection, allowing remote code execution via relayed authentication without valid credentials. In 2025, several new NTLM vulnerabilities were disclosed and patched by , underscoring ongoing risks despite deprecation efforts. CVE-2025-24054 involves NTLM hash disclosure via spoofing, allowing attackers to capture NTLMv2 hashes with minimal user interaction and was exploited in the wild prior to its March 2025 patch. CVE-2025-54918 enables over the network due to improper in Windows NTLM. Additionally, CVE-2025-59214 is a zero-click leak that bypasses prior patches, exposing NTLM hashes on fully updated systems as of October 2025.

Mitigation and Best Practices

To mitigate risks associated with NTLM authentication, organizations should implement Group Policy Objects (GPOs) to restrict its use, starting with auditing to assess dependency before enforcement. The "Network security: Restrict NTLM: Audit NTLM authentication in this domain" policy, located under Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options, enables logging of all NTLM authentication attempts on domain controllers without blocking them, allowing administrators to identify reliant applications and services. Similarly, the "Network security: Restrict NTLM: Audit incoming NTLM traffic" policy audits incoming NTLM traffic from clients and member servers, while the "Network security: Restrict NTLM: Outgoing NTLM traffic to remote servers" policy audits or denies outbound NTLM attempts to prevent credential exposure. Once audited, these can be escalated to "Deny all" modes to block NTLM domain-wide or for specific traffic directions, with exceptions added via the "Network security: Restrict NTLM: Add remote server exceptions for NTLM authentication" policy for legacy systems. For finer control, registry modifications provide direct disablement options. Setting the DWORD value RestrictReceivingNTLMTraffic to 2 under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0 denies all incoming NTLM traffic to the local server, while RestrictSendingNTLMTraffic=2 under the same path blocks outgoing NTLM to remote servers. These changes correspond to the deny options in the aforementioned GPOs and should be tested in non-production environments to avoid disrupting compatible applications. Monitoring can be enhanced by reviewing Event ID 4624 in the Security event log, where the "Authentication Package" field lists "NTLM" for NTLM-based logons, providing visibility into usage patterns. Best practices emphasize transitioning away from NTLM toward stronger protocols while layering defenses. Enforce authentication by configuring the "Network security: LAN Manager authentication level" GPO to "Send NTLMv2 response only. Refuse & NTLM," which rejects weaker NTLM variants and prompts fallback to where possible. For HTTP-based services, enable Extended Protection for Authentication (EPA) to bind NTLM credentials to the TLS channel, mitigating man-in-the-middle relay attacks; this is configurable via IIS settings or application-specific policies like in Exchange Server. On file shares, require SMB 3.0 signing and encryption through GPOs such as "Microsoft network client: Digitally sign communications (always)" and ": Server SPN target name validation level," which prevent NTLM relay by verifying message integrity and encrypting traffic. Additionally, rotate user credentials frequently—ideally every 90 days or less—to limit the window for offline attacks on captured NTLM hashes, combined with enforcing complex password policies. Tools like Microsoft Defender for Identity provide automated monitoring by analyzing NTLM traffic for anomalies, such as relay attempts, and generating alerts based on event logs from domain controllers. Third-party tools, including from SpecterOps, enable attack path analysis to visualize NTLM-dependent routes, helping prioritize remediation. For testing NTLM reliance, deploy auditing scripts like those in to parse Event ID 4624 logs and enumerate NTLM usage across the environment, or use built-in GPO auditing to simulate blocks and measure impact before full deployment.

Cross-Platform Compatibility

Integration with Linux and Unix

Samba provides comprehensive support for NTLMv1 and NTLMv2 authentication in its smbclient tool and smbd/nmbd server daemons on and Unix systems, enabling interoperability with Windows networks for file and print sharing via the SMB/CIFS protocol. This support originated in early Samba releases, with encrypted password authentication (enabling NTLM over LM) becoming the default in version 3.0.0 released in 2003, and NTLMv2 handling refined in subsequent versions to match Windows behaviors. Configuration of NTLM in is managed through the smb.conf file, where parameters control versions and compatibility. For instance, setting ntlm auth = yes allows the server to accept NTLMv1 alongside NTLMv2, though this is deprecated in Samba 4.13 and later due to security concerns; the default is now restricted to NTLMv2 via . On the client side, client ntlmv2 auth = yes (default since Samba 3.0) enforces NTLMv2 usage in tools like smbclient, disabling weaker NTLMv1 and LANMAN variants. These settings ensure secure negotiation while supporting legacy environments. In Active Directory-integrated setups, Samba's Winbind daemon facilitates domain user authentication on /Unix hosts, preferring for modern clients but falling back to NTLM for legacy Windows systems unable to use tickets. Winbind integrates with and NSS for seamless user mapping, allowing NTLM-only authentication in mixed-domain scenarios where is unavailable. This fallback is configured via smb.conf security modes like security = ads and Winbind options in /etc/nsswitch.conf. Key utilities for NTLM operations include ntlm_auth, a helper program for verifying NTLM credentials against domain backends like Winbind or tdbsam, often used in or custom scripts. For mounting shares with NTLM, the cifs-utils package provides mount.cifs, supporting options like sec=ntlm or sec=ntlmv2 to specify authentication types during filesystem mounts. These tools enable testing and practical use of NTLM in non-Windows environments. Challenges in NTLM integration on /Unix include differences in string handling compared to Windows, where NTLM expects UTF-16 encoding; mismatches can lead to failures with non-ASCII usernames or passwords unless properly configured via client charset options in smb.conf. Additionally, in mixed Windows- networks, NTLM's susceptibility to relay attacks persists if signing is not enforced, as attackers can intercept and reuse credentials across connections.

Support in Other Operating Systems

macOS provides native support for NTLMv2 authentication through its SMB implementation, enabling secure over . This support integrates with the system's for credential storage and management, allowing users to authenticate to Windows-based SMB shares without repeated prompts. For instance, macOS clients can negotiate NTLMv2 sessions with servers supporting SMB2 and higher, ensuring compatibility in mixed environments while favoring when available. On mobile platforms, NTLM support is limited and primarily occurs through enterprise (MDM) configurations for authentication. In and , configuration profiles can enable NTLM-based methods like MSCHAPv2 within EAP-PEAP for enterprise networks, though this is typically restricted to supervised devices in corporate settings. Similarly, Enterprise allows NTLM via MDM-deployed profiles using EAP methods that rely on NTLM hashes, such as for connecting to legacy Active Directory-integrated networks. However, both platforms discourage direct NTLM use in applications due to concerns, recommending certificate-based alternatives like EAP-TLS instead. Embedded and IoT systems often incorporate NTLM for legacy compatibility, particularly in printing and scanning devices. For example, HP JetDirect-enabled printers support NTLM authentication for IPP and SMB-based workflows, such as scanning to network folders on Windows shares, though many older models are limited to NTLMv1 due to hardware constraints. With the removal of NTLMv1 support in Windows 11 version 24H2 and Windows Server 2025, these older NTLMv1-limited devices may face compatibility issues with newer Windows clients unless upgraded or configured to use NTLMv2 or alternative protocols. This enables interoperability with enterprise print servers but requires careful configuration to avoid exposing weaker authentication variants. Third-party systems extend NTLM support through specialized integrations. Cisco Identity Services Engine (ISE) utilizes NTLM, particularly NTLMv1 via MSCHAPv2, for supplicant authentication in scenarios, allowing seamless integration with for 802.1X environments. includes native NTLM authentication in its SMB services, configurable via properties like lm-compatibility-level to handle NTLMv1 and v2 sessions with Windows domains. Earlier implementations relied on Sun ports for additional tools like ntlm_auth, but modern versions provide built-in support. Interoperability challenges with NTLM, especially v2, frequently arise from in validation, where discrepancies exceeding five minutes between client and server clocks can cause failures. Additionally, message parsing issues stem from NTLM's little-endian byte order, leading to errors in non-Windows implementations that fail to correctly interpret flags or offsets without proper handling. These problems underscore the need for synchronized time sources and endianness-aware protocol stacks in cross-platform deployments.

References

  1. [1]
    [MS-NLMP]: NT LAN Manager (NTLM) Authentication Protocol
    Aug 1, 2022 · Specifies the NT LAN Manager (NTLM) Authentication Protocol, used in Windows for authentication between clients and servers.Published Version · Previous Versions
  2. [2]
    NTLM overview in Windows Server - Microsoft Learn
    Apr 18, 2025 · The NTLM authentication protocols authenticate users and computers based on a challenge response mechanism that proves to a server or domain ...
  3. [3]
    Microsoft NTLM - Win32 apps
    Jul 10, 2025 · Windows Challenge/Response (NTLM) is the authentication protocol used on networks that include systems running the Windows operating system and on stand-alone ...
  4. [4]
    Features Removed or No Longer Developed in Windows Server
    Sep 24, 2025 · NTLM, NTLMv1 is removed. LANMAN and NTLMv2 are no longer under active feature development and are deprecated. NTLMv2 will continue to work but ...
  5. [5]
    Upcoming changes to NTLMv1 in Windows 11, version 24H2 and ...
    Aug 29, 2025 · Microsoft has removed the NTLMv1 protocol (see Removed features and functionality) from Windows 11, version 24H2 and Windows Server 2025 and ...
  6. [6]
    History of DOS networking - FreeDOS Help (installed language list)
    In 1985 Microsoft introduced its own implementation of NetBIOS, called MS-Net. It was not widely used. In 1987 the company released "Microsoft LAN Manager" 1.0 ...Missing: 1980s | Show results with:1980s
  7. [7]
    [PDF] [MS-FSSO]: File Access Services System Overview - Microsoft
    Jun 25, 2013 · The current File Access Services System evolved from earlier systems for remote file access, including the Microsoft LAN Manager. These early ...
  8. [8]
    Security guidance for NTLMv1 and LM network authentication
    NTLMv1 and LM are vulnerable to attacks, especially on default configurations of Windows NT4, 2000, XP, and Server 2003. Attackers can extract authentication ...
  9. [9]
    [MS-NLMP]: NTLM v1 Authentication - Microsoft Learn
    Apr 27, 2022 · The following pseudocode defines the details of the algorithms used to calculate the keys used in NTLM v1 authentication.
  10. [10]
    NTLM user authentication - Windows Server | Microsoft Learn
    Jan 15, 2025 · Windows uses the LsaLogonUser API for all kinds of user authentications. The LsaLogonUser API authenticates users by calling an authentication ...
  11. [11]
    Enable NTLM 2 authentication - Windows Client - Microsoft Learn
    Jan 15, 2025 · To enable 128-bit NTLM 2 session security support, you must install Microsoft Internet Explorer 4.x or 5 and upgrade to 128-bit secure ...
  12. [12]
    [MS-NLMP]: NTLM v2 Authentication - Microsoft Learn
    Apr 27, 2022 · NTLM v2 authentication uses algorithms to calculate keys, must be configured on both client and server, and uses NTOWF v2 and LMOWF v2 ...
  13. [13]
    Retire Those Old Legacy Protocols - Microsoft Community Hub
    Feb 12, 2018 · Legacy protocols like TLS 1.0, SMBv1, LanMan/NTLMv1, and Digest Authentication should be retired due to security risks.
  14. [14]
    [MS-NLMP]: Message Syntax - Microsoft Learn
    Apr 23, 2024 · The NTLM Authentication Protocol consists of three message types used during authentication and one message type used for message integrity ...
  15. [15]
    [MS-NLMP]: NEGOTIATE_MESSAGE - Microsoft Learn
    Apr 23, 2024 · The NEGOTIATE_MESSAGE defines an NTLM negotiate message that is sent from the client to the server. This message allows the client to specify its supported ...
  16. [16]
    [MS-NLMP]: NEGOTIATE
    ### Summary of NTLMSSP_NEGOTIATE_FLAGS Structure
  17. [17]
    [MS-NLMP]: CHALLENGE_MESSAGE | Microsoft Learn
    Aug 1, 2022 · The CHALLENGE_MESSAGE defines an NTLM challenge message that is sent from the server to the client. The CHALLENGE_MESSAGE is used by the server to challenge ...
  18. [18]
  19. [19]
    [MS-NLMP]: AUTHENTICATE_MESSAGE - Microsoft Learn
    Aug 1, 2022 · The AUTHENTICATE_MESSAGE defines an NTLM authenticate message that is sent from the client to the server after the CHALLENGE_MESSAGE (section ...
  20. [20]
    [MS-NLMP]: Overview - Microsoft Learn
    Apr 23, 2024 · NTLM is a challenge-response style authentication protocol. This means that to authenticate a user, the server sends a challenge to the client.Missing: process | Show results with:process
  21. [21]
    [MS-NLMP]: Session Security Details - Microsoft Learn
    Apr 23, 2024 · Session security provides message integrity (signing) and message confidentiality (sealing). When NTLM v2 authentication is not negotiated, only one key is ...
  22. [22]
    [MS-NLMP]: KXKEY
    ### Summary of KXKEY for NTLM2 Session Security
  23. [23]
    [MS-NLMP]: SIGNKEY
    ### Summary of SIGNKEY for NTLM2 Session Security
  24. [24]
    [MS-NLMP]: SEALKEY
    ### Summary of SEALKEY for NTLM2 Session Security
  25. [25]
    Security Support Provider Interface Architecture - Microsoft Learn
    Jul 29, 2021 · Learn about the Windows authentication protocols that are used within the Security Support Provider Interface (SSPI) architecture.
  26. [26]
    Using Security Packages - Win32 apps | Microsoft Learn
    Jan 7, 2021 · The Kerberos and NTLM protocols are implemented as security packages from the Secur32.dll security support provider (SSP) supplied with the operating system.
  27. [27]
    AcquireCredentialsHandle (NTLM) function (Sspi.h) - Win32 apps
    Jan 7, 2021 · The AcquireCredentialsHandle (NTLM) function acquires a handle to preexisting credentials of a security principal.Parameters · Return Value · RemarksMissing: initialization | Show results with:initialization
  28. [28]
    InitializeSecurityContext (NTLM) function (Sspi.h) - Win32 apps
    Mar 17, 2023 · The InitializeSecurityContext (NTLM) function initiates the client side, outbound security context from a credential handle.
  29. [29]
    AcceptSecurityContext (NTLM) function (Sspi.h) - Win32 apps
    Mar 17, 2023 · The AcceptSecurityContext (NTLM) function enables the server component of a transport application to establish a security context between the server and a ...
  30. [30]
    Mitigating Pass-the-Hash (PtH) Attacks and Other Credential Theft ...
    Jul 15, 2024 · This document discusses Pass-the-Hash (PtH) attacks against the Windows operating systems and provides holistic planning strategies.
  31. [31]
    HackTool:Win32/Mimikatz.I threat description - Microsoft
    Jul 9, 2019 · Mimikatz is a well-known hacktool used to extract Windows passwords in plain-text from memory, perform pass-the-hash attacks, inject code ...
  32. [32]
    Guidance about how to configure protected accounts - Microsoft Learn
    Jul 9, 2025 · Through Pass-the-hash (PtH) attacks, an attacker can authenticate to a remote server or service by using the underlying NTLM hash of a ...
  33. [33]
    Mitigating NTLM Relay Attacks by Default - Microsoft
    Dec 9, 2024 · NTLM is a legacy protocol and we have been recommending users to prepare for NTLM being disabled by default in a future version of Windows. We ...Missing: trust | Show results with:trust
  34. [34]
    KB5005413: Mitigating NTLM Relay Attacks on Active Directory ...
    PetitPotam is a classic NTLM Relay Attack, and such attacks have been previously documented by Microsoft along with numerous mitigation options to protect ...
  35. [35]
    CVE-2019-1040 Detail - NVD
    Jun 12, 2019 · A tampering vulnerability exists in Microsoft Windows when a man-in-the-middle attacker is able to successfully bypass the NTLM MIC (Message Integrity Check) ...Missing: Padding Oracle
  36. [36]
    CVE-2019-1040
    A tampering vulnerability exists in Microsoft Windows when a man-in-the-middle attacker is able to successfully bypass the NTLM MIC (Message Integrity Check) ...Missing: Padding Oracle
  37. [37]
    Prevent Windows from storing a LAN Manager (LM) hash of the ...
    Jan 15, 2025 · Windows NT (NTLM) authentication; NTLM version 2 ... This registry key prevents new LM hashes from being created on Windows 2000 computers.
  38. [38]
    Network security Do not store LAN Manager hash value on next ...
    Apr 18, 2017 · The LAN Manager hash is relatively weak and prone to attack compared to the cryptographically stronger NTLM hash. Because the LM hash is ...
  39. [39]
    [PDF] Understanding the Windows SMB NTLM Authentication Weak ...
    Understanding the Windows SMB NTLM Authentication Weak Nonce Vulnerability ... ‣To help prevent prediction attacks, replay attacks and others,. - Challenges ...
  40. [40]
    Network security LAN Manager authentication level - Windows 10
    Apr 18, 2017 · The Network security: LAN Manager authentication level setting determines which challenge/response authentication protocol is used for network logons.
  41. [41]
    Microsoft Security Bulletin MS08-068 - Important
    Nov 11, 2008 · This security update resolves a publicly disclosed vulnerability in Microsoft Server Message Block (SMB) Protocol.
  42. [42]
    smb.conf - Samba.org
    Default yes. By default, Samba 3.0 has the same semantics as a Windows NT server, in that it is case insensitive but case preserving. As ...
  43. [43]
    ntlm_auth - Samba.org
    ntlm_auth is a helper utility that authenticates users using NT/LM authentication, returning 0 for success and 1 for denial.Missing: 2.0 support
  44. [44]
    What's new for enterprise in macOS Monterey - Apple Support
    Resolves an issue using NTLM authentication on SMB print servers that also allow Kerberos. Resolves an issue where Safari prompts for an identity ...
  45. [45]
    Configure Wi-Fi settings for iOS/iPadOS devices in Microsoft Intune
    Mar 3, 2025 · You can create a profile with specific WiFi settings, and then deploy this profile to your iOS/iPadOS devices using Intune.
  46. [46]
    Secure Wi-Fi Enterprise configuration - Android Developers
    Jun 28, 2023 · On Android 11 QPR1 and higher, the system mandates strict security configurations for TLS-based Wi-Fi Enterprise configurations (like PEAP, TLS, or TTLS).
  47. [47]
    Complete Guide to Android 802.1X - SecureW2
    Nov 21, 2024 · Step-by-step guide to setting up 802.1X on Android with EAP-TLS, certificates, server validation, and SecureW2 onboarding.
  48. [48]
    When authenticating to a Windows share for network scans, wh...
    Jun 25, 2015 · Could someone please advise which authentication protocls are used by HP printers when performing user authentication to a network folder? NTLM, NTLMv2, etc? ...Missing: JetDirect | Show results with:JetDirect
  49. [49]
    Cisco ISE 3.1 (patch3) speaks with Active directory using ntlmv1
    Aug 10, 2022 · Cisco ISE uses NTLMv1 because MSCHAPv2, used with EAP, is NTLMv1 based. There is no known way to force NTLMv2 with EAP.Turn off NTLM in ISE, Use Kerberos instead. - Cisco CommunitySolved: ISE and Kerberos only AD - Cisco CommunityMore results from community.cisco.com
  50. [50]
    Managing SMB Configuration Properties - Oracle Help Center
    When clients initiate NTLM authentication, the Oracle Solaris SMB server is required to use DES encryption algorithm for hashing the incoming password hashes.
  51. [51]
    ntlm_auth - man pages section 1: User Commands
    Jul 27, 2022 · ntlm_auth - tool to allow external access to Winbind's NTLM authentication function.
  52. [52]
    Troubleshooting NTLM - Skyhigh Security
    Mar 7, 2024 · In the context of NTLM authentication, time skew refers to the allowable time difference between the clocks of the client and the server ...Missing: interoperability | Show results with:interoperability