[{"@context":"http:\/\/schema.org\/","@type":"BlogPosting","@id":"https:\/\/wiki.edu.vn\/en\/wiki12\/ntlm-wikipedia\/#BlogPosting","mainEntityOfPage":"https:\/\/wiki.edu.vn\/en\/wiki12\/ntlm-wikipedia\/","headline":"NTLM – Wikipedia","name":"NTLM – Wikipedia","description":"before-content-x4 Suite of Microsoft security protocols for authentication, integrity, and confidentiality after-content-x4 In a Windows network, NT (New Technology) LAN","datePublished":"2020-03-26","dateModified":"2020-03-26","author":{"@type":"Person","@id":"https:\/\/wiki.edu.vn\/en\/wiki12\/author\/lordneo\/#Person","name":"lordneo","url":"https:\/\/wiki.edu.vn\/en\/wiki12\/author\/lordneo\/","image":{"@type":"ImageObject","@id":"https:\/\/secure.gravatar.com\/avatar\/c9645c498c9701c88b89b8537773dd7c?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c9645c498c9701c88b89b8537773dd7c?s=96&d=mm&r=g","height":96,"width":96}},"publisher":{"@type":"Organization","name":"Enzyklop\u00e4die","logo":{"@type":"ImageObject","@id":"https:\/\/wiki.edu.vn\/wiki4\/wp-content\/uploads\/2023\/08\/download.jpg","url":"https:\/\/wiki.edu.vn\/wiki4\/wp-content\/uploads\/2023\/08\/download.jpg","width":600,"height":60}},"image":{"@type":"ImageObject","@id":"https:\/\/wiki.edu.vn\/wiki4\/wp-content\/uploads\/2023\/08\/download.jpg","url":"https:\/\/wiki.edu.vn\/wiki4\/wp-content\/uploads\/2023\/08\/download.jpg","width":100,"height":100},"url":"https:\/\/wiki.edu.vn\/en\/wiki12\/ntlm-wikipedia\/","wordCount":7845,"articleBody":" (adsbygoogle = window.adsbygoogle || []).push({});before-content-x4Suite of Microsoft security protocols for authentication, integrity, and confidentiality (adsbygoogle = window.adsbygoogle || []).push({});after-content-x4In a Windows network, NT (New Technology) LAN Manager (NTLM) is a suite of Microsoft security protocols intended to provide authentication, integrity, and confidentiality to users.[1][2][3] NTLM is the successor to the authentication protocol in Microsoft LAN Manager (LANMAN), an older Microsoft product. The NTLM protocol suite is implemented in a Security Support Provider, which combines the LAN Manager authentication protocol, NTLMv1, NTLMv2 and NTLM2 Session protocols in a single package. Whether these protocols are used or can be used on a system which is governed by Group Policy settings, for which different versions of Windows have different default settings.NTLM passwords are considered weak because they can be brute-forced very easily with modern hardware.[4] (adsbygoogle = window.adsbygoogle || []).push({});after-content-x4Table of ContentsProtocol[edit]NTLMv1[edit]NTLMv2[edit]NTLM2 Session[edit]Availability and use of NTLM[edit]Use of the NTLM Security Support Provider[edit]Use of protocol versions[edit]Weakness and vulnerabilities[edit]Compatibility with Linux[edit]See also[edit]References[edit]External links[edit]Protocol[edit]NTLM is a challenge\u2013response authentication protocol which uses three messages to authenticate a client in a connection-oriented environment (connectionless is similar), and a fourth additional message if integrity is desired.[5][6][7][8]First, the client establishes a network path to the server and sends a NEGOTIATE_MESSAGE advertising its capabilities.[9]Next, the server responds with CHALLENGE_MESSAGE which is used to establish the identity of the client.[10]Finally, the client responds to the challenge with an AUTHENTICATE_MESSAGE.[11]The NTLM protocol uses one or both of two hashed password values, both of which are also stored on the server (or domain controller), and which through a lack of salting are password equivalent, meaning that if you grab the hash value from the server, you can authenticate without knowing the actual password. The two are the LM hash (a DES-based function applied to the first 14 characters of the password converted to the traditional 8-bit PC charset for the language), and the NT hash (MD4 of the little endian UTF-16 Unicode password). Both hash values are 16 bytes (128 bits) each.[12]The NTLM protocol also uses one of two one-way functions, depending on the NTLM version; NT LanMan and NTLM version 1 use the DES-based LanMan one-way function (LMOWF), while NTLMv2 uses the NT MD4 based one-way function (NTOWF).[12][13] (adsbygoogle = window.adsbygoogle || []).push({});after-content-x4[2]NTLMv1[edit]The server authenticates the client by sending an 8-byte random number, the challenge. The client performs an operation involving the challenge and a secret shared between client and server, specifically one of the two password hashes described above. The client returns the 24-byte result of the computation. In fact, in NTLMv1 the computations are usually made using both hashes and both 24-byte results are sent. The server verifies that the client has computed the correct result, and from this infers possession of the secret, and hence the authenticity of the client.Both the hashes produce 16-byte quantities. Five bytes of zeros are appended to obtain 21 bytes. The 21 bytes are separated in three 7-byte (56-bit) quantities. Each of these 56-bit quantities is used as a key to DES encrypt the 64-bit challenge. The three encryptions of the challenge are reunited to form the 24-byte response. Both the response using the LM hash and the NT hash are returned as the response, but this is configurable.C = 8-byte server challenge, randomK1 | K2 | K3 = NTLM-Hash | 5-bytes-0response = DES(K1,C) | DES(K2,C) | DES(K3,C)NTLMv2[edit]NTLMv2, introduced in Windows NT 4.0 SP4[14] (and natively supported in Windows 2000), is a challenge-response authentication protocol. It is intended as a cryptographically strengthened replacement for NTLMv1, enhancing NTLM security by hardening the protocol against many spoofing attacks and adding the ability for a server to authenticate to the client.[1][15][16]NTLMv2 sends two responses to an 8-byte server challenge. Each response contains a 16-byte HMAC-MD5 hash of the server challenge, a fully\/partially randomly generated client challenge, and an HMAC-MD5 hash of the user’s password and other identifying information. The two responses differ in the format of the client challenge. The shorter response uses an 8-byte random value for this challenge. In order to verify the response, the server must receive as part of the response the client challenge. For this shorter response, the 8-byte client challenge appended to the 16-byte response makes a 24-byte package which is consistent with the 24-byte response format of the previous NTLMv1 protocol. In certain non-official documentation (e.g. DCE\/RPC Over SMB, Leighton) this response is termed LMv2.The second response sent by NTLMv2 uses a variable-length client challenge which includes (1) the current time in NT Time format, (2) an 8-byte random value (CC2 in the box below), (3) the domain name and (4) some standard format stuff. The response must include a copy of this client challenge, and is therefore variable length. In non-official documentation, this response is termed NTv2.Both LMv2 and NTv2 hash the client and server challenge with the NT hash of the user’s password and other identifying information. The exact formula is to begin with the NT hash, which is stored in the SAM or AD, and continue to hash in, using HMAC-MD5, the username and domain name. In the box below, X stands for the fixed contents of a formatting field.SC = 8-byte server challenge, randomCC = 8-byte client challenge, randomCC* = (X, time, CC2, domain name)v2-Hash = HMAC-MD5(NT-Hash, user name, domain name)LMv2 = HMAC-MD5(v2-Hash, SC, CC)NTv2 = HMAC-MD5(v2-Hash, SC, CC*)response = LMv2 | CC | NTv2 | CC*NTLM2 Session[edit]The NTLM2 Session protocol is similar to MS-CHAPv2.[17] It consists of authentication from NTLMv1 combined with session security from NTLMv2.Briefly, the NTLMv1 algorithm is applied, except that an 8-byte client challenge is appended to the 8-byte server challenge and MD5-hashed. The least 8-byte half of the hash result is the challenge utilized in the NTLMv1 protocol. The client challenge is returned in one 24-byte slot of the response message, the 24-byte calculated response is returned in the other slot.This is a strengthened form of NTLMv1 which maintains the ability to use existing Domain Controller infrastructure yet avoids a dictionary attack by a rogue server. For a fixed X, the server computes a table where location Y has value K such that Y=DES_K(X). Without the client participating in the choice of challenge, the server can send X, look up response Y in the table and get K. This attack can be made practical by using rainbow tables.[18]However, existing NTLMv1 infrastructure allows that the challenge\/response pair is not verified by the server, but sent to a Domain Controller for verification. Using NTLM2 Session, this infrastructure continues to work if the server substitutes for the challenge the hash of the server and client challenges.NTLMv1 ClientServer: H(P,SC) Server->DomCntl: H(P,SC), SC Server"},{"@context":"http:\/\/schema.org\/","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"https:\/\/wiki.edu.vn\/en\/wiki12\/#breadcrumbitem","name":"Enzyklop\u00e4die"}},{"@type":"ListItem","position":2,"item":{"@id":"https:\/\/wiki.edu.vn\/en\/wiki12\/ntlm-wikipedia\/#breadcrumbitem","name":"NTLM – Wikipedia"}}]}]