LoFP LoFP / a source user failing attempting to authenticate multiple users on a host is not a common behavior for regular systems. some applications, however, may exhibit this behavior in which case sets of users hosts can be added to an allow list. possible false positive scenarios include systems where several users connect to like mail servers, identity providers, remote desktop services, citrix, etc.

Techniques

Sample rules

Windows Multiple Users Fail To Authenticate Wth ExplicitCredentials

Description

The following analytic identifies a source user failing to authenticate with 30 unique users using explicit credentials on a host. This behavior could represent an adversary performing a Password Spraying attack against an Active Directory environment to obtain initial access or elevate privileges. Active Directory environments can be very different depending on the organization. Users should test this detection and customize the arbitrary threshold when needed. Event 4648 is generated when a process attempts an account logon by explicitly specifying that accounts credentials. This event generates on domain controllers, member servers, and workstations. This logic can be used for real time security monitoring as well as threat hunting exercises. This detection will trigger on the potenfially malicious host, perhaps controlled via a trojan or operated by an insider threat, from where a password spraying attack is being executed. The analytics returned fields allow analysts to investigate the event further by providing fields like source account, attempted user accounts and the endpoint were the behavior was identified.

Detection logic

 `wineventlog_security` EventCode=4648 Caller_User_Name!=*$ Target_User_Name!=*$ 
| bucket span=5m _time 
| stats dc(Target_User_Name) AS unique_accounts values(Target_User_Name) as  tried_account by _time, Computer, Caller_User_Name 
| where unique_accounts > 30 
| `windows_multiple_users_fail_to_authenticate_wth_explicitcredentials_filter` 

Windows Unusual Count Of Users Fail To Auth Wth ExplicitCredentials

Description

The following analytic identifies a source user failing to authenticate with multiple users using explicit credentials on a host. This behavior could represent an adversary performing a Password Spraying attack against an Active Directory environment to obtain initial access or elevate privileges. Event 4648 is generated when a process attempts an account logon by explicitly specifying that accounts credentials. This event generates on domain controllers, member servers, and workstations. The detection calculates the standard deviation for each host and leverages the 3-sigma statistical rule to identify an unusual number of users. To customize this analytic, users can try different combinations of the bucket span time and the calculation of the upperBound field. This logic can be used for real time security monitoring as well as threat hunting exercises. This detection will trigger on the potenfially malicious host, perhaps controlled via a trojan or operated by an insider threat, from where a password spraying attack is being executed. The analytics returned fields allow analysts to investigate the event further by providing fields like source account, attempted user accounts and the endpoint were the behavior was identified.

Detection logic

 `wineventlog_security` EventCode=4648 Caller_User_Name!=*$ Target_User_Name!=*$ 
| bucket span=5m _time 
| stats dc(Target_User_Name) AS unique_accounts values(Target_User_Name) as  user by _time, Computer, Caller_User_Name 
| eventstats avg(unique_accounts) as comp_avg , stdev(unique_accounts) as comp_std by Computer 
| eval upperBound=(comp_avg+comp_std*3) 
| eval isOutlier=if(unique_accounts > 10 and unique_accounts >= upperBound, 1, 0) 
| search isOutlier=1 
| `windows_unusual_count_of_users_fail_to_auth_wth_explicitcredentials_filter`