Detection rules › Splunk
System Owner_User Discovery - Windows (Windows Event Log)
Adversaries may attempt to identify the primary user, currently logged in user, set of users that commonly uses a system, or whether a user is actively using the system. Adversaries may use the information during automated discovery to direct follow-on behaviors, including whether or not the adversary fully infects the target and/or attempts specific actions. This use case detects when reconnaissance commands specifically targeting discovery of system owners and users are executed in a short period of time
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Discovery |
References
Telemetry coverage
| Provider | Record / event type |
|---|---|
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule body
id: '13454.19254'
title: System Owner_User Discovery - Windows
description: 'Adversaries may attempt to identify the primary user, currently logged
in user, set of users that commonly uses a system, or whether a user is actively
using the system. Adversaries may use the information during automated discovery
to direct follow-on behaviors, including whether or not the adversary fully infects
the target and/or attempts specific actions. This use case detects when reconnaissance
commands specifically targeting discovery of system owners and users are executed
in a short period of time. -- Threat Actor Association: Alloy Taurus/Gallium, APT28/Fancy
Bear, FIN8 - Software Association: Play, Rhysida -- Atomics T1033 Test #1'
logic_format: Splunk
logic: ' `get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR
"<EventID>4688<" OR Type=Process) ("whoami" OR "useraccount" OR "quser" OR "qwinsta.exe"
) | regex process="(?i)(whoami|useraccount|quser|qwinsta)" | table _time, host,
user process, process_*, parent_process, parent_process_*, src_*, dest_* | bin span=60s
| stats values(*) as * by _time, host, user | streamstats dc(process_name) as dc_process_name
by _time, host | where dc_process_name>2 '
techniques:
- discovery:system owner/user discovery
technique_id:
- T1033
data_category:
- Windows event logs
- Process command-line parameters
references:
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1033/T1033.md#atomic-test-1---system-owneruser-discovery
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR "<EventID>4688<" OR Type=Process) ("whoami" OR "useraccount" OR "quser" OR "qwinsta.exe" )
Stage 2: regex
| regex process="(?i)(whoami|useraccount|quser|qwinsta)"
Stage 3: table
| table _time, host, user process, process_*, parent_process, parent_process_*, src_*, dest_*
Stage 4: bucket
| bin span=60s
Stage 5: stats
| stats values(*) as * by _time, host, user
Stage 6: streamstats
| streamstats dc(process_name) as dc_process_name by _time, host
Stage 7: where
| where dc_process_name>2
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | eq |
| field:"EventID" kind:eq value:"4688" |
dc_process_name | gt |
| field:"dc_process_name" kind:gt value:"2" |
process | regex_match |
| field:"CommandLine" kind:regex_match |
Search terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "<EventID>4688<" |
| 1 | "whoami" |
| 1 | "useraccount" |
| 1 | "quser" |
| 1 | "qwinsta.exe" |