Operator On The Wire
Join
← Back to Knowledge Base
BLUE TEAM / THREAT HUNT / ACTIVE DIRECTORY / ENUMERATION

Password Spraying

This note documents detection patterns related to Password Spraying within Active Directory environments.


Direct Indicators

Log SourceEvent ID / Error CodeMeaningForensic ValueNotes
Security4625Failed logonCriticalCore spray indicator. Large volume across many users, same source, short interval. Check Status, SubStatus, IpAddress, LogonType.
Security4771Kerberos pre-authentication failedCriticalStrong Kerberos spray signal. Common when attacker targets many users via Kerberos. Review FailureCode, ClientAddress, TargetUserName.
Security4771 / FailureCode 0x18Kerberos bad passwordCriticalClassic wrong-password spray pattern against valid accounts.
Security4768 / ErrorCode 0x6Kerberos invalid userHighUsername enumeration or spray against non-existent accounts.
Security4768 / ErrorCode 0x12Kerberos disabled userHighIndicates attacker hit disabled accounts — useful for scope reconstruction.
Security4776 / ErrorCode 0xC0000064NTLM invalid userHighNTLM username enumeration against DC.
Security4776 / ErrorCode 0xC000006ANTLM wrong passwordCriticalVery strong NTLM password spray indicator. Many users, one source, same interval.
Security4776NTLM authentication failedHighParent NTLM failure event. Must inspect Status field for exact failure meaning.
Security4624Successful logonCriticalIndicates spray success. Correlate with prior failures from same source.
Security4648Explicit credentials usedHighTools often use explicit creds after successful spray or during staged auth attempts.
Sysmon3Network connectionMedium-HighSpray source contacting many hosts / DC repeatedly. Ports often 88, 389, 445, 135.
Sysmon1Process creationHighDetect tools like kerbrute, crackmapexec, Rubeus, Spray-AD, Invoke-DomainPasswordSpray.
Sysmon7Image loadedMediumUseful if tooling loads auth libraries (secur32.dll, kerberos.dll).
PowerShell4104Script block loggingVery HighReveals spray scripts directly (Invoke-DomainPasswordSpray, custom loops).

Indirect Indicators

IndicatorWhat To Look ForForensic ValueNotes
Authentication attempts across many accountsSame source host attempting login to many usersCriticalClassic password spray behavior.
Low number of attempts per accountAvoiding lockout thresholdsHighTechnique designed to evade account lockout policies.
Spray attempts from single IPSingle host authenticating to many accountsHighOften attacker workstation or compromised host.
Authentication attempts across multiple systemsLogin attempts across DCs or servicesMediumDistributed authentication activity.
Execution of password spraying toolsProcesses like CrackMapExec or Spray scriptsCriticalDirect evidence of attack activity.

Common Tools

ToolUsage
CrackMapExecAutomates password spraying across domain accounts.
KerbrutePerforms Kerberos password spraying.
Spray scriptsCustom scripts used to test credentials.
ImpacketUsed to attempt authentication with guessed passwords.
Nmap smb-brutePerforms SMB password spray attacks.

Relevant Artifacts

  • Domain controller Security logs (4625, 4771, 4776)
  • Authentication logs across domain controllers
  • Network traffic logs for authentication attempts
  • Sysmon logs (1, 3)
  • EDR telemetry identifying spraying tools
  • Prefetch artifacts for CrackMapExec or Kerbrute
  • Account lockout logs
  • SIEM correlation alerts

MITRE ATT&CK References

  • T1110 Brute Force
  • T1110.003 Password Spraying
  • T1078 Valid Accounts

Decision Tree

  1. Is the suspicious event present?
    • Identify high volume failed authentication events (4625 / 4771).
  2. What host generated the event?
    • Determine source IP or workstation performing attempts.
  3. Are multiple accounts targeted?
    • Check whether many users receive authentication attempts.
  4. Pivot:
    • Source host → inspect execution of Kerbrute or CrackMapExec.
    • Accounts targeted → determine if any successful logons occurred.
    • Network → analyze authentication attempts across services.
  5. Confirm exploitation
    • Determine whether attacker successfully authenticated with sprayed credentials.

Example Detection Templates

KQL

SecurityEvent
| where EventID in (4625,4771)
| summarize count() by IpAddress, TargetUserName, bin(TimeGenerated,5m)
SecurityEvent
| where EventID == 4624
| summarize count() by TargetUserName, IpAddress

EQL

any where event.code in ("4625","4771")

Sigma

title: Password Spraying Detection
id: password-spraying-detection
status: experimental
description: Detects password spraying attempts across multiple accounts
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID:
      - 4625
      - 4771
  condition: selection
fields:
  - TargetUserName
  - IpAddress
falsepositives:
  - Misconfigured applications generating authentication failures
level: high
tags:
  - attack.credential_access
  - attack.t1110.003

Splunk

index=main source="WinEventLog:Security" (EventCode=4771 OR EventCode=4776 OR EventCode=4625)  
| eval User=coalesce(TargetUserName, Account_Name, user)  
| eval Src=coalesce(Source_Network_Address, src, IpAddress)  
| stats count dc(User) as UniqueUsers values(Status) as Status values(FailureCode) as FailureCode by Src  
| where UniqueUsers > 5 AND count > 5  
| sort - count
index=main source="WinEventLog:Security" EventCode=4625 
| bin span=15m _time 
| stats values(user) as Users, dc(user) as dc_user by src, Source_Network_Address, dest, EventCode, Failure_Reason

Mitigation & Hardening

Control AreaMitigationEffectivenessNotes
Account lockout policiesConfigure lockout thresholds and monitoringHighLimits effectiveness of spraying attacks.
Multi-factor authenticationRequire MFA for sensitive accountsCriticalPrevents credential-only compromise.
MonitoringAlert on authentication attempts across many accountsHighPrimary detection method.
Threat huntingReview failed authentication patternsMediumDetects stealthy spraying attempts.
Password hygieneEnforce strong password policiesMediumReduces likelihood of successful spray.