Detection rules › Splunk
System Owner_User Discovery - Windows (PowerShell)
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
Rule body
id: '13454.20044'
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_powershell` ("<EventID>4104<" OR "<EventID>4103<"
OR "EventCode=4104" OR "EventCode=4103") ("GetCurrent" OR "UserName") | table _time,
host, user process, process_*, signature_id, user | bin span=60s | stats values(*)
as * by _time, host | where match(process, "(?i)((GetCurrent)|(\[System\.Environment\]::UserName))") '
techniques:
- discovery:system owner/user discovery
technique_id:
- T1033
data_category:
- PowerShell 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_powershell` ("<EventID>4104<" OR "<EventID>4103<" OR "EventCode=4104" OR "EventCode=4103") ("GetCurrent" OR "UserName")
Stage 2: table
| table _time, host, user process, process_*, signature_id, user
Stage 3: bucket
| bin span=60s
Stage 4: stats
| stats values(*) as * by _time, host
Stage 5: where
| where match(process, "(?i)((GetCurrent)|(\[System\.Environment\]::UserName))")
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
process | regex_match |
| field:"CommandLine" kind:regex_match |
Search terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "<EventID>4104<" |
| 1 | "<EventID>4103<" |
| 1 | "EventCode=4104" |
| 1 | "EventCode=4103" |
| 1 | "GetCurrent" |
| 1 | "UserName" |