ATT&CK coverage › Technique

Command and Scripting Interpreter: Visual Basic T1059.005

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

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

ProviderEvent IDTitle
Sysmon1Process creation
Sysmon7Image loaded
Sysmon8CreateRemoteThread
Sysmon11FileCreate
Sysmon12RegistryEvent (Object create and delete)
Sysmon13RegistryEvent (Value Set)
Sysmon14RegistryEvent (Key and Value Rename)
Sysmon19WmiEvent (WmiEventFilter activity detected)
Sysmon20WmiEvent (WmiEventConsumer activity detected)
Sysmon21WmiEvent (WmiEventConsumerToFilter activity detected)
Sysmon22DNSEvent (DNS query)
Security-Auditing4688A new process has been created.
AppLocker8004FilePathBuffer was prevented from running.
AppLocker8007FilePathBuffer was prevented from running.
AppLocker8022PackageBuffer was prevented from running.
AppLocker8025PackageBuffer was prevented from running.
PowerShell4104Creating Scriptblock text (MessageNumber of MessageTotal).

Authoring guide

Patterns shared across the 26 rules above: which fields they filter on, what specific values they look for, and what they exclude. Field names are normalized 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 (16 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
Image20ends_with 16, match 3, in 1, ne 1\cscript.exe, \wscript.exe, \wmic.exe, \mshta.exe, \csc.exe
CommandLine10match 10\AppData\Local\Temp\, gatherNetworkInfo.vbs, .dat, .doc, .gif
OriginalFileName7eq 7wscript.exe, cscript.exe, wmic.exe, csc.exe, Cmd.Exe
ParentImage5ends_with 5, starts_with 1, eq 1\bginfo64.exe, \bginfo.exe, \excel.exe, \onenote.exe, C:\Windows\System32\sdiagnhost.exe
TargetFilename4match 2, ends_with 1, starts_with 1, eq 1.vbs, .exe, \Retrive, \Temp\_MEI, \nxc\data\
ParentCommandLine2match 2, regex_match 1FromBase64String, \Contacts\, :\Windows\Temp\, \splash.hta, C:\MEM_Configmgr_
Hashes2match 2IMPHASH=16A48C3CABF98A9DC1BF02C07FE1EA00, IMPHASH=1B1A3F43BF37B5BFE60751F2EE2F326E, IMPHASH=9D87C9D67CE724033C0B40CC4CA1B206
QueryName2in 1, eq 1"*discord*", "*t.me*", "*pastebin*"
EventID2eq 222
TargetImage1match 1\SysWOW64\
StartModule1is_null 1
ImageLoaded1ends_with 1\jscript.dll, \vbscript.dll, \jscript9.dll
ScriptBlockText1match 1CreateObject, Wscript.shell, .RegWrite
TargetObject1match 1SOFTWARE\Microsoft\Windows NT\CurrentVersion\Notifications\Data\, Software\Microsoft\Windows\CurrentVersion\Internet Settings\, Software\Microsoft\Windows Script\Settings\Telemetry\wscript.exe\
CurrentDirectory1match 1\ccmcache\

Top indicator values (200 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.

FieldKindValueRules (here)Corpus reach
Imageends_with\cscript.exe864
Imageends_with\wscript.exe864
Imageends_with\cmd.exe392
Imageends_with\wmic.exe337
Imageends_with\mshta.exe357
ParentImageends_with\wscript.exe214
ParentImageends_with\mshta.exe210
ParentImageends_with\powershell.exe216
ParentImageends_with\pwsh.exe216
ParentImageends_with\cscript.exe214
OriginalFileNameeqcscript.exe215
OriginalFileNameeqwscript.exe215
Imageends_with\pwsh.exe2140
Imageends_with\powershell.exe2143
Imageends_with\schtasks.exe245
CommandLinematch\AppData\Local\Temp\216
CommandLinematchgatherNetworkInfo.vbs22
HashesmatchIMPHASH=9D87C9D67CE724033C0B40CC4CA1B20622
HashesmatchIMPHASH=B12619881D79C3ACADF45E752A58554A22
HashesmatchIMPHASH=37777A96245A3C74EB217308F3546F4C22

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.

Sigma 23 rules

Splunk 3 rules