πŸ‘₯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 badpwdcount values

  • Documentation: 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:

  1. Sends TGT requests without Kerberos Pre-Authentication

  2. PRINCIPAL UNKNOWN = Invalid username

  3. 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 flast format

  • Common 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

6️⃣ 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

  1. Password Policy Review: Confirm lockout thresholds

  2. Target List Refinement: Remove high-risk accounts

  3. Password List Creation: Build targeted wordlists

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