π§Credentialed Enumeration from Linux
π Overview
After gaining initial access and valid domain credentials, the next phase involves deep enumeration of the Active Directory environment. This comprehensive enumeration focuses on gathering detailed information about domain users, computers, groups, Group Policy Objects, permissions, ACLs, trusts, and attack paths using various Linux-based tools.
π― Prerequisites
π Required Credentials
Valid domain user credentials (any permission level)
Cleartext password, NTLM hash, or SYSTEM access on domain-joined host
Minimum privilege: Standard domain user account
π οΈ Key Tools Covered
CrackMapExec (CME): Multi-protocol enumeration and exploitation
SMBMap: SMB share enumeration and interaction
rpcclient: RPC-based enumeration and manipulation
Impacket: Python toolkit for Windows protocol interaction
Windapsearch: LDAP-based domain enumeration
BloodHound.py: AD attack path visualization data collection
π¨ CrackMapExec (CME)
π Overview
CrackMapExec (now NetExec) is a powerful multi-protocol toolkit that leverages Impacket and PowerSploit packages for comprehensive AD assessment. It supports MSSQL, SMB, SSH, and WinRM protocols.
π Basic Syntax and Options
π₯ Domain User Enumeration
Example Output Analysis:
π― Key Information:
badpwdcount: Failed password attempts (useful for password spraying target lists)
baddpwdtime: Last failed authentication timestamp
Account status: Active vs disabled accounts
π·οΈ Domain Group Enumeration
Example Output:
π Groups of Interest:
Domain Admins: Highest privilege group
Backup Operators: Backup and restore privileges
Executives: High-value targets
Engineering/IT groups: Technical privileges
π¨βπ» Logged-On Users Enumeration
Example Output:
π Key Observations:
(Pwn3d!): forend is local admin on this host
Multiple admin users: lab_adm, svc_qualys logged in
High-value targets: Domain admin users active on file server
π Share Enumeration
Example Output:
π·οΈ Share Content Spidering
Example JSON Output:
ποΈ SMBMap
π Overview
SMBMap specializes in SMB share enumeration, providing detailed share listings, permissions, and content exploration capabilities.
π Basic Share Access Check
π Recursive Directory Listing
π rpcclient
π Overview
rpcclient leverages MS-RPC functionality to enumerate, modify, and interact with AD objects. It supports both authenticated and unauthenticated (NULL session) enumeration.
π Establishing Connection
π₯ User Enumeration
π User Information by RID
π RID and SID Understanding
π Impacket Toolkit
π Overview
Impacket provides Python-based tools for interacting with Windows protocols. Two key tools are psexec.py and wmiexec.py.
β‘ psexec.py
π― wmiexec.py
π Windapsearch
π Overview
Windapsearch is a Python script for LDAP-based enumeration of users, groups, and computers.
π Domain Admins Enumeration
π― Privileged Users (Nested Groups)
π©Έ BloodHound.py
π Overview
BloodHound.py is the Python ingestor for BloodHound, collecting AD data for attack path visualization.
π Data Collection
π Output Files
π― HTB Academy Lab Solutions
π Lab Questions & Solutions
π Question 1: "What AD User has a RID equal to Decimal 1170?"
Solution Process:
π₯ Question 2: "What is the membercount: of the 'Interns' group?"
Solution Process:
β‘ Quick Reference Commands
π§ Essential One-Liners
π Key Takeaways
β
Critical Success Factors
Valid credentials are essential - Even low-privilege domain user accounts unlock extensive enumeration
Multiple tools provide different perspectives - Use complementary tools for comprehensive coverage
Save all output to files - Essential for analysis, correlation, and reporting
Focus on privileged groups - Domain Admins, Enterprise Admins, Backup Operators, etc.
π― Strategic Priorities
User enumeration - Identify high-value targets and service accounts
Group membership analysis - Understand privilege relationships
Share exploration - Find sensitive data and configuration files
Session hunting - Locate privileged users on accessible systems
Attack path visualization - Use BloodHound for strategic planning
Credentialed enumeration from Linux provides powerful capabilities for AD assessment - with valid credentials, even low-privilege accounts can reveal extensive domain intelligence for strategic attack planning.
Last updated