-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added LDAP query searching for likely Pre-Windows-2000 computers #19678
Conversation
@@ -373,3 +373,17 @@ queries: | |||
- https://malicious.link/post/2022/ldapsearch-reference/ | |||
- https://burmat.gitbook.io/security/hacking/domain-exploitation | |||
- https://learn.microsoft.com/en-us/troubleshoot/windows-server/identity/useraccountcontrol-manipulate-account-properties | |||
- action: ENUM_PRE_WINDOWS_2000_COMPUTERS | |||
description: 'Dump info about all computer objects likely created as a "pre-Windows 2000 computer", for which the password might be predictable.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think in this scenario the identified computer objects should be registered as a vulnerability in the database? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not. At this point we don't know for sure that the password is weak, and if it is, that should be reported by the module who successfully authenticates with it. Saying that the password was recovered through some means is a more meaningful representation of the vulnerability where as looking for pre-Windows 2000 computers is more akin to target generation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
metasploit-framework (S:0 J:0) auxiliary(gather/ldap_query) > run
[*] Running module against 192.168.159.10
[+] Successfully bound to the LDAP server!
[*] 192.168.159.10:389 Discovered base DN: DC=msflab,DC=local
CN=IMINDANGER,CN=Computers,DC=msflab,DC=local
=============================================
Name Attributes
---- ----------
cn IMINDANGER
logoncount 0
samaccountname IMINDANGER$
useraccountcontrol 4128
[*] Query returned 1 result.
[*] Auxiliary module execution completed
metasploit-framework (S:0 J:0) auxiliary(gather/ldap_query) >
Release NotesThis adds a new LDAP query to enumerate computer accounts that were created with the "pre-Windows 2000 computer" option. These accounts may have weak passwords that can be brute-forced. |
This PR implements a search for computer accounts created with the "Assign this computer account as a pre-Windows 2000 computer" checkbox marked. These accounts are initially created with their own computer name (sans dollar-sign, all lowercase) as the password. We also return the logon count attribute; if it's zero, it's highly likely that the password hasn't been changed.
Verification
msfconsole
use ldap_query
set action ENUM_PRE_WINDOWS_2000_COMPUTERS
run
logonCount
attribute included.Demo