Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/data/auxiliary/gather/ldap_query/ldap_queries_default.yaml
Views: 11784
---1queries:2- action: ENUM_ACCOUNTS3description: 'Dump info about all known user accounts in the domain.'4filter: '(|(objectClass=organizationalPerson)(sAMAccountType=805306368)(objectcategory=user)(objectClass=user))'5attributes:6- dn7- name8- description9- displayName10- sAMAccountName11- objectSID12- userPrincipalName13- userAccountControl14- homeDirectory15- homeDrive16- profilePath17- memberof18- lastLogoff19- lastLogon20- lastLogonDate21- logonCount22- badPwdCount23- pwdLastSet24- SmartcardLogonRequired25- LastBadPasswordAttempt26- PasswordLastSet27- PaswordNeverExpires28references:29- http://www.ldapexplorer.com/en/manual/109050000-famous-filters.htm30- https://adsecurity.org/wp-content/uploads/2016/08/DEFCON24-2016-Metcalf-BeyondTheMCSE-RedTeamingActiveDirectory.pdf31- action: ENUM_AD_CS_CAS32description: 'Enumerate AD Certificate Service certificate authorities.'33base_dn_prefix: 'CN=Enrollment Services,CN=Public Key Services,CN=Services,CN=Configuration'34filter: '(objectClass=pKIEnrollmentService)'35attributes:36- cn37- name38- cACertificateDN39- dNSHostname40- certificateTemplates41- objectGUID42- caCertificate43references:44- https://aaroneg.com/post/2018-05-15-enterprise-ca/45- action: ENUM_AD_CS_CERT_TEMPLATES46description: 'Enumerate AD Certificate Service certificate templates.'47base_dn_prefix: 'CN=Certificate Templates,CN=Public Key Services,CN=Services,CN=Configuration'48filter: '(objectClass=pkicertificatetemplate)'49attributes:50- cn51- name52- displayName53- msPKI-Cert-Template-OID54- msPKI-Template-Schema-Version55- msPKI-Enrollment-Flag56- msPKI-Certificate-Name-Flag57- msPKI-Private-Key-Flag58- msPKI-RA-Signature59- pKIExtendedKeyUsage60references:61- https://web.archive.org/web/20220818094600if_/https://specterops.io/assets/resources/Certified_Pre-Owned.pdf62- action: ENUM_ADMIN_OBJECTS63description: 'Dump info about all objects with protected ACLs (i.e highly privileged objects).'64filter: '(adminCount=1)'65attributes:66- dn67- description68- distinguishedName69- name70- samAccountName71- objectSID72- objectGUID73- objectCategory74- member75- memberof76references:77- https://troopers.de/downloads/troopers19/TROOPERS19_AD_Fun_With_LDAP.pdf78- action: ENUM_ALL_OBJECT_CATEGORY79description: 'Dump all objects containing any objectCategory field.'80filter: '(objectCategory=*)'81attributes:82- dn83- objectCategory84- action: ENUM_ALL_OBJECT_CLASS85description: 'Dump all objects containing any objectClass field.'86filter: '(objectClass=*)'87attributes:88- dn89- objectClass90- action: ENUM_COMPUTERS91description: 'Dump all objects containing an objectCategory or objectClass of Computer.'92filter: '(|(objectCategory=computer)(objectClass=computer))'93attributes:94- dn95- name96- description97- displayName98- sAMAccountName99- objectSID100- distinguishedName101- dNSHostName102- givenName103- operatingSystem104- operatingSystemVersion105- operatingSystemServicePack106- lastLogonTimestamp107- servicePrincipalName108- primaryGroupId109references:110- http://www.ldapexplorer.com/en/manual/109050000-famous-filters.htm111- https://adsecurity.org/wp-content/uploads/2016/08/DEFCON24-2016-Metcalf-BeyondTheMCSE-RedTeamingActiveDirectory.pdf112- action: ENUM_CONSTRAINED_DELEGATION113description: 'Dump info about all known objects that allow contrained delegation.'114filter: '(userAccountControl:1.2.840.113556.1.4.803:=16777216)'115attributes:116- cn117- sAMAccountName118- objectCategory119- msds-allowedtodelegateto120- servicePrincipalName121references:122- https://learn.microsoft.com/en-us/troubleshoot/windows-server/identity/useraccountcontrol-manipulate-account-properties123- https://www.ired.team/offensive-security-experiments/active-directory-kerberos-abuse/abusing-kerberos-constrained-delegation124- action: ENUM_DNS_RECORDS125description: 'Dump info about DNS records the server knows about using the dnsNode object class.'126filter: '(objectClass=dnsNode)'127attributes:128- dc129- cn130- dnsRecord131- dnsTombstoned132- name133references:134- https://www.netspi.com/blog/technical/network-penetration-testing/exploiting-adidns/135- https://github.com/dirkjanm/krbrelayx/blob/master/dnstool.py136- action: ENUM_DNS_ZONES137description: 'Dump all known DNS zones using the dnsZone object class under the DC DomainDnsZones. Without A BASEDN prefix you can miss certain entries.'138filter: '(objectClass=dnsZone)'139base_dn_prefix: 'DC=DomainDnsZones'140attributes:141- name142- distinguishedName143references:144- https://github.com/PowerShellMafia/PowerSploit/blob/master/Recon/PowerView.ps1145- action: ENUM_DOMAIN146description: 'Dump info about the Active Directory domain.'147filter: '(objectClass=domain)'148attributes:149- ms-DS-MachineAccountQuota150- objectSID151- name152- lockoutduration153- lockoutthreshold154- minpwdage155- maxpwdage156- minpwdlength157- action: ENUM_DOMAIN_CONTROLLERS158description: 'Dump all known domain controllers.'159filter: '(&(objectCategory=Computer)(userAccountControl:1.2.840.113556.1.4.803:=8192))'160attributes:161- dn162- displayName163- distinguishedName164- dNSHostName165- description166- givenName167- name168- operatingSystem169- operatingSystemVersion170- operatingSystemServicePack171references:172- http://www.ldapexplorer.com/en/manual/109050000-famous-filters.htm173- https://adsecurity.org/wp-content/uploads/2016/08/DEFCON24-2016-Metcalf-BeyondTheMCSE-RedTeamingActiveDirectory.pdf174- action: ENUM_EXCHANGE_RECIPIENTS175description: 'Dump info about all known Exchange recipients.'176filter: '(|(mailNickname=*)(proxyAddresses=FAX:*))'177attributes:178- dn179- mailNickname180- proxyAddresses181- name182references:183- http://www.ldapexplorer.com/en/manual/109050000-famous-filters.htm184- action: ENUM_EXCHANGE_SERVERS185description: 'Dump info about all known Exchange servers.'186filter: '(&(objectClass=msExchExchangeServer)(!(objectClass=msExchExchangeServerPolicy)))'187attributes:188- dn189- displayName190- distinguishedName191- dNSHostName192- description193- givenName194- name195- operatingSystem196- operatingSystemVersion197- operatingSystemServicePack198references:199- http://www.ldapexplorer.com/en/manual/109050000-famous-filters.htm200- https://adsecurity.org/wp-content/uploads/2016/08/DEFCON24-2016-Metcalf-BeyondTheMCSE-RedTeamingActiveDirectory.pdf201- action: ENUM_GMSA_HASHES202description: 'Dump info about GMSAs and their password hashes if available.'203filter: '(objectClass=msDS-GroupManagedServiceAccount)'204attributes:205- cn206- displayName207- msDS-ManagedPassword208references:209- https://stealthbits.com/blog/securing-gmsa-passwords/210- https://o365blog.com/post/gmsa/211- https://adsecurity.org/?p=4367212- action: ENUM_GROUPS213description: 'Dump info about all known groups in the LDAP environment.'214filter: '(|(objectClass=group)(objectClass=groupOfNames)(groupType:1.2.840.113556.1.4.803:=2147483648)(objectClass=posixGroup)(objectcategory=group))'215attributes:216- cn217- name218- description219- groupType220- memberof221- member222- owner223- adminCount224- managedBy225- groupAttributes226- objectSID227references:228- http://www.ldapexplorer.com/en/manual/109050000-famous-filters.htm229- action: ENUM_GROUP_POLICY_OBJECTS230description: 'Dump info about all known Group Policy Objects (GPOs) in the LDAP environment.'231filter: '(objectClass=groupPolicyContainer)'232attributes:233- displayName234- gPCFileSysPath235- objectCategory236- objectGUID237references:238- https://troopers.de/downloads/troopers19/TROOPERS19_AD_Fun_With_LDAP.pdf239- action: ENUM_HOSTNAMES240description: 'Dump info about all known hostnames in the LDAP environment.'241filter: '(dnsHostName=*)'242attributes:243- dn244- name245- dnsHostName246- serverName247references:248- https://troopers.de/downloads/troopers19/TROOPERS19_AD_Fun_With_LDAP.pdf249- https://github.com/PowerShellMafia/PowerSploit/blob/master/Recon/PowerView.ps1250- action: ENUM_LAPS_PASSWORDS251description: 'Dump info about computers that have LAPS enabled, and passwords for them if available.'252filter: '(ms-MCS-AdmPwd=*)'253attributes:254- cn255- displayName256- ms-MCS-AdmPwd257references:258- https://ppn.snovvcrash.rocks/pentest/infrastructure/ad/ldap-ldaps259- action: ENUM_LDAP_SERVER_METADATA260description: 'Dump metadata about the setup of the domain.'261filter: '(objectClass=*)'262attributes:263- dn264- defaultNamingContext265- domainFunctionality266- forestFunctionality267- domainControllerFunctionality268- dnsHostName269references:270- https://troopers.de/downloads/troopers19/TROOPERS19_AD_Fun_With_LDAP.pdf271- action: ENUM_MACHINE_ACCOUNT_QUOTA272description: 'Dump the number of computer accounts a user is allowed to create in a domain.'273filter: '(objectClass=domain)'274attributes:275- ms-DS-MachineAccountQuota276references:277- https://learn.microsoft.com/en-us/windows/win32/adschema/a-ms-ds-machineaccountquota278- action: ENUM_ORGROLES279description: 'Dump info about all known organization roles in the LDAP environment.'280filter: '(objectClass=organizationalRole)'281attributes:282- displayName283- name284- description285- action: ENUM_ORGUNITS286description: 'Dump info about all known organizational units in the LDAP environment.'287filter: '(objectClass=organizationalUnit)'288attributes:289- displayName290- name291- description292references:293- http://www.ldapexplorer.com/en/manual/109050000-famous-filters.htm294- action: ENUM_UNCONSTRAINED_DELEGATION295description: 'Dump info about all known objects that allow unconstrained delegation.'296filter: '(userAccountControl:1.2.840.113556.1.4.803:=524288)'297attributes:298- cn299- sAMAccountName300- objectCategory301- memberof302- member303references:304- https://www.ired.team/offensive-security-experiments/active-directory-kerberos-abuse/domain-compromise-via-unrestricted-kerberos-delegation305- https://learn.microsoft.com/en-us/troubleshoot/windows-server/identity/useraccountcontrol-manipulate-account-properties306- action: ENUM_USER_ACCOUNT_DISABLED307description: 'Dump info about disabled user accounts.'308filter: '(userAccountControl:1.2.840.113556.1.4.803:=2)'309attributes:310- cn311- displayName312- description313- sAMAccountName314- userPrincipalName315- userAccountControl316- action: ENUM_USER_ACCOUNT_LOCKED_OUT317description: 'Dump info about locked out user accounts.'318filter: '(userAccountControl:1.2.840.113556.1.4.803:=16)'319attributes:320- cn321- displayName322- sAMAccountName323- userPrincipalName324- userAccountControl325references:326- https://learn.microsoft.com/en-us/troubleshoot/windows-server/identity/useraccountcontrol-manipulate-account-properties327- action: ENUM_USER_ASREP_ROASTABLE328description: 'Dump all users who are configured not to require kerberos pre-authentication, i.e. AS-REP roastable.'329filter: '(&(samAccountType=805306368)(userAccountControl:1.2.840.113556.1.4.803:=4194304))'330attributes:331- cn332- displayName333- description334- sAMAccountName335- userPrincipalName336- userAccountControl337references:338- http://www.ldapexplorer.com/en/manual/109050000-famous-filters.htm339- https://burmat.gitbook.io/security/hacking/domain-exploitation340- action: ENUM_USER_PASSWORD_NEVER_EXPIRES341description: 'Dump info about all users whose password never expires.'342filter: '(userAccountControl:1.2.840.113556.1.4.803:=65536)'343attributes:344- cn345- displayName346- description347- sAMAccountName348- userPrincipalName349- userAccountControl350references:351- https://learn.microsoft.com/en-us/troubleshoot/windows-server/identity/useraccountcontrol-manipulate-account-properties352- action: ENUM_USER_PASSWORD_NOT_REQUIRED353description: 'Dump info about all users whose password never expires and whose account is still enabled.'354filter: '(&(userAccountControl:1.2.840.113556.1.4.803:=32)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))'355attributes:356- cn357- displayName358- description359- sAMAccountName360- userPrincipalName361- userAccountControl362references:363- https://learn.microsoft.com/en-us/troubleshoot/windows-server/identity/useraccountcontrol-manipulate-account-properties364- action: ENUM_USER_SPNS_KERBEROAST365description: 'Dump info about all user objects with Service Principal Names (SPNs) for kerberoasting.'366filter: '(&(&(servicePrincipalName=*)(userAccountControl:1.2.840.113556.1.4.803:=512))(!(userAccountControl:1.2.840.113556.1.4.803:=2)))'367attributes:368- cn369- sAMAccountName370- servicePrincipalName371references:372- https://malicious.link/post/2022/ldapsearch-reference/373- https://burmat.gitbook.io/security/hacking/domain-exploitation374- https://learn.microsoft.com/en-us/troubleshoot/windows-server/identity/useraccountcontrol-manipulate-account-properties375376377