LoFP LoFP / migration of privileged accounts.

Techniques

Sample rules

Windows AD Privileged Account SID History Addition

Description

The following analytic identifies when the SID of a privileged user is added to the SID History attribute of another user. It leverages Windows Security Event Codes 4742 and 4738, combined with identity lookups, to detect this activity. This behavior is significant as it may indicate an attempt to abuse SID history for unauthorized access across multiple domains. If confirmed malicious, this activity could allow an attacker to escalate privileges or maintain persistent access within the environment, posing a significant security risk.

Detection logic

`wineventlog_security` (EventCode=4742 OR EventCode=4738) NOT SidHistory IN ("%%1793", -) 
| rex field=SidHistory "(^%{
|^)(?P<SidHistory>.*?)(}$
|$)" 
| eval category="privileged" 
| lookup identity_lookup_expanded category, identity as SidHistory OUTPUT identity_tag as match 
| where isnotnull(match) 
| rename TargetSid as userSid 
| table _time action status host user userSid SidHistory Logon_ID src_user 
| `windows_ad_privileged_account_sid_history_addition_filter`