Command and Scripting Interpreter: JavaScript
- ID
- T1059.007
- Tactics
- TA0002 Execution
- Sub-technique of
- T1059 Command and Scripting Interpreter
- Platforms
- Linux, macOS, Windows
- Data sources
- Process Creation, Script Execution, Module Load, Command Execution
- Source
- attack.mitre.org
- MITRE last modified
- 12 May 2026
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.[2]
JScript is the Microsoft implementation of the same scripting standard. JScript is interpreted via the Windows Script engine and thus integrated with many components of Windows such as the Component Object Model and Internet Explorer HTML Application (HTA) pages.[3][4][5]
JavaScript for Automation (JXA) is a macOS scripting language based on JavaScript, included as part of Apple’s Open Scripting Architecture (OSA), that was introduced in OSX 10.10. Apple’s OSA provides scripting capabilities to control applications, interface with the operating system, and bridge access into the rest of Apple’s internal APIs. As of OSX 10.10, OSA only supports two languages, JXA and AppleScript. Scripts can be executed via the command line utility osascript, they can be compiled into applications or script files via osacompile, and they can be compiled and executed in memory of other programs by leveraging the OSAKit Framework.[6][7][8][9][10]
Adversaries may abuse various implementations of JavaScript to execute various behaviors. Common uses include hosting malicious scripts on websites as part of a Drive-by Compromise or downloading and executing these script files as secondary payloads. Since these payloads are text-based, it is also very common for adversaries to obfuscate their content as part of Obfuscated Files or Information.
Detection
- DET0264 Cross-Platform Detection of JavaScript Execution Abuse
Data components: Process Creation, Script Execution, Module Load, Command Execution
Mitigations (4)
- M1021 Restrict Web-Based Content
Script blocking extensions can help prevent the execution of JavaScript 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.
- M1038 Execution Prevention
Denylist scripting where appropriate.
- M1040 Behavior Prevention on Endpoint
On Windows 10, enable Attack Surface Reduction (ASR) rules to prevent JavaScript scripts from executing potentially malicious downloaded content [1].
- M1042 Disable or Remove Feature or Program
Turn off or restrict access to unneeded scripting components.
Groups (30)
- G0010 Turla
- G0021 Molerats
- G0037 FIN6
- G0046 FIN7
- G0050 APT32
- G0069 MuddyWater
- G0077 Leafminer
- G0080 Cobalt Group
- G0082 APT38
- G0091 Silence
- G0092 TA505
- G0094 Kimsuky
- G0099 APT-C-36
- G0119 Indrik Spider
- G0120 Evilnum
- G0121 Sidewinder
- G0126 Higaisa
- G0129 Mustang Panda
- G0140 LazyScripter
- G1006 Earth Lusca
- G1019 MoustachedBouncer
- G1031 Saint Bear
- G1033 Star Blizzard
- G1035 Winter Vivern
- G1037 TA577
- G1038 TA578
- G1052 Contagious Interview
- G1056 TeamPCP
- G1057 ShinyHunters
- G1059 NIMBUS MANTICORE
Software (43)
- S0154 Cobalt Strike
- S0223 POWERSTATS
- S0228 NanHaiShu
- S0260 InvisiMole
- S0283 jRAT
- S0332 Remcos
- S0341 Xbash
- S0356 KONNI
- S0373 Astaroth
- S0417 GRIFFON
- S0455 Metamorfo
- S0476 Valak
- S0482 Bundlore
- S0622 AppleSeed
- S0631 Chaes
- S0634 EnvyScout
- S0640 Avaddon
- S0646 SpicyOmelette
- S0648 JSS Loader
- S0650 QakBot
- S0673 DarkWatchman
- S0695 Donut
- S1075 KOPILUWAK
- S1116 WARPWIRE
- S1124 SocGholish
- S1138 Gootloader
- S1144 FRP
- S1160 Latrodectus
- S1180 BlackByte Ransomware
- S1183 StrelaStealer
- S1246 BeaverTail
- S1248 XORIndex Loader
- S1249 HexEval Loader
- S9003 evilginx2
- S9008 Shai-Hulud
- S9010 GlassWorm
- S9031 AshTag
- S9034 Tsundere Botnet
- S9041 TeamPCP Cloud Stealer
- S9042 CanisterWorm
- S9043 Mini Shai-Hulud
- S9044 Kali365
- S9062 MiniBrowse
