Detection rules › Splunk

Windows AD Privileged Object Access Activity

Status
production
Severity
medium
Group by
user
Author
Steven Dick
Source
github.com/splunk/security_content

The following analytic detects access attempts to privileged Active Directory objects, such as Domain Admins or Enterprise Admins. It leverages Windows Security Event Code 4662 to identify when these sensitive objects are accessed. This activity is significant because such objects should rarely be accessed by normal users or processes, and unauthorized access attempts may indicate attacker enumeration or lateral movement within the domain. If confirmed malicious, this activity could allow attackers to escalate privileges, persist in the environment, or gain control over critical domain resources.

MITRE ATT&CK coverage

Event coverage

Rule body splunk

name: Windows AD Privileged Object Access Activity
id: dc2f58bc-8cd2-4e51-962a-694b963acde0
version: 10
creation_date: '2023-08-18'
modification_date: '2026-05-13'
author: Steven Dick
status: production
type: TTP
description: The following analytic detects access attempts to privileged Active Directory objects, such as Domain Admins or Enterprise Admins. It leverages Windows Security Event Code 4662 to identify when these sensitive objects are accessed. This activity is significant because such objects should rarely be accessed by normal users or processes, and unauthorized access attempts may indicate attacker enumeration or lateral movement within the domain. If confirmed malicious, this activity could allow attackers to escalate privileges, persist in the environment, or gain control over critical domain resources.
data_source:
    - Windows Event Log Security 4662
search: |-
    `wineventlog_security` EventCode=4662 ObjectName IN ( "CN=Account Operators,*", "CN=Administrators,*", "CN=Backup Operators,*", "CN=Cert Publishers,*", "CN=Certificate Service DCOM Access,*", "CN=Domain Admins,*", "CN=Domain Controllers,*", "CN=Enterprise Admins,*", "CN=Enterprise Read-only Domain Controllers,*", "CN=Group Policy Creator Owners,*", "CN=Incoming Forest Trust Builders,*", "CN=Microsoft Exchange Servers,*", "CN=Network Configuration Operators,*", "CN=Power Users,*", "CN=Print Operators,*", "CN=Read-only Domain Controllers,*", "CN=Replicators,*", "CN=Schema Admins,*", "CN=Server Operators,*", "CN=Exchange Trusted Subsystem,*", "CN=Exchange Windows Permission,*", "CN=Organization Management,*")
      | rex field=ObjectName "CN\=(?<object_name>[^,]+)"
      | stats values(Computer) as dest, values(object_name) as object_name, dc(ObjectName) as object_count, min(_time) as firstTime, max(_time) as lastTime, count
        BY SubjectUserName
      | rename SubjectUserName as user
      | `security_content_ctime(firstTime)`
      | `security_content_ctime(lastTime)`
      | `windows_ad_privileged_object_access_activity_filter`
how_to_implement: Enable Audit Directory Service Access via GPO and collect event code 4662. The required SACLs need to be created for the relevant objects. Be aware Splunk filters this event by default on the Windows TA.
known_false_positives: Service accounts or applications that routinely query Active Directory for information.
references:
    - https://medium.com/securonix-tech-blog/detecting-ldap-enumeration-and-bloodhound-s-sharphound-collector-using-active-directory-decoys-dfc840f2f644
    - https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4662
    - https://attack.mitre.org/tactics/TA0007/
drilldown_searches:
    - name: View the detection results for - "$user$"
      search: '%original_detection_search% | search  user = "$user$"'
      earliest_offset: $info_min_time$
      latest_offset: $info_max_time$
    - name: View risk events for the last 7 days for - "$user$"
      search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user$") | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
      earliest_offset: 7d
      latest_offset: "0"
finding:
    title: The account $user$ accessed $object_count$ privileged AD object(s).
    entity:
        field: user
        type: user
        score: 50
analytic_story:
    - Active Directory Discovery
    - BlackSuit Ransomware
asset_type: Endpoint
mitre_attack_id:
    - T1087.002
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: endpoint
security_domain: endpoint
tests:
    - name: True Positive Test
      attack_data:
        - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.002/4662_ad_enum/4662_priv_events.log
          source: XmlWinEventLog:Security
          sourcetype: XmlWinEventLog
      test_type: unit

Stages and Predicates

Stage 1: search

`wineventlog_security` EventCode=4662 ObjectName IN ( "CN=Account Operators,*", "CN=Administrators,*", "CN=Backup Operators,*", "CN=Cert Publishers,*", "CN=Certificate Service DCOM Access,*", "CN=Domain Admins,*", "CN=Domain Controllers,*", "CN=Enterprise Admins,*", "CN=Enterprise Read-only Domain Controllers,*", "CN=Group Policy Creator Owners,*", "CN=Incoming Forest Trust Builders,*", "CN=Microsoft Exchange Servers,*", "CN=Network Configuration Operators,*", "CN=Power Users,*", "CN=Print Operators,*", "CN=Read-only Domain Controllers,*", "CN=Replicators,*", "CN=Schema Admins,*", "CN=Server Operators,*", "CN=Exchange Trusted Subsystem,*", "CN=Exchange Windows Permission,*", "CN=Organization Management,*")

Stage 2: rex

| rex field=ObjectName "CN\=(?<object_name>[^,]+)"

Stage 3: stats

| stats values(Computer) as dest, values(object_name) as object_name, dc(ObjectName) as object_count, min(_time) as firstTime, max(_time) as lastTime, count
    BY SubjectUserName

Stage 4: rename

| rename SubjectUserName as user

Stage 5: search

| `security_content_ctime(firstTime)`

Stage 6: search

| `security_content_ctime(lastTime)`

Stage 7: search

| `windows_ad_privileged_object_access_activity_filter`

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
EventCodeeq
  • 4662 corpus 13 (splunk 7, kusto 4, elastic 1, chronicle 1)
ObjectNamein
  • "CN=Account Operators,*"
  • "CN=Administrators,*"
  • "CN=Backup Operators,*"
  • "CN=Cert Publishers,*"
  • "CN=Certificate Service DCOM Access,*"
  • "CN=Domain Admins,*"
  • "CN=Domain Controllers,*"
  • "CN=Enterprise Admins,*"
  • "CN=Enterprise Read-only Domain Controllers,*"
  • "CN=Exchange Trusted Subsystem,*"
  • "CN=Exchange Windows Permission,*"
  • "CN=Group Policy Creator Owners,*"
  • "CN=Incoming Forest Trust Builders,*"
  • "CN=Microsoft Exchange Servers,*"
  • "CN=Network Configuration Operators,*"
  • "CN=Organization Management,*"
  • "CN=Power Users,*"
  • "CN=Print Operators,*"
  • "CN=Read-only Domain Controllers,*"
  • "CN=Replicators,*"
  • "CN=Schema Admins,*"
  • "CN=Server Operators,*"