Password Spraying
Last updated
Was this helpful?
Last updated
Was this helpful?
Before attempting any password attacks, check the domain's account lockout policy to avoid locking out accounts or triggering alerts.
Based on the above policy, we can safely try 4 login attempts per user every 30 minutes. This allows up to 192 attempts/user/day.
Tools like can be used to enumerate the domain's account lockout policy.
This method leverages LDAP binding via PowerShell’s .NET
libraries. It attempts authentication by trying to create an LDAP object — if it succeeds, the credentials are valid. This method is stealthy, no interactive log in, and respects lockout policy, but is slow and limited to one password per run.
If the password is invalid, it throws an error. If valid, it returns the DN. We can automate this with the following script which loops through AD users and reports valid logins.
With
netxec
, if a sprayed password is valid and the user is alocal administrator
on the target system, the(Pwn3d!)
string will appear. This means that tools likepsexec
,wmiexec
, orsecretsdump
can be used for lateral movement or privilege escalation.
Kerberos-Based
LDAP
Low
✅ Yes
Medium
Scriptable, stealthy
SMB
High
❌ No
Slow
Reveals admin access (Pwn3d!
)
Kerberos
Low
❌ No
Very Fast
UDP-based, great for fast spraying
This method involves a full SMB session setup/teardown on each authentication attempt so it's slow, noisy, and does not respect the lockout policy. We can perform this attack using tools like .
This method uses Kerberos AS-REQs to test credentials. It's lightweight (no full session required) and fast (only two UDP packets per attempt: AS-REQ, AS REP/error). This attack can be performed with tools like e
, a cross-platform, fast, and reliable tool which performs password spraying by automating AS-REQ requests and interpreting the responses.