Detection: Suspicious Computer Account Name Change

Description

The following analytic detects a suspicious computer account name change in Active Directory. It leverages Event ID 4781, which logs account name changes, to identify instances where a computer account name is changed to one that does not end with a $. This behavior is significant as it may indicate an attempt to exploit CVE-2021-42278 and CVE-2021-42287, which can lead to domain controller impersonation and privilege escalation. If confirmed malicious, this activity could allow an attacker to gain elevated privileges and potentially control the domain.

1`wineventlog_security` EventCode=4781 OldTargetUserName="*$" NewTargetUserName!="*$" 
2| table _time, Computer, Caller_User_Name, OldTargetUserName, NewTargetUserName 
3| rename Computer as dest 
4| `suspicious_computer_account_name_change_filter`

Data Source

Name Platform Sourcetype Source
Windows Event Log Security 4781 Windows icon Windows 'xmlwineventlog' 'XmlWinEventLog:Security'

Macros Used

Name Value
wineventlog_security eventtype="wineventlog_security" OR Channel="security" OR source="XmlWinEventLog:Security" OR source="WinEventLog:Security"
suspicious_computer_account_name_change_filter search *
suspicious_computer_account_name_change_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

- MITRE ATT&CK
+ Kill Chain Phases
+ NIST
+ CIS
- Threat Actors
ID Technique Tactic
T1078.002 Domain Accounts Defense Evasion
Delivery
Exploitation
Installation
DE.CM
CIS 10

Default Configuration

This detection is configured by default in Splunk Enterprise Security to run with the following settings:

Setting Value
Disabled true
Cron Schedule 0 * * * *
Earliest Time -70m@m
Latest Time -10m@m
Schedule Window auto
Creates Notable Yes
Rule Title %name%
Rule Description %description%
Notable Event Fields user, dest
Creates Risk Event True
This configuration file applies to all detections of type TTP. These detections will use Risk Based Alerting and generate Notable Events.

Implementation

To successfully implement this search, you need to be ingesting Windows event logs from your hosts. In addition, the Splunk Windows TA is needed.

Known False Positives

Renaming a computer account name to a name that not end with '$' is highly unsual and may not have any legitimate scenarios.

Associated Analytic Story

Risk Based Analytics (RBA)

Risk Message:

A computer account $OldTargetUserName$ was renamed with a suspicious computer name on $dest$

Risk Object Risk Object Type Risk Score Threat Objects
OldTargetUserName user 70 No Threat Objects
dest system 70 No Threat Objects

References

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation Passing N/A N/A N/A
Unit Passing Dataset XmlWinEventLog:Security XmlWinEventLog
Integration ✅ Passing Dataset XmlWinEventLog:Security XmlWinEventLog

Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range


Source: GitHub | Version: 8