ldap
Theldap command is R4t’s primary interface for interacting with Active Directory via the Lightweight Directory Access Protocol. It supports enumeration, modification, object creation and deletion, vulnerability scanning, DACL manipulation, GPO management, and LAPS interaction.
All ldap subcommands use the global authentication and connection flags.
Usage
Subcommands
ldap get
Query and retrieve AD objects.
Object Types
Common Flags
Examples
ldap create
Create new AD objects.
Object Types
Examples
ldap delete
Delete AD objects.
Object Types
ldap modify
Modify attributes on an existing AD object.
Examples
ldap enable
Re-enable a disabled AD object.
Object Types
ldap password
Reset or change an account password.
Examples
ldap query
Execute a raw LDAP search query.
Examples
ldap scan
Scan for AD vulnerabilities and misconfigurations.
- Accounts with no pre-authentication (AS-REP Roastable)
- Accounts with kerberoastable SPNs
- DCSync-capable accounts (Replicating Directory Changes All)
- Accounts with shadow credential opportunities
- Coercible hosts
- Password policy weaknesses
- Domain functional level issues
- Delegation misconfigurations (unconstrained, constrained, resource-based)
- Pre-Windows 2000 compatible access
- NOPAC-vulnerable accounts
ldap recon
Full domain reconnaissance — enumerates users, computers, groups, OUs, GPOs, trusts, domain controllers, and password policies, storing everything in the database.
This is typically the first command run after gaining credentials. It populates the full local database for offline analysis.
ldap dacl
Enumerate and modify Discretionary Access Control Lists (DACLs) on AD objects.
Subcommands
Examples
ldap gplink
Manage Group Policy Object links to containers (OUs, domains, sites).
Subcommands
ldap laps
Interact with LAPS (Local Administrator Password Solution).
Reads
ms-Mcs-AdmPwd (LAPS v1) and msLAPS-Password (LAPS v2) attributes from computer objects.
Examples
ldap gpo
Enumerate Group Policy Objects.
ldap gpo — GPO Enumeration Notes
GPO data is stored in the gpos and gp_link_entries tables in the SQLite database after enumeration.
LDAP Obfuscation
R4t uses theel-dap library, which supports LDAP query obfuscation to evade signature-based detection of LDAP queries. Obfuscation is applied transparently for all ldap subcommand operations when configured.
