<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Windows Authentication Blog : NTLM</title><link>http://blogs.technet.com/authentication/archive/tags/NTLM/default.aspx</link><description>Tags: NTLM</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Migrating from NTLM to Negotiate in a nutshell</title><link>http://blogs.technet.com/authentication/archive/2006/04/27/migrating-from-ntlm-to-negotiate-in-a-nutshell.aspx</link><pubDate>Fri, 28 Apr 2006 03:51:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:426628</guid><dc:creator>Authentication</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/authentication/comments/426628.aspx</comments><wfw:commentRss>http://blogs.technet.com/authentication/commentrss.aspx?PostID=426628</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;BR&gt;Migrating to Negotiate from NTLM is quite simple in most cases.&amp;nbsp; It breaks down into these four simple steps:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;B&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;I&gt;&lt;BR&gt;First, build an SPN for your Service&lt;/I&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;When I talk to people about using Negotiate, there’s often this moment of terror when they realize they’re going to have to build an SPN.&amp;nbsp; I’ve got my theories about why that might be, but suffice it to say you can hold back the terrors.&amp;nbsp; It’s not difficult, and it corresponds to about 90% of the work here.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;The first thing you have to do is pick an &lt;B&gt;SPN prefix&lt;/B&gt;.&amp;nbsp; This should be something unique to your application protocol.&amp;nbsp; For example, if I have an application called “Flying Authentication Thing”, then FlyingAuthenticationThing would be a useful (if not particularly short) SPN prefix.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;The prefix is half the work of building an SPN.&amp;nbsp; The other half is literally putting that prefix in front of your server’s hostname (DNS preferred, netbios if necessary).&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;For example, &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;FlyingAuthenticationThing/my-dev-machine.ntdev.corp.microsoft.com &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;would denote the FlyingAuthenticationThing service on my current development machine.&amp;nbsp; You can do this with the explicitly-blessed DsMakeSpn (see &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ad/ad/dsmakespn.asp"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ad/ad/dsmakespn.asp&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt;), or a simple sprintf.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;B&gt;&lt;I&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;B&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;I&gt;Second, have your Service register the SPN&lt;/I&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;The SPN needs to be associated with the account your server is running as.&amp;nbsp; If this is NetworkService or LocalSystem, that would be the host computer’s account (usually netbios computername$) in the Directory.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Register your SPN when the service gets installed.&amp;nbsp; You only have to do it once.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;You can use &lt;B&gt;DsWriteAccountSpn&lt;/B&gt; (see &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ad/ad/dswriteaccountspn.asp?frame=true"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ad/ad/dswriteaccountspn.asp?frame=true&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt;) to register that SPN.&amp;nbsp; There should already be SPNs on the machine account already.&amp;nbsp; Don’t disturb them… just add yours to the mix.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;The cool thing about registering your SPN is that it’s generally fire-and-forget.&amp;nbsp; If your computer changes names for some reason, most of the SPNs will automatically change with it.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Alternatively, you can use &lt;I&gt;setspn&lt;/I&gt; (a reskit tool, see &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/setspn-o.asp"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/setspn-o.asp&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt;) to write the SPN manually, since you only have to do it at installation time.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;B&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;I&gt;Third, have your client use the Service’s SPN.&lt;/I&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;This may seem obvious, but to get Mutual Auth, you have to actually provide the server name to the client authentication mechanism.&amp;nbsp; It can’t just guess J&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;So, when you’re going to connect to a server (netbios name or dns name), build an SPN out of it the same way your server did above.&amp;nbsp; That is, slap your SPN prefix onto the front of it with a slash in the middle.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Pass the newly-built SPN to your authentication function.&amp;nbsp; In SSPI terms, this would be InitializeSecurityContext’s pszTargetName parameter.&amp;nbsp; Wrappers around SSPI have their own parameters—consult your API documentation.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;B&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;I&gt;Fourth, have your Client and Server call Negotiate instead of NTLM&lt;/I&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Whatever your client or server calls with NTLM, have it call it with Negotiate instead.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;In SSPI terms, this means changing the call to AcquireCredentialsHandle to have “Negotiate” instead of “NTLM”.&amp;nbsp; For RPC, DCOM, or other callers, it will be different, but usually just as simple – swapping, say, RPC_C_AUTHN_WINNT with RPC_C_AUTHN_GSS_SPNEGO.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Consult your API documentation for more on this if you don't use SSPI directly, since there are lots of functions that wrap SSPI in some way.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;…and that’s it!&amp;nbsp; You’re done!&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;One of the cool things about Negotiate is that it tends to know when it's necessary (and safe) to downgrade to NTLM.&amp;nbsp; One of those cases is when no SPN is registered on a server's account.&amp;nbsp; In those cases, the server is obviously downlevel (that is, it hasn't registered an SPN yet), so NTLM will be used.&amp;nbsp; So uplevel clients can talk to downlevel servers.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;Also, because Negotiate is smart enough to accept raw (non-gss-framed) NTLM, the reverse is also true: a downlevel client can talk to an uplevel server.&amp;nbsp; This makes migration far less painful than one might expect from changing authentication protocols.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;-Dave Christiansen&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=426628" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/authentication/archive/tags/NTLM/default.aspx">NTLM</category><category domain="http://blogs.technet.com/authentication/archive/tags/Negotiate/default.aspx">Negotiate</category></item><item><title>NTLM’s time has passed</title><link>http://blogs.technet.com/authentication/archive/2006/04/07/ntlm-s-time-has-passed.aspx</link><pubDate>Fri, 07 Apr 2006 12:45:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:424552</guid><dc:creator>Authentication</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/authentication/comments/424552.aspx</comments><wfw:commentRss>http://blogs.technet.com/authentication/commentrss.aspx?PostID=424552</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: black"&gt;IMHO, Microsoft’s NTLM authentication protocol is getting a bit long on the tooth.&amp;nbsp; Although we still support it for various reasons (many of which are obvious), you should look very sternly upon it if your application uses it.&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: black"&gt;In case you’re not familiar with the NTLM protocol, there’s a great write-up at &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;A title=http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthn/security/microsoft_ntlm.asp href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthn/security/microsoft_ntlm.asp" mce_href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthn/security/microsoft_ntlm.asp"&gt;&lt;FONT color=#0000ff&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthn/security/microsoft_ntlm.asp&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;.&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: black"&gt;There’s really very little reason not to migrate to the Negotiate SSP.&amp;nbsp; If you haven’t considered migrating, you should do so sooner rather than later.&amp;nbsp; The chief benefit of Negotiate is that it will use Kerberos if possible, and can securely downgrade to NTLM if it becomes necessary.&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: black"&gt;The benefits of Kerberos over NTLM are many—these are just a few:&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 10pt; COLOR: blue; LINE-HEIGHT: normal; mso-list: l0 level1 lfo1; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .5in"&gt;&lt;SPAN style="COLOR: black"&gt;&lt;FONT face=Calibri size=3&gt;Huge performance improvement, mostly for server applications&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 10pt; COLOR: blue; LINE-HEIGHT: normal; mso-list: l0 level1 lfo1; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .5in"&gt;&lt;SPAN style="COLOR: black"&gt;&lt;FONT face=Calibri size=3&gt;Kerberos is an open standard with a thriving community.&amp;nbsp; NTLM is a proprietary protocol, and we’re looking for ways to deprecate it.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 10pt; COLOR: blue; LINE-HEIGHT: normal; mso-list: l0 level1 lfo1; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .5in"&gt;&lt;SPAN style="COLOR: black"&gt;&lt;FONT face=Calibri size=3&gt;NTLM is a four-letter word.&amp;nbsp; Kerberos has &lt;I&gt;twice&lt;/I&gt; as many letters.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 10pt; COLOR: blue; LINE-HEIGHT: normal; mso-list: l0 level1 lfo1; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .5in"&gt;&lt;SPAN style="COLOR: black"&gt;&lt;FONT face=Calibri size=3&gt;Kerberos in &lt;?xml:namespace prefix = u1 /&gt;&lt;u1:place u2:st="on"&gt;Vista&lt;/u1:place&gt; will support the AES encryption type.&amp;nbsp; NTLM won’t.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 10pt; COLOR: blue; LINE-HEIGHT: normal; mso-list: l0 level1 lfo1; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .5in"&gt;&lt;SPAN style="COLOR: black"&gt;&lt;FONT face=Calibri size=3&gt;Kerberos supports several modes of delegation.&amp;nbsp; NTLM doesn’t support any.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;SPAN style="COLOR: black"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;BR&gt;&lt;FONT face=Calibri size=3&gt;But if these weren’t enough, there’s always the general security factor.&amp;nbsp; Of the three flavors of NTLM (LM, NTLM, and NTLMv2), only v2 holds a candle to Kerberos in terms of security.&amp;nbsp; Unfortunately, you can’t actually rely on people deploying NTLMv2 correctly, and even if you could, you &lt;I&gt;still&lt;/I&gt; wouldn’t be as safe as you were if you were using Kerberos.&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: black"&gt;Let’s look a little closer at those last two assertions, shall we?&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;H2 style="MARGIN: 12pt 0in 3pt"&gt;&lt;EM&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 'Calibri','sans-serif'; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Arial; mso-bidi-font-size: 18.0pt"&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;EM&gt;&lt;SPAN style="FONT-SIZE: 13pt; COLOR: black; FONT-STYLE: normal; FONT-FAMILY: 'Calibri','sans-serif'; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Arial; mso-bidi-font-size: 18.0pt; mso-bidi-font-style: italic"&gt;&lt;U&gt;You can’t rely on NTLMv2 being deployed correctly&lt;/U&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/H2&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: black"&gt;I’ve heard talk that NTLMv2 is cryptographically equivalent to Win2003 Kerberos (because both use RC4/HMAC).&amp;nbsp; This is more or less true.&amp;nbsp; However, if your application’s security depends on this strength of crypto being used, you are pinning lots of hope on a very sick donkey.&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: black"&gt;First off, in order to use RC4 with NTLM, you need NTLMv2.&amp;nbsp; NTLMv2 will only be negotiated if your LmCompatibilityLevel is set correctly (see &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;A title=http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gp/576.asp href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gp/576.asp" mce_href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gp/576.asp"&gt;&lt;FONT color=#0000ff&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gp/576.asp&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt; for what this means).&amp;nbsp; This is an extra step that many system administrators may or may not actually do depending on what Operating Systems are present in the deployment.&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: black"&gt;As if this weren’t enough, setting this key to ensure NTLMv2 (since v1 and LM are &lt;I&gt;Right Out&lt;/I&gt;) is negotiated effectively cuts off a machine (or a domain) from authentication using older versions of Windows.&amp;nbsp; Obviously, MS does not support those, but let’s be honest: some deployments still use them.&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: black"&gt;So, a deployment that contains, say, Windows NT 3.51, would be unable to deploy NTLMv2.&amp;nbsp; For this reason, you can’t count on system administrators requiring NTLMv2 and thus cannot rely on it to secure your application protocol.&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: black"&gt;Note that it’s safe to use Negotiate in these environments, even though NTLMv2 may not be available, because Negotiate can determine that Kerberos can’t be used to a target server and will drop down to whatever version of NTLM the deployment is configured for.&amp;nbsp;&amp;nbsp; This allows you to actually get Kerberos in situations where it is possible to use without forsaking NTLM for the situations where it is necessary.&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;H2 style="MARGIN: 12pt 0in 3pt"&gt;&lt;EM&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-STYLE: normal; FONT-FAMILY: 'Calibri','sans-serif'; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Arial; mso-bidi-font-size: 18.0pt; mso-bidi-font-style: italic"&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;EM&gt;&lt;SPAN style="FONT-SIZE: 13pt; COLOR: black; FONT-STYLE: normal; FONT-FAMILY: 'Calibri','sans-serif'; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Arial; mso-bidi-font-size: 18.0pt; mso-bidi-font-style: italic"&gt;&lt;U&gt;Mutual Authentication&lt;/U&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue; FONT-FAMILY: 'Calibri','sans-serif'; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Arial; mso-bidi-font-size: 18.0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/H2&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: black"&gt;The biggest problem with NTLM, in my opinion, is that all flavors of it lack support for server auth.&amp;nbsp; Some have claimed that NTLM has mutual auth because the server produces a challenge after contacting its DC over the netlogon secure channel so the “server” is really the DC you contacted, but this isn’t mutual auth.&amp;nbsp; It would be server auth if you were sending messages to the DC, but you’re not—you’re sending them to a file server or a mail server, or whatnot.&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: black"&gt;So: all NTLM can actually guarantee a client application is that it’s talking to &lt;I&gt;someone&lt;/I&gt; with a secure channel.&amp;nbsp; Yeah, it’s better than nothing, but it may not be enough.&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: black"&gt;Consider a file server.&amp;nbsp; If I want to hit a central install-point for my domain software (&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;A title=file://foo/bar/baz/InstallStuff.exe href="file://foo/bar/baz/InstallStuff.exe" mce_href="file://foo/bar/baz/InstallStuff.exe"&gt;&lt;FONT color=#0000ff&gt;\\foo\bar\baz\InstallStuff.exe&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;), then I want to authenticate to &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;A title=file://foo/ href="file://foo/" mce_href="file://foo/"&gt;&lt;FONT color=#0000ff&gt;\\foo&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;, and then ask it to start sending bits for InstallStuff.exe to me.&amp;nbsp; In this scenario, I don’t know whether &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;A title=file://foo/ href="file://foo/" mce_href="file://foo/"&gt;&lt;FONT color=#0000ff&gt;\\foo&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt; is really &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;A title=file://foo/ href="file://foo/" mce_href="file://foo/"&gt;&lt;FONT color=#0000ff&gt;\\foo&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;, or whether it might be some rogue server that happens to be joined to the same domain, or some other server somewhere in my domain that’s been penetrated.&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;H2 style="MARGIN: 12pt 0in 3pt"&gt;&lt;EM&gt;&lt;SPAN style="FONT-SIZE: 13pt; COLOR: black; FONT-FAMILY: 'Calibri','sans-serif'; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Arial; mso-bidi-font-size: 18.0pt"&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;EM&gt;&lt;SPAN style="FONT-SIZE: 13pt; COLOR: black; FONT-STYLE: normal; FONT-FAMILY: 'Calibri','sans-serif'; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Arial; mso-bidi-font-size: 18.0pt; mso-bidi-font-style: italic"&gt;&lt;U&gt;Call to Action: Migrate to Negotiate!&lt;/U&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-SIZE: 13pt; COLOR: blue; FONT-FAMILY: 'Calibri','sans-serif'; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Arial; mso-bidi-font-size: 18.0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/H2&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: black"&gt;If your application is currently using NTLM, you should migrate to Negotiate sooner, rather than later.&amp;nbsp; Negotiate is smart enough today to know when Kerberos should be used, and when using NTLM is safe.&amp;nbsp; Negotiate also gives applications a chance of using new authentication protocols when they come out.&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="COLOR: black"&gt;&lt;BR&gt;&lt;FONT face=Calibri size=3&gt;I’ll write again on the specifics of &lt;I&gt;how&lt;/I&gt; to migrate later, but hopefully this entry will get people started thinking about whether they really &lt;I&gt;need&lt;/I&gt; NTLM, and keep developers from writing new code that uses it.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="COLOR: black"&gt;&lt;BR&gt;&lt;FONT face=Calibri size=3&gt;- David Christiansen&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=424552" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/authentication/archive/tags/NTLM/default.aspx">NTLM</category></item></channel></rss>