Description: Query looks for machines using weak authentication types LM/NTLM which use weak encryption algorithms that are almost as similar to sending passwords in plain text. NTLM is also old and vulnerable to relay attacks. Ensuring all devices only use NTLMv2 or higher and refuse LM/NTLM is absolutely necessary, anything below it is a critical security concern and should be re-mediated as soon as possible.
What The Data Shows: Provides the registry value of all devices, the compatibility reg key which value should always be 5.
EDIT: updated the query to only show devices that do not have the "lmcompatibility" reg key value equal to 5 since we are only concerned about devices that allow LM/NTLM).
SQL:
SELECT
CASE COUNT(*)
WHEN 0 THEN "FALSE"
ELSE "TRUE"
END "NTLMv2 Only Enabled"
FROM registry
WHERE path='HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Lsa\\LMCompatibilityLevel'
AND data != 5;