🐧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

  1. User enumeration - Identify high-value targets and service accounts

  2. Group membership analysis - Understand privilege relationships

  3. Share exploration - Find sensitive data and configuration files

  4. Session hunting - Locate privileged users on accessible systems

  5. 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