Command and Scripting Interpreter: Visual Basic T1059.005

Tactic: Execution

Adversaries may abuse Visual Basic (VB) for execution. VB is a programming language created by Microsoft with interoperability with many Windows technologies such as Component Object Model and the Native API through the Windows API. Although tagged as legacy with no planned future evolutions, VB is integrated and supported in the .NET Framework and cross-platform .NET Core.

Events covered

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

Authoring guide

Patterns shared across the 62 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 (46 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
Image27ends_with 20, contains 3, wildcard 3, in 1, ne 1\cscript.exe, \wscript.exe, \cmd.exe, \mshta.exe, \certutil.exe
process_name25eq 17, in 5, regex_match 4, starts_with 1cscript.exe, wscript.exe, cmd.exe, powershell.exe, mshta.exe
CommandLine23contains 19, regex_match 2, ends_with 1, is_not_null 1, wildcard 1(?i)(w|c)script.{1,}?\.\w{2,4}, ://, \\\\, gathernetworkinfo.vbs, /c ping.exe -n 6 127.0.0.1 & type
parent_process_name20eq 12, in 4, regex_match 4mshta.exe, cscript.exe, 7zFM.exe, cmd.exe, explorer.exe
event.type16eq 16start, change, creation
OriginalFileName14eq 13, in 1cscript.exe, cmd.exe, wscript.exe, powershell.exe, wmic.exe
EventID10eq 101, 4688, 22, 4104
process.args8eq 3, wildcard 3, ends_with 1, is_not_null 1, starts_with 1*Reflection.Assembly*, *downloadstring*, *http*, -i, -n
EventType7eq 5, starts_with 2Image loaded, start, ClrUnbackedModuleLoaded, creation, exec
ParentImage7ends_with 7, eq 1, starts_with 1\bginfo.exe, \bginfo64.exe, \cscript.exe, \mshta.exe, \bun.exe
TargetFilename4contains 3, ends_with 2.exe, .js, .jse, .vba, .vbs
event.category4eq 4process, driver, library
ParentCommandLine3contains 3, regex_match 1(?:[Pp]rogram[Dd]ata|%(?:[Ll]ocal)?[Aa]pp[Dd]ata%|\\[Aa]p..., -encoded , //e:vbscript, :\perflogs\, \nessus_
dll.name3eq 3msxml3.dll, taskschd.dll, wmiutils.dll
process.args_count3ge 2, eq 12

Top indicator values (533 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
14606
Imageends_with
\cscript.exe
1073
Imageends_with
\wscript.exe
1075
Imageends_with
\mshta.exe
567
Imageends_with
\cmd.exe
4130
Imageends_with
\powershell.exe
3182
Imageends_with
\wmic.exe
360
process_nameeq
wscript.exe
829
process_nameeq
cscript.exe
725
process_nameeq
powershell.exe
6104
process_nameeq
mshta.exe
531
process_nameeq
rundll32.exe
560
process_nameeq
cmd.exe
477
parent_process_nameeq
wscript.exe
511
parent_process_nameeq
explorer.exe
320
parent_process_nameeq
mshta.exe
312
OriginalFileNameeq
cscript.exe
419
OriginalFileNameeq
wscript.exe
420
OriginalFileNameeq
cmd.exe
365
OriginalFileNameeq
powershell.exe
3120
event.categoryeq
process
4128
process_namein
cscript.exe
420
process_namein
wscript.exe
419
process_namein
pwsh.exe
322
CommandLinecontains
.wsf
34
CommandLinecontains
.js
29
CommandLinecontains
.jse
23
CommandLinecontains
.vba
22
EventIDeq
1
3237
EventIDeq
4688
3313

Exclusions (171 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
user.ideq
S-1-5-18
3
Imageends_with
\wscript.exe
2
process_nameregex_match
(?i)windowsupdatelog
2
CommandLinecontains
.\\install\\awk.exe
1
CommandLinecontains
://
1
CommandLinecontains
\\\\
1
CommandLinecontains
\autorun.hta
1
CommandLinecontains
\nessus_
1
CommandLinecontains
\smssetup\bin\
1
CommandLinecontains
c:\mem_configmgr_
1
CommandLinecontains
format:csv
1
CommandLinecontains
format:hform
1
CommandLinecontains
format:htable
1
CommandLinecontains
format:list
1
CommandLinecontains
format:mof
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 28 rules

Elastic 18 rules

Splunk 15 rules

Kusto 1 rule