ID | Name |
---|---|
T1059.001 | PowerShell |
T1059.002 | AppleScript |
T1059.003 | Windows Command Shell |
T1059.004 | Unix Shell |
T1059.005 | Visual Basic |
T1059.006 | Python |
T1059.007 | JavaScript |
T1059.008 | Network Device CLI |
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.[1][2]
Derivative languages based on VB have also been created, such as Visual Basic for Applications (VBA) and VBScript. VBA is an event-driven programming language built into Microsoft Office, as well as several third-party applications.[3][4] VBA enables documents to contain macros used to automate the execution of tasks and other functionality on the host. VBScript is a default scripting language on Windows hosts and can also be used in place of JavaScript on HTML Application (HTA) webpages served to Internet Explorer (though most modern browsers do not come with VBScript support).[5]
Adversaries may use VB payloads to execute malicious commands. Common malicious usage includes automating execution of behaviors with VBScript or embedding VBA content into Spearphishing Attachment payloads.
ID | Name | Description |
---|---|---|
G0099 | APT-C-36 |
APT-C-36 has embedded a VBScript within a malicious Word document which is executed upon the document opening.[6] |
G0016 | APT29 | |
G0050 | APT32 |
APT32 has used macros, COM scriptlets, and VBS scripts.[8][9] |
G0064 | APT33 |
APT33 has used VBScript to initiate the delivery of payloads.[10] |
G0067 | APT37 |
APT37 executes shellcode and a VBA script to decode Base64 strings.[11] |
G0082 | APT38 |
APT38 has used VBScript to execute commands and other operational tasks.[12] |
G0087 | APT39 | |
S0373 | Astaroth |
Astaroth has used malicious VBS e-mail attachments for execution.[14] |
S0475 | BackConfig |
BackConfig has used VBS to install its downloader component and malicious documents with VBA macro code.[15] |
S0234 | Bandook |
Bandook has used malicious VBA code against the target system.[16] |
S0268 | Bisonal |
Bisonal's dropper creates VBS scripts on the victim’s machine.[17] |
G0060 | BRONZE BUTLER |
BRONZE BUTLER has used VBS and VBE scripts for execution.[18][19] |
S0631 | Chaes | |
G0080 | Cobalt Group |
Cobalt Group has sent Word OLE compound documents with malicious obfuscated VBA macros that will run upon user execution.[21][22][23][24][25][26] |
S0154 | Cobalt Strike |
Cobalt Strike can use VBA to perform execution.[27][28][29] |
S0244 | Comnie | |
S0367 | Emotet |
Emotet has sent Microsoft Word documents with embedded macros that will invoke scripts to download additional payloads. [31][32][33][34][35] |
S0343 | Exaramel for Windows |
Exaramel for Windows has a command to execute VBS scripts on the victim’s machine.[36] |
G0085 | FIN4 |
FIN4 has used VBA macros to display a dialog box and collect victim credentials.[37][38] |
G0046 | FIN7 |
FIN7 used VBS scripts to help perform tasks on the victim's machine.[39][40][41] |
G0101 | Frankenstein |
Frankenstein has used Word documents that prompts the victim to enable macros and run a Visual Basic script.[42] |
G0047 | Gamaredon Group |
Gamaredon Group has embedded malicious macros in document templates, which executed VBScript. Gamaredon Group has also delivered Microsoft Outlook VBA projects with embedded macros.[43][44] |
S0477 | Goopy |
Goopy has the ability to use a Microsoft Outlook backdoor macro to communicate with its C2.[9] |
G0078 | Gorgon Group |
Gorgon Group has used macros in Spearphishing Attachments as well as executed VBScripts on victim machines.[45] |
S0531 | Grandoreiro |
Grandoreiro can use VBScript to execute malicious code.[14][46] |
S0170 | Helminth | |
G0126 | Higaisa | |
G0072 | Honeybee |
Honeybee embeds a Visual Basic script within a malicious Word document as part of initial access; the script is executed when the Word document is opened.[49] |
S0483 | IcedID | |
G0100 | Inception |
Inception has used VBScript to execute malicious commands and payloads.[51][52] |
S0528 | Javali |
Javali has used embedded VBScript to download malicious payloads from C2.[14] |
S0389 | JCry | |
S0283 | jRAT | |
S0648 | JSS Loader |
JSS Loader can download and execute VBScript files.[41] |
S0585 | Kerrdown |
Kerrdown can use a VBS base64 decoder function published by Motobit.[55] |
S0387 | KeyBoy |
KeyBoy uses VBS scripts for installing files and performing execution.[56] |
G0094 | Kimsuky |
Kimsuky has used Visual Basic to download malicious payloads.[57][58][59] |
S0250 | Koadic |
Koadic performs most of its operations using Windows Script Host (VBScript) and runs arbitrary shellcode .[60] |
G0065 | Leviathan | |
S0447 | Lokibot |
Lokibot has used VBS scripts and XLS macros for execution.[62] |
S0582 | LookBack |
LookBack has used VBA macros in Microsoft Word attachments to drop additional files to the host.[63] |
G0095 | Machete |
Machete has embedded malicious macros within spearphishing attachments to download additional files.[64] |
G0059 | Magic Hound |
Magic Hound malware has used VBS scripts for execution.[65] |
S0530 | Melcoz | |
S0455 | Metamorfo | |
G0021 | Molerats |
Molerats used various implants, including those built with VBScript, on target machines.[67][68] |
G0069 | MuddyWater |
MuddyWater has used VBScript files to execute its POWERSTATS payload, as well as macros.[69][70][71][72][73][74][75][76] |
G0129 | Mustang Panda |
Mustang Panda has embedded VBScript components in LNK files to download additional files and automate collection.[77][78][79] |
S0228 | NanHaiShu |
NanHaiShu executes additional VBScript code on the victim's machine.[80] |
S0336 | NanoCore | |
S0198 | NETWIRE | |
G0049 | OilRig |
OilRig has used VBSscipt macros for execution on compromised hosts.[84] |
S0264 | OopsIE |
OopsIE creates and uses a VBScript as part of its persistent execution.[85][86] |
G0116 | Operation Wocao |
Operation Wocao has used a VBScript to conduct reconnaissance on targeted systems.[87] |
S0352 | OSX_OCEANLOTUS.D |
OSX_OCEANLOTUS.D uses Word macros for execution.[88] |
G0040 | Patchwork |
Patchwork used Visual Basic Scripts (VBS) on victim machines.[89][90] |
S0428 | PoetRAT |
PoetRAT has used Word documents with VBScripts to execute malicious activities.[91][92] |
S0441 | PowerShower |
PowerShower has the ability to save and execute VBScript.[51] |
S0223 | POWERSTATS |
POWERSTATS can use VBScript (VBE) code for execution.[73][93] |
S0650 | QakBot |
QakBot can use VBS to download and execute malicious files.[94][95][96][97][98][99] |
S0269 | QUADAGENT | |
S0458 | Ramsay |
Ramsay has included embedded Visual Basic scripts in malicious documents.[101][102] |
G0075 | Rancor |
Rancor has used VBS scripts as well as embedded macros for execution.[103] |
S0375 | Remexi |
Remexi uses AutoIt and VBS scripts throughout its execution process.[104] |
S0496 | REvil |
REvil has used obfuscated VBA macros for execution.[105][106] |
G0034 | Sandworm Team |
Sandworm Team has created VBScripts to run an SSH server.[107][108][109][110] |
G0104 | Sharpshooter |
Sharpshooter's first-stage downloader was a VBA macro.[111] |
S0589 | Sibot | |
G0121 | Sidewinder |
Sidewinder has used VBScript to drop and execute malware loaders.[113] |
G0091 | Silence | |
S0226 | Smoke Loader |
Smoke Loader adds a Visual Basic script in the Startup folder to deploy the payload.[115] |
S0380 | StoneDrill |
StoneDrill has several VBS scripts used throughout the malware's lifecycle.[116] |
S0559 | SUNBURST |
SUNBURST used VBScripts to initiate the execution of payloads.[117] |
G0062 | TA459 | |
G0092 | TA505 | |
G0134 | Transparent Tribe |
Transparent Tribe has crafted VBS-based malicious documents.[123][124] |
G0010 | Turla | |
S0263 | TYPEFRAME |
TYPEFRAME has used a malicious Word document for delivery with VBA macros for execution.[126] |
S0386 | Ursnif |
Ursnif droppers have used VBA macros to download and execute the malware's full executable payload.[127] |
S0442 | VBShower | |
G0112 | Windshift | |
G0090 | WIRTE | |
S0341 | Xbash |
Xbash can execute malicious VBScript payloads on the victim’s machine.[131] |
ID | Mitigation | Description |
---|---|---|
M1049 | Antivirus/Antimalware |
Anti-virus can be used to automatically quarantine suspicious files. |
M1040 | Behavior Prevention on Endpoint |
On Windows 10, enable Attack Surface Reduction (ASR) rules to prevent Visual Basic scripts from executing potentially malicious downloaded content [132]. |
M1042 | Disable or Remove Feature or Program |
Turn off or restrict access to unneeded VB components. |
M1038 | Execution Prevention |
Use application control where appropriate. |
M1021 | Restrict Web-Based Content |
Script blocking extensions can help prevent the execution of scripts and HTA files that may commonly be used during the exploitation process. For malicious code served up through ads, adblockers can help prevent that code from executing in the first place. |
ID | Data Source | Data Component |
---|---|---|
DS0017 | Command | Command Execution |
DS0011 | Module | Module Load |
DS0009 | Process | Process Creation |
DS0012 | Script | Script Execution |
Monitor for events associated with VB execution, such as Office applications spawning processes, usage of the Windows Script Host (typically cscript.exe or wscript.exe), file activity involving VB payloads or scripts, or loading of modules associated with VB languages (ex: vbscript.dll). VB execution is likely to perform actions with various effects on a system that may generate events, depending on the types of monitoring used. Monitor processes and command-line arguments for execution and subsequent behavior. Actions may be related to network and system information Discovery, Collection, or other programable post-compromise behaviors and could be used as indicators of detection leading back to the source.
Understanding standard usage patterns is important to avoid a high number of false positives. If VB execution is restricted for normal users, then any attempts to enable related components running on a system would be considered suspicious. If VB execution is not commonly used on a system, but enabled, execution running out of cycle from patching or other administrator functions is suspicious. Payloads and scripts should be captured from the file system when possible to determine their actions and intent.