Detection rules › Splunk

System Owner_User Discovery - Windows (Sysmon)

Group by
_time, host, user
Source
github.com/anvilogic-forge/armory

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

TacticTechniques
DiscoveryT1033 System Owner/User Discovery

References

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

id: '13454.19255'
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_sysmon` (TERM(EventCode=1) OR "<EventID>1<")
  ("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 Sysmon
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_sysmon` (TERM(EventCode=1) OR "<EventID>1<") ("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

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
  • 1 corpus 237 (splunk 224, kusto 13)
dc_process_namegt
  • 2 corpus 4 (splunk 4)
processregex_match
  • "(?i)(whoami|useraccount|quser|qwinsta)" corpus 2 (splunk 2)

Search terms

Bare-string tokens in the SPL search body. Splunk matches each token against _raw (the untyped raw event text) anywhere it appears, not against a specific field. These don't surface in the Indicators table because they aren't predicates on a known field.

StageTerm
1TERM
1"<EventID>1<"
1"whoami"
1"useraccount"
1"quser"
1"qwinsta.exe"