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
Discovery

References

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

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

These rows show field, operator, and value matches.

FieldKindValuesSearch
EventCodeeq
  • 1 corpus 241 (splunk 225, kusto 15, elastic 1)
field:"EventID" kind:eq value:"1"
dc_process_namegt
  • 2 corpus 4 (splunk 4)
field:"dc_process_name" kind:gt value:"2"
processregex_match
  • "(?i)(whoami|useraccount|quser|qwinsta)" corpus 2 (splunk 2)
field:"CommandLine" kind:regex_match

Search terms

These SPL tokens match against raw event text.

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