π₯Password Spraying - Target User Lists
π Overview
Creating an accurate and comprehensive user list is the foundation of successful password spraying attacks. This process involves gathering valid domain usernames through various enumeration techniques, while respecting account lockout policies to avoid disrupting operations.
π― Why User Enumeration Matters
π Attack Prerequisites
Valid Target List: Password spraying requires accurate usernames
Lockout Avoidance: Must avoid triggering account lockouts
Efficiency: Larger, accurate lists improve success rates
Stealth: Some methods generate fewer logs than others
β οΈ Critical Considerations
Password Policy: Must be known before spraying
Account Monitoring: Track
badpwdcountvaluesDocumentation: Log all activities for client reference
Timing: Coordinate attempts based on lockout windows
π SMB NULL Session Enumeration
π enum4linux - User Enumeration
Example Output:
π§ rpcclient - User Enumeration
β‘ CrackMapExec - Enhanced User Info
Key Benefits:
Shows
badpwdcount(failed login attempts)Displays
baddpwdtime(last failed attempt)Helps identify accounts close to lockout threshold
Example Output:
π LDAP Anonymous Bind Enumeration
π ldapsearch - LDAP Queries
Example Output:
πͺ windapsearch - User-Friendly LDAP
Example Output:
π« Kerbrute User Enumeration
β‘ Kerberos Pre-Authentication Method
Key Advantages:
Fast: Much faster than SMB-based methods
Stealthy: No Event ID 4625 (logon failure) generated
No Lockouts: Username enumeration doesn't count toward lockout
Large Scale: Can test thousands of usernames quickly
How It Works:
Sends TGT requests without Kerberos Pre-Authentication
PRINCIPAL UNKNOWN = Invalid username
Pre-Auth required = Valid username exists
π Kerbrute Commands
π Example Kerbrute Output
π Performance Metrics
48,705 usernames tested in 12.315 seconds
56 valid usernames discovered
~3,950 usernames/second testing rate
π Credentialed User Enumeration
β‘ CrackMapExec with Valid Credentials
Enhanced Information:
Complete user list access
Account status information
Bad password count tracking
Last bad password attempt timestamps
Example Output:
π Username List Sources
π― External Intelligence Gathering
LinkedIn Username Generation
Email Harvesting
Statistical Username Lists
statistically-likely-usernames GitHub repo
jsmith.txt: 48,705 usernames in
flastformatCommon formats: firstlast, flast, lastfirst, first.last
π Username Format Patterns
Format
Example
Description
flast
jsmith
First initial + last name
firstlast
johnsmith
Full first + last name
first.last
john.smith
First + dot + last
lastfirst
smithjohn
Last + first name
f.last
j.smith
First initial + dot + last
π Enumeration Method Comparison
Method
Speed
Stealth
Accuracy
Requirements
Event Generation
SMB NULL Session
Medium
Medium
High
Legacy misconfiguration
Event ID 4624/4625
LDAP Anonymous
Medium
Medium
High
Anonymous bind enabled
Minimal events
Kerbrute
Fast
High
Medium
Network access to DC
Event ID 4768 only
Credentialed
Fast
Low
High
Valid domain credentials
Normal auth events
π― HTB Academy Lab Walkthrough
π Lab Question
"Enumerate valid usernames using Kerbrute and the wordlist located at /opt/jsmith.txt on the ATTACK01 host. How many valid usernames can we enumerate with just this wordlist from an unauthenticated standpoint?"
π Step-by-Step Solution
1οΈβ£ Connect to Attack Host
2οΈβ£ Verify Wordlist
3οΈβ£ Find Domain Controller
4οΈβ£ Run Kerbrute User Enumeration
5οΈβ£ Expected Results Analysis
β
Expected Answer: 56 valid usernames
56 valid usernames6οΈβ£ Bonus: Extract Clean Username List
π‘οΈ Security Considerations
π¨ Event ID Monitoring
Event ID
Description
Generated By
4768
Kerberos TGT requested
Kerbrute enumeration
4625
Account logon failed
SMB/RDP/other auth failures
4624
Account logon successful
Successful authentication
4740
Account locked out
Too many failed attempts
π Detection Indicators
High volume of Event ID 4768 in short timeframe
Sequential TGT requests from single source
Unusual authentication patterns outside business hours
Failed authentication spikes across multiple accounts
π‘οΈ Defensive Recommendations
Monitor Kerberos events for enumeration patterns
Implement account lockout policies but not too aggressive
Use honey accounts to detect enumeration attempts
Network segmentation to limit DC access
π Attack Documentation Template
π Required Logging Fields
π― User List Management
β‘ Quick Reference Commands
π Unauthenticated Methods
π Credentialed Methods
π Key Takeaways
β
Enumeration Best Practices
Multiple Methods: Use various techniques for comprehensive coverage
Stealth Priority: Prefer Kerbrute for large-scale enumeration
Documentation: Log all activities for client coordination
Validation: Cross-reference results from different methods
β οΈ Critical Warnings
Monitor Bad Password Counts: Avoid accounts near lockout
Respect Lockout Policies: Never exceed safe attempt thresholds
Time-Based Coordination: Space attempts based on lockout windows
Event Generation: Understand what logs your methods create
π― Next Steps After User Enumeration
Password Policy Review: Confirm lockout thresholds
Target List Refinement: Remove high-risk accounts
Password List Creation: Build targeted wordlists
Spray Planning: Schedule attempts within policy limits
Accurate user enumeration is the foundation of successful password spraying - take time to build comprehensive, clean lists while respecting account lockout policies.
Last updated