Introduction
NTLM which is denoted as NT LAN Manager (NTLM) is a suite of Microsoft security protocols (This is a Proprietary Microsoft authentication protocol) that provides authentication, integrity, and confidentiality to users which is used in various Microsoft network protocol implementations.Basic Structure
This typically involves three systems as follows.Three systems involved in NTLM authentication |
Key Features
Following are key features of the NTLM authentication scheme.
- Uses a challenge-response mechanism for authentication, in which clients are able to prove their identities without sending a password to the server.
- Provides authentication, confidentiality and integrity
- Enables Single Sign On.
The Three-Step Handshake
NTLM It consists of three messages, commonly referred to as Type 1 (negotiation), Type 2 (challenge) and Type 3 (authentication).
Following is the message flow that happens between the client and the server.
Three step handshake of NTLM authentication protocol |
- (1) Client try to access the server's resource without authorization headers.
- (2) Server responds with 401 Unauthorized. With WWW-Authenticate: NTLM header, server requests the client to send NTLM authentication token.
- (3) Client re-sends the request with NTLM type 1 token. It initiates the NTLM authentication. This contains few information including the hostname and the domain name of the client [1].
NTLM Type 1 token structure |
- (4) Server receives the Type 1 token from the client. In response to that, sever sends Type 2 token which consists of server's NTLM challenge. [2]
NTLM Type 2 token structure |
- (5) In response to Type 2 token, client sends the Type 3 token as the final step in authentication. This demonstrates that the client has knowledge of the account password without sending the password directly. What actually client does is that it encrypts the server's challenge with its hashed password when generating the Type 3 token. Other than the response to the challenge, it consists the username too [3].
- User name
- Challenge sent to the client
- Response received from the client
Weaknesses
- Generated hashes of the client's password is not salted. So it remains same until the password is changed. So this is vulnerable to pass the hash [5] attack where once an attacker finds the hash once that can be used to encrypt the server's challenge successfully.
- NTLM does not support mutual authentication. i.e only client is authenticated. The client has to assume that the server is legitimate.
- The password hash in NTLM is exposed each time the client uses NTLM for authenticating to a server. There are tools exists that scan network traffic for NTLM password hashes, capture them and then do a brute-force crack on them to derive the user's password.
Because of this problems Microsoft has recommended Kerberos protocol over NTLM which gives a greater security. It provides mutual authentication. The password hash is less frequently exposed as it is only required to send when the user requests a TGT (Ticket Granting Ticket) [6]. But still there are situations that Kerberos protocol cannot be applied. In such occasions NTLM is still used.
References
[1] NTLM Type 1 message Example : http://davenport.sourceforge.net/ntlm.html#type1MessageExample
[2] NTLM Type 2 message Example :
http://davenport.sourceforge.net/ntlm.html#type2MessageExample
[3] NTLM Type 3 message Example :
http://davenport.sourceforge.net/ntlm.html#type3MessageExample
[4] Microsoft NTLM : https://msdn.microsoft.com/en-us/library/windows/desktop/aa378749(v=vs.85).aspx
[5] Pass the hash : https://en.wikipedia.org/wiki/Pass_the_hash
[6] Authentication in Windows Server 2008 R2 and Windows 7 : http://windowsitpro.com/security/authentication-windows-server-2008-r2-and-windows-7
[2] NTLM Type 2 message Example :
http://davenport.sourceforge.net/ntlm.html#type2MessageExample
[3] NTLM Type 3 message Example :
http://davenport.sourceforge.net/ntlm.html#type3MessageExample
[4] Microsoft NTLM : https://msdn.microsoft.com/en-us/library/windows/desktop/aa378749(v=vs.85).aspx
[5] Pass the hash : https://en.wikipedia.org/wiki/Pass_the_hash
[6] Authentication in Windows Server 2008 R2 and Windows 7 : http://windowsitpro.com/security/authentication-windows-server-2008-r2-and-windows-7
No comments:
Post a Comment