Detection rules › Splunk
Wscript_Cscript Execution (Sysmon)
Monitor the execution of wscript or cscript processes as these are commonly utilized by threat actors to run malicious VBScript or JScript code
MITRE ATT&CK coverage
References
Event coverage
| Provider | Event | Title |
|---|---|---|
| Sysmon | Event ID 1 | Process creation |
Rule body yaml
id: '1029.1033'
title: Wscript_Cscript Execution
description: 'Monitor the execution of wscript or cscript processes as these are commonly
utilized by threat actors to run malicious VBScript or JScript code Threat Actor
Association: Actinium/Gamaredon/Primitive Bear, Andariel, Antlion, APT10/menuPass,
APT28/Fancy Bear, APT29/Nobelium/Cozy Bear, APT31, APT33, APT35, APT37/Chinotto,
APT43, Blind Eagle/APT-C-36, Carbanak, Evilnum, FIN7, Gamaredon Group/Shuckworm,
Kimsuky, Mustang Panda (aka. Stately Taurus//Earth Preta/BRONZE PRESIDENT/TA416/RedDelta),
NewsPenguin, Prophet Spider, TA2541, TA428, TA551, UAC-0057 (GhostWriter), WIRTE,
Witchetty Software Association: Agent Tesla, Astaroth, Avaddon, Black Basta, BazarLoader,
Cring, DarkGate, MirrorBlast, NanoCore, PoetRAT, QakBot, RATDispenser, SquirrelWaffle,
Trickbot, Remcos RAT, WhisperGate, Zloader Atomics T1105 Test #11 Atomics T1059.005
Test #1 Atomics T1082 Test #9 Atomics T1547.001 Test #5 -- #TrendingThreat #Russia
#Ukraine'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_sysmon` (EventCode=1 OR "EventID>1")
("cscript.exe" OR "WScript.exe" OR "cscript" OR "wscript") | regex process="(?i)(w|c)script.{1,}?\.\w{2,4}"
| table _time, host, user process, process_*, parent_*, signature_id | bin span=1s
| stats values(*) as * by _time, host '
techniques:
- execution:command and scripting interpreter:visual basic
- execution:command and scripting interpreter:javascript
technique_id:
- T1059.007
- T1059.005
data_category:
- Windows Sysmon
references:
- https://secure.anvilogic.com/use_cases?id=AVL_UC1029
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_sysmon` (EventCode=1 OR "EventID>1") ("cscript.exe" OR "WScript.exe" OR "cscript" OR "wscript")
Stage 2: regex
| regex process="(?i)(w|c)script.{1,}?\.\w{2,4}"
Stage 3: table
| table _time, host, user process, process_*, parent_*, signature_id
Stage 4: bucket
| bin span=1s
Stage 5: stats
| stats values(*) as * by _time, host
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.
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 | "EventID>1" |
| 1 | "cscript.exe" |
| 1 | "WScript.exe" |
| 1 | "cscript" |
| 1 | "wscript" |