Information Gathering
ldapsearch is a shell-accessible interface to the ldap_search_ext library function, designed to open active queries against corporate Active Directory database frameworks.
sudo apt install ldap-utils
ldapsearch [options]
LDAPsearch is a command-line tool from the OpenLDAP project for querying LDAP directories. It sends LDAP search requests to directory servers and returns matching entries, making it essential for Active Directory enumeration.
In Windows environments, Active Directory stores all domain information in an LDAP-accessible directory. LDAPsearch can query this directory to enumerate users, groups, computers, organizational units, group policies, and domain trusts.
The tool supports complex LDAP filters for precise queries, attribute selection for targeted data extraction, and various output formats. It is the foundation tool for AD enumeration in penetration testing.
ldapsearch -x -h 192.168.1.1 -b "dc=example,dc=com"Anonymous search - Query target LDAP directory schemas using simple authentication modelsldapsearch -x -H ldap://192.168.1.1 -s base namingcontextsGet base DNldapsearch -x -H ldap://192.168.1.1 -b "DC=domain,DC=com"Dump all objectsldapsearch -x -H ldap://192.168.1.1 -b "DC=domain,DC=com" "(objectClass=user)"List usersldapsearch -x -H ldap://192.168.1.1 -b "DC=domain,DC=com" "(objectClass=group)"List groupsldapsearch -x -H ldap://192.168.1.1 -D "user@domain.com" -W -b "DC=domain,DC=com"Authenticated queryldapsearch -x -h 192.168.1.100 -b 'DC=example,DC=com'Basic LDAP searchldapsearch -x -h 192.168.1.100 -b 'DC=example,DC=com' '(objectClass=user)'Search for user objectsldapsearch -x -h 192.168.1.100 -b 'DC=example,DC=com' '(objectClass=computer)'Search for computer objectsldapsearch -x -h 192.168.1.100 -b 'DC=example,DC=com' '(memberOf=CN=Admins)'Search by group membershipldapsearch -x -h 192.168.1.100 -b 'DC=example,DC=com' -D 'CN=admin,DC=example,DC=com' -WAuthenticated bindldapsearch -x -h 192.168.1.100 -b 'DC=example,DC=com' '(servicePrincipalName=*)' servicePrincipalNameKerberoastable accountsldapsearch -x -h 192.168.1.100 -b 'DC=example,DC=com' '(userAccountControl:1.2.840.113556.1.4.803:=8192)'Find domain controllersldapsearch -x -h 192.168.1.100 -b 'CN=Configuration,DC=example,DC=com' '(objectClass=domainDNS)'Query configuration partitionldapsearch -x -h 192.168.1.100 -b 'DC=example,DC=com' '(adminCount=1)'Find privileged accountsldapsearch -x -h 192.168.1.100 -b 'DC=example,DC=com' '(userAccountControl:1.2.840.113556.1.4.803:=524288)'Find trusted delegationldapsearch -x -h 192.168.1.100 -b 'DC=example,DC=com' -E pr=1000/noprintPage results at 1000ldapsearch -x -h 192.168.1.100 -b 'DC=example,DC=com' -LLLSuppress headersldapsearch -x -h 192.168.1.100 -b 'DC=example,DC=com' -ZStartTLS encryptionldapsearch -x -h 192.168.1.100 -b 'DC=example,DC=com' '(objectClass=gPObj)'Find Group Policy objectsldapsearch -x -h 192.168.1.100 -b 'CN=Users,DC=example,DC=com' cn memberOfReturn specific attributesExtract all user accounts from Active Directory.
Enumerate security groups and their members.
Discover domain-joined computers and their details.
Query Group Policy Objects and configurations.
Discover domain trusts and forest relationships.
Information Gathering
Learn how to use Enum4linux to enumerate Windows and Samba systems over SMB: install it on Kali Linux, run your first scan, read the users, shares, groups and password policy it returns, and switch to enum4linux-ng for modern hosts that block null sessions.
Post Exploitation
BloodHound uses graph theory to reveal the hidden and often unintended relationships within an Active Directory or Azure environment, allowing attackers or defenders to identify complex attack paths.
Information Gathering
Netdiscover is an active/passive ARP reconnaissance tool for discovering live hosts on a network. It sends ARP requests and listens for responses to identify devices, IP addresses, MAC addresses, and vendor information without performing port scans.
Information Gathering
Learn how to use Nmap, the free open-source network scanner: run your first port scan, discover live hosts, detect services and operating systems, and check for vulnerabilities with NSE scripts — a beginner tutorial for Kali Linux.
Information Gathering
RustScan is a modern, high-speed port scanner built in Rust that can find all open ports within seconds and automatically pipes them directly into Nmap for deeper script processing.
Information Gathering
Masscan is an internet-scale port scanner. It can scan the entire Internet in under 6 minutes, transmitting up to 10 million packets per second utilizing asynchronous transmit setups.
Comprehensive guide to Active Directory enumeration using native tools, PowerShell, and specialized utilities for discovering users, groups, computers, and trust relationships.
Active Directory · AdvancedA comprehensive introduction to Microsoft Active Directory covering domain services, LDAP, Group Policy, authentication protocols, and security fundamentals for Windows enterprise environments.
Active Directory · AdvancedKerberos authentication and attacks explained for penetration testers. Deep dive into TGT, TGS, KRBTGT account, Kerberoasting vs AS-REP roasting, and Golden Ticket attacks.
OSINT · IntermediateLearn a complete reconnaissance workflow combining OSINT, DNS enumeration, subdomain discovery, and active scanning for comprehensive target profiling.
This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.