Back to services
directory389/tcp/udp

LDAP

LDAPLDAPSDirectory Services

LDAP (Lightweight Directory Access Protocol) accesses directory services. Unauthenticated binds allow anonymous queries to leak users, groups, and device information.

Ports

PortProtocolDescription
389tcp/udpLDAP
636tcpLDAPS
3268tcpGlobal Catalog
3269tcpGlobal Catalog SSL

Fingerprints

Banner / ProbeExpected Response
nmap -sV -p <port> <target>Service banner and version info
nc -nv <target> <port>Raw banner grab

Key Files

PathDescription
C:\Windows\NTDS\ntds.ditAD database with all password hashes
C:\Windows\System32\config\SAMLocal SAM password hashes
C:\Windows\System32\config\SYSTEMSystem hive (boot key for hash decryption)
C:\Windows\System32\config\SECURITYSecurity policy and cached domain credentials
%USERPROFILE%\AppData\Roaming\Microsoft\Credentials\Saved Windows credentials

Default Credentials

UsernamePasswordContext
adminadminGeneric admin account
rootrootGeneric root account

Known CVEs

IdentifierTypeDescription
CVE-2017-14175RCEOpenLDAP RCE via BER decoding

Exploitation Primitives

TechniqueTool / CommandResult
Null Bindldapsearch -x -h <target> -b "dc=domain,dc=com"Anonymous LDAP query
LDAP Injection?user=admin*)(uid=*))LDAP filter injection

Notes

Always start with full port scan: `nmap -sV -sC -p- <target>`.

Check for default credentials before brute-forcing.

Use service-specific NSE scripts: `nmap --script <service>-* -p <port> <target>`.

Remember to check both IPv4 and IPv6 if applicable.

Seen on

ShodanCensysFOFAZoomEye

References