Questions tagged [ntlm]

NTLM (NT LAN Manager) is a suite of Microsoft security protocols that provides authentication, integrity, and confidentiality to users.

NTLM has been deprecated for many uses as it doesn't support the latest standards:

Implementers should be aware that NTLM does not support any recent cryptographic methods, such as AES or SHA-256. It uses cyclic redundancy check (CRC) or message digest algorithms (RFC1321) for integrity, and it uses RC4 for encryption. Deriving a key from a password is as specified in RFC1320 and FIPS46-2. Therefore, applications are generally advised not to use NTLM - MSDN and to use Kerberos instead.

Despite this NTLM is still used inside enterprise networks where Microsoft Active Directory provides the enterprise directory service for Integrated Windows Authentication when Kerberos is not available.

NTLM over HTTP handshake is fairly simple:

Request  - [unauthenticated - no user info passed]

Response - 401 Unauthorized
           WWW-Authenticate: NTLM


Request  - Authorization: NTLM <base64-encoded type-1-message>

Response - 401 Unauthorized
           WWW-Authenticate: NTLM <base64-encoded type-2-message>


Request  - Authorization: NTLM <base64-encoded type-3-message>

           Server can now check username/password against LDAP from type-3 message
Response - 200 Ok [now authenticated & authorised]
1230 questions
12
votes
3 answers

Sending HTTP Headers with HTTP Web Request for NTLM Authentication

I want to login to a Sharepoint portal which brings up a login dialog but is using NTLM authentication. How can I modify the HTTP headers in C# to make a successful login request? I assume I would need to make a HTTPWebRequest to a page within the…
blade
  • 121
  • 1
  • 1
  • 3
12
votes
2 answers

Java 6 NTLM proxy authentication and HTTPS - has anyone got it to work?

I have a Java application (not an applet) that needs to access a web service. Proxies for the web service have been generated with JAX-WS, and seem to work fine. In one scenario it needs to talk through a web proxy server (actually Squid 3.0), which…
DavidK
  • 3,929
  • 1
  • 19
  • 26
12
votes
1 answer

Firebug console error HTTP 407 Proxy Authentication Required

I am behind a proxy at work (using NTLM authentication). Whenever I load up a page, my Firebug console gets flooded with messages like this: "NetworkError: 407 Proxy Authentication Required - http://somewebsite/Scripts/jquery-1.8.2.min.js" It does…
Jens Neubauer
  • 1,090
  • 1
  • 13
  • 24
12
votes
5 answers

NTLM authentication using node.js

I need to use node.js to communicate with a server using NTLM proxy authentication. I have used 2 modules: node-curl https://github.com/jiangmiao/node-curl request, coming highly recommended htps://github.com/mikeal/request I found no…
user1514989
  • 175
  • 1
  • 1
  • 7
12
votes
4 answers

System.Net.WebClient doesn't work with Windows Authentication

I am trying to use System.Net.WebClient in a WinForms application to upload a file to an IIS6 server which has Windows Authentication as it only 'Authentication' method. WebClient myWebClient = new WebClient(); myWebClient.Credentials = new…
Peter Hahndorf
  • 10,767
  • 4
  • 42
  • 58
11
votes
2 answers

Is there any solid way to deal with Windows integrated (NTLM) authentication from an android app?

As the title states, we're looking for a way to access a .NET 3.5 Web service that is behind a Windows integrated (NTLM) authentication. We've searched the internets and this forum this entire week, and we've yet to find a solution to this problem.…
Jens Bergvall
  • 1,617
  • 2
  • 24
  • 54
11
votes
4 answers

Windows integrated (NTLM) authentication vs Windows integrated (Kerberos)

What is the difference between Windows integrated (NTLM) authentication and Windows integrated (Kerberos)? How to implement these in IIS6 w.r.t. MSDN
Nitin Sawant
  • 7,278
  • 9
  • 52
  • 98
11
votes
1 answer

How to use .NET WebSocket Client with NTLM proxies?

My goal is to use a WebSocket .Net client implementation (i.e. not a browser) to connect to a WebSocket over a corporate proxy that requires NTLM authentication. So far, all the solutions (e.g. websocket-sharp-with-proxy, websocket4net) come up…
RichardTheKiwi
  • 105,798
  • 26
  • 196
  • 262
11
votes
1 answer

SSO - Get the AD Username with Apache

I have PHP 5.6.17 and Apache 2.4.10 running on Debian 8. I want to populate the PHP variable $_SERVER['REMOTE_USER'] with the Windows username, to log in the user if the username is in my database. I'm comfortable with the security risks involved in…
BastienSander
  • 1,718
  • 4
  • 24
  • 50
11
votes
0 answers

UIWebView + Sharepoint + NTLM Auth - I get Stream is sending an event before being opened

I have been working on an App that has a simple UIWebView in it that displays a Sharepoint site. I originally thought the NTLM authentication would be an issue but as it turns out that is really straight forward. However, ever since iOS8 my app…
GregAtAtt
  • 111
  • 7
11
votes
1 answer

Symfony2: automatically logging in users from their Windows session

In Symfony2 I have built an intranet. It currently uses the FOSUserBundle and an LDAP bundle to log users in, and I would like to add the functionality to log in user from their session in Windows. I found an NTLM script for PHP and an updated…
Paul Maclean
  • 631
  • 4
  • 14
  • 31
11
votes
5 answers

Java URLConnection error with ntlm authentication, but only on Linux and only Java 7

I am trying to open an http connection to an url protected with the NTLM authentication scheme. This code has been working correctly for 2 year when we were on Java 6.I wrote a small java program which access that particular url to make the test…
Yanick
  • 151
  • 1
  • 1
  • 8
10
votes
2 answers

How to perform an NTLM challenge on the iPhone

I'm trying to access some web services in an iPhone application. If I GET to the .asmx page, I authenticate and get the WSDL as expected. However, if I POST to the .asmx page, setting the SOAPAction, Content-Type, Content-Length, and HTTPBody, I…
Benjamin Autin
  • 4,143
  • 26
  • 34
10
votes
4 answers

Apache HttpClient 4.1.1 NTLM authentication not SPNEGO

The problem here is consuming a web resource that has NTLM authentication while using the Apache HttpClient on the client side. The issue I am having is forcing the client to use NTLM authentication. here is a code sapmle. DefaultHttpClient…
Kelly
  • 111
  • 1
  • 1
  • 5
10
votes
1 answer

What specifically should the domain be for NTLM authentication when using python-requests library?

I am currently trying to access a sharepoint's API via python and the requests library. After inspecting the request via firebug I determined that it was using NTLM authentication so I installed the requests_ntlm plugin but I'm still getting a 401…
Dana Asbury
  • 185
  • 2
  • 2
  • 12