Detection rules › Splunk

Detect New Local Admin account

Status
production
Severity
medium
Group by
dest, user
Author
David Dorsey, Splunk
Source
github.com/splunk/security_content

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.

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

MITRE ATT&CK coverage

TacticTechniques
Persistence

Telemetry coverage

Rule body

name: Detect New Local Admin account
id: b25f6f62-0712-43c1-b203-083231ffd97d
version: 13
creation_date: '2020-04-29'
modification_date: '2026-05-13'
author: David Dorsey, Splunk
status: production
type: TTP
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.
data_source:
    - Windows Event Log Security 4732
    - Windows Event Log Security 4720
search: |
    `wineventlog_security`
    (
      EventCode=4720
      OR
      (
        EventCode=4732
        AND
        (
          Group_Name=Administrators
          OR
          TargetUserName=Administrators
        )
      )
    )
    | transaction user dest connected=false maxspan=180m
    | stats count min(_time) as firstTime
                  max(_time) as lastTime
                  dc(EventCode) as distinct_eventcodes
      by src_user user dest
    | where distinct_eventcodes > 1
    | `security_content_ctime(firstTime)`
    | `security_content_ctime(lastTime)`
    | `detect_new_local_admin_account_filter`
how_to_implement: 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
references: []
finding:
    title: A $user$ on $dest$ was added recently. Identify if this was legitimate behavior or not.
    entity:
        field: user
        type: user
        score: 50
intermediate_findings:
    entities:
        - field: dest
          type: system
          score: 50
          message: A $user$ on $dest$ was added recently. Identify if this was legitimate behavior or not.
analytic_story:
    - DHS Report TA18-074A
    - HAFNIUM Group
    - CISA AA22-257A
    - CISA AA24-241A
    - Scattered Lapsus$ Hunters
asset_type: Windows
mitre_attack_id:
    - T1136.001
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: endpoint
security_domain: access

Stages and Predicates

Stage 1: search

`wineventlog_security`
(
  EventCode=4720
  OR
  (
    EventCode=4732
    AND
    (
      Group_Name=Administrators
      OR
      TargetUserName=Administrators
    )
  )
)

Stage 2: transaction

| transaction user dest connected=false maxspan=180m

Stage 3: stats

| stats count min(_time) as firstTime
              max(_time) as lastTime
              dc(EventCode) as distinct_eventcodes
  by src_user user dest

Stage 4: where

| where distinct_eventcodes > 1

Stage 5: search

| `security_content_ctime(firstTime)`

Stage 6: search

| `security_content_ctime(lastTime)`

Stage 7: search

| `detect_new_local_admin_account_filter`

Indicators

These rows show field, operator, and value matches.