NTLM Hash Leaks: Ancient Microsoft Design Flaw
dylankatz.com
dylankatz.com
Windows will do Kerberos by default and avoid NTLM in lots of situations, but it's hard to keep it from being used at all if that's your goal.
Its so hard to get this right these days. I'm just recommending that people move all their clients to Azure AD join and put servers in resource forests.
NTLM has got to go and hardware/virtualization based security like device guard has to become the norm.
Also, many, many places who do upgrade turn on legacy crap to interoperate and never turn them off. It's a lot of work to disable it, and the systems that still use it are usually old crap that isn't budgeted.
No you don't have to specifically enable it, it's still enabled (by default).
Completely disabling NTLM on a network would be a large project and not even Microsoft recommend that because the security gains are relatively small.
(See microsoft.com/pth for their comprehensive credential security guidance)
* Authenticating against a pre-NT 4.0 server * Accessing a domain resource via IP * Accessing a resource on a non-domain member * Accessing a resource on a computer that does not support Kerberos (Windows 3.11, Windows 95, etc.)
It's trivial to force this downgrade on most domains.
What is "disable NTLM", exactly: what does/doesn't happen?
Does it mean that NTLM hashes don't exist any more and therefore can't be sent anywhere?
It really isn't as simple as just flipping a switch and disabling NTLM:
> Microsoft made it very clear that they strongly recommended against disabling NTLM due to incompatibility issues. Instead, they created a system called NTLM Blocking, which requires users to edit their Windows security policies, track event logs, and whitelist applications that need access. This system, while effective if used correctly, is very complicated for normal users to configure and difficult to understand.
It is a complicated affair to fully get your network into 100% Kerberos mode. It will require prior auditing and fixing unless you want to suddenly break things in production (because this configuration is binary).
As a sysadmin myself, I can confidently say that most IT people (I really would say the majority) do not fully understand the authentication mechanisms on an AD network and how authentication happens in the background because Microsoft has actually succeeded in making it very transparent (except when things really break).
Many times Kerberos is not configured correctly in which case thanks to the NTLM fallback things still work and people will be none the wiser (which can be a bad thing precisely because people don't realize it). If you were to suddenly just disable that NTLM altogether, many things will suddenly just stop working.
Kerberos requires manual configuration in many cases (Service Principal Names) and its reliance on working DNS is absolute.
Some examples:
1) Need to connect to a system via IP address for whatever reason? Too bad, without NTLM it's impossible.
2) re: above, what if someone configured a connection string (database connection etc.) somewhere with an IP address? It won't be using Kerberos. Disable NTLM and the connection will just stop working.
3) Want to connect to a laptop that moves around often? Your dynamic DNS entries better be up to date. If the DNS name leads to a different device, you will get an authentication failure regardless of access because you're trying to authenticate with a Kerberos ticket for the wrong machine. See 1.
4) Set up a DNS CNAME (or anything that's not the server's actual hostname where configuration is mostly automatic)? Did you remember to add a Kerberos Service Principal Name for that name in AD? If not, you won't be using Kerberos with those names.
5) Set up a server service (SQL, IIS, etc.)? Is it running under the computer identity or a domain user account? That identity will need the proper Service Principal Name. Did you add one? If not, it won't be using Kerberos. Disable NTLM and the service will simply stop working.
6) Need to connect to a machine not on the domain? Need to connect to a machine on another domain with which you don't have an AD trust in place? You won't be using Kerberos.
To summarize, simply disabling NTLM willy-nilly on an enterprise network is going to be an RGE (resumé generating event).
That's frightening, and I wonder if there are any exploits in the wild which do just that?
I recall being at Defcon in the 90s listening to the cDc folks talking about this.
Ehh. It's Friday and I want some cake.
Having said that, some good old fashioned network segmentation would be a "win", too. Default deny ACLs should be the norm, and hosts sshould only be able to communicate with hosts they actually need to, full stop. (The reactions I get from developers, however, are typically less than pleasant when they learn that environments I administer have such policies, however.)
https://github.com/rapid7/metasploit-framework/blob/master/m...
and/or:
https://github.com/rapid7/metasploit-framework/blob/master/d...
Getting a hash is rather simple, if you already have access to the lan, assuming you are able to redirect traffic or insert yourself between the target user and the network (say, false wifi ap):
https://shellgam3.com/2016/03/14/capturing-and-cracking-ntlm...
I'm generally not much of fan of firewalls (precisely because they by definition set up a "soft core" that's assumed to be safe) - but egress filtering of smb packets is unfortunately necessary if you have an winodws (and/or smb/cifs) clients on your network. I would much rather only run boxes that are "fit for the Internet" - but that's been rather difficult to do with windows for the past decades.
In fairness, Microsoft has made a number of improvements - but still not enough.
It would be nice if there was an easy way to set up the network so all clients used only kerberos5, and only sent credentials to kerberos principals in a trusted domain. As far as I know, there is no such easy way.
See: https://blog.preempt.com/new-ldap-rdp-relay-vulnerabilities-...
Things would arguably be more secure if MS allowed for AD to export the password hashes to other systems. Querying for an NT hash via LDAP over TLS has essentially zero security problems. (Other than the NT hash itself)
If you have MS-CHAP data, you can't convert it to something which will be accepted by kerberos. You MUST send it to AD as MS-CHAP data (i.e. ntlm), and then AD returns "pass / fail"