You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The tool currently executes password spraying attacks without checking the domain’s bad password count or respecting the observation window. These features are essential to prevent account lockouts and to conduct password spraying safely within domain policies.
Expected Behavior
When performing a password spray:
The tool should retrieve the domain’s bad password count and observation window settings from the Active Directory domain object.
It should check the number of failed login attempts for each user and only attempt a login if it won’t exceed the domain’s bad password count policy within the observation window.
Current Behavior
The tool does not currently check:
The bad password count threshold, which could result in unintended account lockouts if exceeded.
The observation window for monitoring failed attempts, potentially triggering domain security controls.
Impact
Without these checks:
Accounts may get locked due to excessive failed login attempts, representing a significant denial of service risk.
The tool risks causing account lockouts and alerting domain security systems to potential brute-force attempts.
This behavior reduces the tool's effectiveness in stealthily testing passwords while staying within security thresholds.
Suggested Solution
Implement a pre-check that queries the domain’s password policy (specifically LockoutThreshold and ObservationWindow).
Use this information to throttle attempts per user to stay within domain lockout limits.
Optionally, add a configurable delay or dynamic scheduling based on the observation window.
Example Code
func (k*KerbruteSession) CheckDomainLockoutPolicy(usernamestring) (bool, error) {
// Example LDAP connection and policy retrievalconn, err:=ldap.DialURL("ldap://domain-controller")
iferr!=nil {
returnfalse, fmt.Errorf("LDAP connection failed: %s", err)
}
deferconn.Close()
// Bind if needederr=conn.Bind("user@domain", "password")
iferr!=nil {
returnfalse, fmt.Errorf("LDAP bind failed: %s", err)
}
searchRequest:=ldap.NewSearchRequest(
"dc=domain,dc=com", ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false,
"(&(objectClass=domain))",
[]string{"lockoutThreshold", "lockoutObservationWindow"},
nil,
)
res, err:=conn.Search(searchRequest)
iferr!=nil||len(res.Entries) ==0 {
returnfalse, fmt.Errorf("Failed to retrieve lockout policy: %s", err)
}
lockoutThreshold:=res.Entries[0].GetAttributeValue("lockoutThreshold")
observationWindow:=res.Entries[0].GetAttributeValue("lockoutObservationWindow")
// Convert observation window to time durationobservationDuration, err:=time.ParseDuration(observationWindow+"m")
iferr!=nil {
returnfalse, fmt.Errorf("Failed to parse observation window: %s", err)
}
// Implement logic to track failed attempts// For example, store a map with username -> failed attempts and timestamps// If count exceeds lockoutThreshold within observationDuration, return false// Example result if user meets lockout criteriareturntrue, nil
}
The text was updated successfully, but these errors were encountered:
Description:
The tool currently executes password spraying attacks without checking the domain’s bad password count or respecting the observation window. These features are essential to prevent account lockouts and to conduct password spraying safely within domain policies.
Expected Behavior
When performing a password spray:
Current Behavior
The tool does not currently check:
Impact
Without these checks:
Suggested Solution
LockoutThreshold
andObservationWindow
).Example Code
The text was updated successfully, but these errors were encountered: