Detection: Windows Admin Password Changed by Non-Admin

Description

The following analytic detects when a unprivileged user changes an Admin accounts password. This is a common artifact of successful exploitation of the BlueHammer Windows Defender privilege escalation. The attacker's process momentarily changes the passwords of high-value local accounts including the built-in Administrator to spawn an authenticated shell session, then immediately reverts the passwords to avoid detection. This uses EventID 4723 to log this activity.

 1`wineventlog_security`
 2EventCode=4723
 3
 4| rex field=object_id "-(?<target_rid>\d+)$"
 5
 6| rex field=SubjectUserSid "-(?<subject_rid>\d+)$"
 7
 8| where target_rid="500" OR tonumber(target_rid) IN (512,513,518,519,520)
 9
10| where tonumber(subject_rid) >= 1000
11
12| where SubjectUserSid != object_id
13
14| stats count min(_time) as firstTime
15              max(_time) as lastTime
16  by dest user object_id EventCode src_user
17     SubjectUserSid SubjectLogonId PrivilegeList
18
19| `security_content_ctime(firstTime)`
20
21| `security_content_ctime(lastTime)`
22
23| `windows_admin_password_changed_by_non_admin_filter`

Data Source

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

Macros Used

Name Value
security_content_ctime convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$)
windows_admin_password_changed_by_non_admin_filter search *
windows_admin_password_changed_by_non_admin_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

CVE

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 Finding (Notable) Yes
Rule Title %name%
Rule Description %description%
Notable Event Fields user, dest
Creates Intermediate Finding (Risk Event) No
TTP detections generate a Finding (Notable) and may generate Intermediate Findings (Risk Events) for associated entities.

Implementation

The detection is based on data that originates from Endpoint Detection and Response (EDR) agents. These agents are designed to provide security-related telemetry from the endpoints where the agent is installed. To implement this search, you must ingest logs that contain the process GUID, process name, and parent process. Additionally, you must ingest complete command-line executions. These logs must be processed using the appropriate Splunk Technology Add-ons that are specific to the EDR product. The logs must also be mapped to the Processes node of the Endpoint data model. Use the Splunk Common Information Model (CIM) to normalize the field names and speed up the data modeling process.

Known False Positives

Some IT support tools or automated scripts may change administrator passwords during maintenance. Verify changes against authorized administrative activities to reduce false alerts.

Associated Analytic Story

Finding

Title Entity Field Entity Type Risk Score
Non-Administrator account $src_user$ changed password of Admin account $user$ on $dest$. dest system 50

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: 1