Detection rules › Splunk

System Owner_User Discovery - Windows (PowerShell)

Group by
_time, host
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

Rule body yaml

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

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
processmatch
  • "(?i)((GetCurrent)|(\[System\.Environment\]::UserName))"

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
1"<EventID>4104<"
1"<EventID>4103<"
1"EventCode=4104"
1"EventCode=4103"
1"GetCurrent"
1"UserName"