Command and Scripting Interpreter: JavaScript T1059.007

Tactic: Execution

Adversaries may abuse various implementations of JavaScript for execution. JavaScript (JS) is a platform-independent scripting language (compiled just-in-time at runtime) commonly associated with scripts in webpages, though JS can be executed in runtime environments outside the browser.

Events covered

16 catalog events are tagged with this technique by at least one rule.

Authoring guide

Patterns shared across the 70 rules above: which fields they filter on, what specific values they look for, and what they exclude. The catalog normalizes field names across vendors so Sigma's Image, Elastic's process.name, and Splunk's process_name collapse into one row. Each rule contributes at most once per row.

Fields filtered most (64 distinct)

The fields most rules look at when detecting this technique. The How column shows the operators authors use (eq, wildcard, regex_match, match) and how often each appears. Sample values are concrete examples to start from, not an exhaustive list.

FieldRulesHowSample values
process_name32eq 19, in 10, starts_with 6, wildcard 5, regex_match 2, ends_with 1bash, cscript.exe, node, cmd.exe, curl
event.type29eq 27, in 2start, process_started, creation
CommandLine27contains 20, wildcard 4, regex_match 2, ends_with 1, is_not_null 1.js, (?i)(w|c)script.{1,}?\.\w{2,4}, *eval(*, .bat, ://
Image24ends_with 17, wildcard 3, in 2, starts_with 2\cscript.exe, \wscript.exe, *\\cscript.exe, *\\wscript.exe, /dev/shm/
parent_process_name23eq 15, in 7, regex_match 2, starts_with 2cscript.exe, mshta.exe, node, ((?i)(powershell\.exe)|(cmd\.exe)|(services\.exe)|(dllhos..., 7zFM.exe
EventType16eq 12, in 3, starts_with 1exec, start, ProcessRollup2, creation, ClrUnbackedModuleLoaded
OriginalFileName15eq 15cmd.exe, cscript.exe, node.exe, wmic.exe, wscript.exe
host.os.type12eq 9, in 3
process.args10eq 5, wildcard 4, ends_with 2, contains 1, is_not_null 1, starts_with 1*/bin/*sh*, *import*pty*spawn*, *import*subprocess*call*, -c, -e
EventID9eq 91, 4104, 4688, 7, 4663
ParentCommandLine7contains 4, wildcard 3, is_not_null 1, regex_match 1 server.js, (?:[Pp]rogram[Dd]ata|%(?:[Ll]ocal)?[Aa]pp[Dd]ata%|\\[Aa]p..., */sap.com*/servlet_jsp/irj/*, *\sap.com*\servlet_jsp\irj\*, *extensionHost*
DestinationHostname4is_null 2, wildcard 2, ends_with 1, starts_with 1*.s3*.amazonaws.com, .cloudfront.net, calendar.app.google, eth-mainnet*, eth.*.com
ParentImage4ends_with 4, eq 1, starts_with 1/installer, /package_script_service, \bun.exe, \cscript.exe, \excel.exe
TargetFilename4contains 3, ends_with 1, wildcard 1.exe, .js, .jse, .vba, .vbs
event.category4eq 4process, driver, library

Top indicator values (835 distinct)

Specific (field, operator, value) combinations the rules check for, ranked by how many rules under this technique use each one. The Corpus reach column counts how many rules across the entire catalog (any technique) check the same combination. High numbers point to widely-used indicators that are likely noisy on their own; combine them with another condition for useful signal. Blank means the combination is specific to rules under this technique. Click a value to expand the rules under this technique that use it.

FieldKindValueRules (here)Corpus reach
event.typeeq
start
26606
process_namestarts_with
python
631
Imageends_with
\cscript.exe
573
Imageends_with
\wscript.exe
575
Imageends_with
\mshta.exe
367
Imageends_with
\wmic.exe
360
process_namewildcard
curl
516
process_namewildcard
python*
524
process_namewildcard
bash
414
process_namewildcard
sh
414
process_namewildcard
zsh
413
CommandLinecontains
.js
49
CommandLinecontains
.wsf
34
EventTypeeq
exec
4171
event.categoryeq
process
4128
process_nameeq
cscript.exe
425
process_nameeq
wscript.exe
429
process_nameeq
cmd.exe
377
process_namein
bash
488
process_namein
node
411
process_namein
sh
483
process_namein
zsh
482
EventTypein
exec
3171
EventTypein
start
3134
OriginalFileNameeq
cmd.exe
365
OriginalFileNameeq
cscript.exe
319
OriginalFileNameeq
node.exe
33
OriginalFileNameeq
wscript.exe
320
parent_process_nameeq
cscript.exe
37
parent_process_nameeq
wscript.exe
311

Exclusions (154 distinct)

Field/operator/value combinations excluded by rules under this technique (top-level not() clauses), sorted by how many rules exclude each. These are the false-positive paths the community has learned to filter out. A new rule that ignores the high-count entries here will likely fire on the same noisy paths. Click a value to expand the rules under this technique that exclude it.

FieldKindValueRules excluding
process_nameeq
cmd.exe
2
process_nameregex_match
(?i)windowsupdatelog
2
CommandLinecontains
.\\install\\awk.exe
1
CommandLinecontains
://
1
CommandLinecontains
\\\\
1
CommandLinecontains
adobe creative cloud experience\js
1
CommandLinecontains
format:csv
1
CommandLinecontains
format:hform
1
CommandLinecontains
format:htable
1
CommandLinecontains
format:list
1
CommandLinecontains
format:mof
1
CommandLinecontains
format:rawxml
1
CommandLinecontains
format:table
1
CommandLinecontains
format:value
1
CommandLinecontains
format:xml
1

Rules under this technique

Every rule in the catalog tagged with this technique, grouped by vendor. Click a rule title for its full predicates, exclusions, and indicators.

Platform (all)
Domain (all)

Sigma 23 rules

Elastic 35 rules

Splunk 11 rules

Kusto 1 rule