ID | Technique | Tactic |
---|---|---|
T1136.001 | Local Account | Persistence |
T1136 | Create Account | Persistence |
Detection: Detect New Local Admin account
Description
The following analytic detects the creation of new accounts elevated to local administrators. It uses Windows event logs, specifically EventCode 4720 (user account creation) and EventCode 4732 (user added to Administrators group). This activity is significant as it indicates potential unauthorized privilege escalation, which is critical for SOC monitoring. If confirmed malicious, this could allow attackers to gain administrative access, leading to unauthorized data access, system modifications, and disruption of services. Immediate investigation is required to mitigate risks and prevent further unauthorized actions.
Search
1`wineventlog_security` EventCode=4720 OR (EventCode=4732 Group_Name=Administrators)
2| transaction src_user connected=false maxspan=180m
3| rename src_user as user
4| stats count min(_time) as firstTime max(_time) as lastTime by user dest
5| `security_content_ctime(firstTime)`
6| `security_content_ctime(lastTime)`
7| `detect_new_local_admin_account_filter`
Data Source
Name | Platform | Sourcetype | Source |
---|---|---|---|
Windows Event Log Security 4720 | Windows | 'xmlwineventlog' |
'XmlWinEventLog:Security' |
Windows Event Log Security 4732 | Windows | 'xmlwineventlog' |
'XmlWinEventLog:Security' |
Macros Used
Name | Value |
---|---|
security_content_ctime | convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$) |
detect_new_local_admin_account_filter | search * |
detect_new_local_admin_account_filter
is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
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 |
Implementation
You must be ingesting Windows event logs using the Splunk Windows TA and collecting event code 4720 and 4732
Known False Positives
The activity may be legitimate. For this reason, it's best to verify the account with an administrator and ask whether there was a valid service request for the account creation. If your local administrator group name is not "Administrators", this search may generate an excessive number of false positives
Associated Analytic Story
Risk Based Analytics (RBA)
Risk Message | Risk Score | Impact | Confidence |
---|---|---|---|
A $user$ on $dest$ was added recently. Identify if this was legitimate behavior or not. | 42 | 60 | 70 |
Detection Testing
Test Type | Status | Dataset | Source | Sourcetype |
---|---|---|---|---|
Validation | ✅ Passing | N/A | N/A | N/A |
Unit | ✅ Passing | Dataset | WinEventLog:Security |
WinEventLog |
Integration | ✅ Passing | Dataset | WinEventLog:Security |
WinEventLog |
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: 5