Detection rules › Splunk

Remote Admin Tools (Sysmon)

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

PsExec, RemCom, PaExec, and CsExec are administrative command-line utilities that allow remote command execution

MITRE ATT&CK coverage

References

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

id: '5343.5722'
title: 'Remote Admin Tools  '
description: 'PsExec, RemCom, PaExec, and CsExec are administrative command-line utilities
  that allow remote command execution Threat Actor Association: Antlion, DarkSide,
  BlackMatter, APT29/Nobelium, APT31, Carbanak, FIN6, FIN7, FIN8, FIN12, Fox Kitten,
  GoldenJackal, Hello Kitty / Five Hands, MalKamak, Muddled Libra, OilRig, Traveling
  Spider, UNC2596, Vice Society, Wizard Spider - Software Association: ALPHV/BlackCat,
  AvosLocker, BianLian, Blackbyte, Blacksuit, Black Basta, Conti, Cuba, GhostShell,
  Lockbit, Play, Prometheus/Spook, Prestige, PYSA/Mespinoza, Quantum, Rhysida, Royal,
  Vice Society - Atomics T1021.002 Test#3'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_sysmon` EventCode=1 ".exe" "\\\\"|
  regex process="(\.exe(\")?\s+|\/c.{1,}?)\x5c\x5c.{2,}" | table _time, host, user
  process, process_*, parent_process, parent_process_*, src_user | bin span=1s | stats
  values(*) as * by _time, host, process `hec_collect`'
techniques:
- execution:system services:service execution
- lateral-movement:remote services
- execution:command and scripting interpreter:windows command shell
- lateral-movement:lateral tool transfer
technique_id:
- T1569.002
- T1021
- T1059.003
- T1570
data_category:
- Windows Sysmon
references:
- https://redcanary.com/blog/threat-hunting-psexec-lateral-movement/

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_sysmon` EventCode=1 ".exe" "\\\\"

Stage 2: regex

| regex process="(\.exe(\")?\s+|\/c.{1,}?)\x5c\x5c.{2,}"

Stage 3: table

| table _time, host, user process, process_*, parent_process, parent_process_*, src_user

Stage 4: bucket

| bin span=1s

Stage 5: stats

| stats values(*) as * by _time, host, process `hec_collect`

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)
processregex_match
  • "(.exe(\")?\s+|\/c.{1,}?)\x5c\x5c.{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
1".exe"
1"\\\\"