Skip to content

Commit

Permalink
Merge pull request #19678 from smashery/pre2k-ldap-query
Browse files Browse the repository at this point in the history
Added LDAP query searching for likely Pre-Windows-2000 computers
  • Loading branch information
smcintyre-r7 authored Nov 25, 2024
2 parents d5b71aa + 7f6bdb3 commit 530dbd6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
14 changes: 14 additions & 0 deletions data/auxiliary/gather/ldap_query/ldap_queries_default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
filter: '(&(userAccountControl=4128))'
attributes:
- cn
- displayName
- description
- sAMAccountName
- userPrincipalName
- logonCount
- userAccountControl
references:
- https://www.thehacker.recipes/ad/movement/builtins/pre-windows-2000-computers
- https://trustedsec.com/blog/diving-into-pre-created-computer-accounts
3 changes: 2 additions & 1 deletion docs/metasploit-framework.wiki/Metasploit-Guide-LDAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ This module has a selection of inbuilt queries which can be configured via the `
- `ENUM_COMPUTERS` - Dump all objects containing an objectCategory or objectClass of Computer.
- `ENUM_CONSTRAINED_DELEGATION` - Dump info about all known objects that allow constrained delegation.
- `ENUM_DNS_RECORDS` - Dump info about DNS records the server knows about using the dnsNode object class.
- `ENUM_DNS_ZONES` - Dump info about DNS zones the server knows about using the dnsZone object class under the DC DomainDnsZones. This isneeded - as without this BASEDN prefix we often miss certain entries.
- `ENUM_DNS_ZONES` - Dump info about DNS zones the server knows about using the dnsZone object class under the DC DomainDnsZones. This is needed - as without this BASEDN prefix we often miss certain entries.
- `ENUM_DOMAIN` - Dump info about the Active Directory domain.
- `ENUM_DOMAIN_CONTROLLERS` - Dump all known domain controllers.
- `ENUM_EXCHANGE_RECIPIENTS` - Dump info about all known Exchange recipients.
Expand All @@ -96,6 +96,7 @@ This module has a selection of inbuilt queries which can be configured via the `
- `ENUM_USER_PASSWORD_NEVER_EXPIRES` - Dump info about all users whose password never expires.
- `ENUM_USER_PASSWORD_NOT_REQUIRED` - Dump info about all users whose password never expires and whose account is still enabled.
- `ENUM_USER_SPNS_KERBEROAST` - Dump info about all user objects with Service Principal Names (SPNs) for kerberoasting.
- `ENUM_PRE_WINDOWS_2000_COMPUTERS` - Dump info about all computer objects likely created as a "pre-Windows 2000 computer", for which the password might be predictable.

### Kerberos Authentication

Expand Down

0 comments on commit 530dbd6

Please sign in to comment.