Detection rules › Splunk
Remote Admin Tools (EDR)
PsExec, RemCom, PaExec, and CsExec are administrative command-line utilities that allow remote command execution
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Execution | T1059.003 Command and Scripting Interpreter: Windows Command Shell, T1569.002 System Services: Service Execution |
| Lateral Movement | T1021 Remote Services, T1570 Lateral Tool Transfer |
References
Event coverage
| Provider | Event | Title |
|---|---|---|
| Sysmon | Event ID 1 | Process creation |
| Security-Auditing | Event ID 4688 | A new process has been created. |
Rule body yaml
id: '5343.18043'
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_edr` ((event_type IN ("childproc","netconn","proc"))
OR (TERM(ProcessRollup2) OR Type=Process) OR TERM(DeviceProcessEvents)) ".exe" "\\\\"|
regex process="(?i)((\.exe(\")?(\s+|\s+\/c)\s+)|(psexec.{1,}))(\"{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 '
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:
- EDR Logs
- Process command-line parameters
references:
- https://redcanary.com/blog/threat-hunting-psexec-lateral-movement/
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_edr` ((event_type IN ("childproc","netconn","proc")) OR (TERM(ProcessRollup2) OR Type=Process) OR TERM(DeviceProcessEvents)) ".exe" "\\\\"
Stage 2: regex
| regex process="(?i)((\.exe(\")?(\s+|\s+\/c)\s+)|(psexec.{1,}))(\"{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
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.
| Field | Kind | Values |
|---|---|---|
event_type | in |
|
process | regex_match |
|
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.
| Stage | Term |
|---|---|
| 1 | TERM |
| 1 | ProcessRollup2 |
| 1 | TERM |
| 1 | DeviceProcessEvents |
| 1 | ".exe" |
| 1 | "\\\\" |