389 - LDAP
Enumeration
nmap -n -sV --script "ldap* and not brute" <ip> Empty login
ldapsearch -h <ip> -x -s base -b '' "(objectClass=*)" "*" #dump all
ldapsearch -x -h <ip> -D "" -w "" -b "DC=<subdomain>,DC=<tld>" | grep sAMAccountName
ldapsearch -x -h <ip> -D "" -w "" -b "DC=<subdomain>,DC=<tld>" | grep description
ldapsearch -x -h <ip> -D "" -w "" -b "DC=<subdomain>,DC=<tld>" | grep userpasEnumeration with credentials
ldapsearch -x -h <ip> -D '<domain>\<user>' -w '<pass>' -b "<CN string>,DC=<subdomain>,DC=<TLD>"Administrative password
Last updated