T1059.007 JavaScript — ATT&CK Technique
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. 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. 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. 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 coverage (36)
- WSF/JSE/JS/VBA/VBE File Execution Via Cscript/Wscript medium
- JXA In-memory Execution Via OSAScript high
- Potential In-Memory Download And Compile Of Payloads medium
- Suspicious Installer Package Child Process medium
- AppLocker Prevented Application or Script from Running medium
- HackTool - CACTUSTORCH Remote Thread Creation high
- Suspicious Deno File Written from Remote Source low
- WScript or CScript Dropper - File high
- Adwind RAT / JRAT File Artifact high
- Csc.EXE Execution Form Potentially Suspicious Parent high
- HTML Help HH.EXE Suspicious Child Process high
- Suspicious HH.EXE Execution high
- HackTool - Koadic Execution high
- MSHTA Execution with Suspicious File Extensions high
- Node Process Executions medium
- NodeJS Execution of JavaScript File low
- Potentially Suspicious Inline JavaScript Execution via NodeJS Binary medium
- Script Interpreter Spawning Credential Scanner - Windows high
- XSL Script Execution Via WMIC.EXE medium
- Potential Remote SquiblyTwo Technique Execution high
- Cscript/Wscript Uncommon Script Extension Execution high
- Potential Dropper Script Execution Via WScript/CScript/MSHTA medium
- New Agent Skills Installation Attempt Via Node.EXE medium
- Jscript Execution Using Cscript App
- MS Scripting Process Loading Ldap Module
- MS Scripting Process Loading WMI Module
- TanStack Supply-Chain Attack Execution Indicators - Windows high
- Windows Cmdline Tool Execution From Non-Shell Process
- Windows GrimResource - MMC Process Accessing APDS DLL
- TanStack Supply-Chain Attack File Creation Indicators - Linux medium
- TanStack Supply-Chain Attack File Creation Indicators - Windows medium
- TanStack Supply-Chain Attack Execution Indicators - Linux high
- AppLocker Application Would Have Been Blocked medium
- Adwind RAT / JRAT high
- MacOS Osascript Executing JavaScript Code With ObjC
- Windows Node.exe Executing JS Script In Immediate Folder
Malware using this technique
- TeamPCP Cloud Stealer
- AppleSeed
- Cobalt Strike
- Metamorfo
- BeaverTail
- FRP
- NanHaiShu
- QakBot
- BlackByte Ransomware
- Gootloader
- Avaddon
- StrelaStealer
- GRIFFON
- HexEval Loader
- SocGholish
- EnvyScout
- Valak
- Latrodectus
- InvisiMole
- Astaroth
- JSS Loader
- WARPWIRE
- Tsundere Botnet
- Donut
- Xbash
- MiniBrowse
- jRAT
- AshTag
- GlassWorm
- SpicyOmelette
- KOPILUWAK
- POWERSTATS
- Chaes
- Kali365
- Shai-Hulud
- Bundlore
- evilginx2
- CanisterWorm
- Mini Shai-Hulud
- Remcos
- KONNI
- XORIndex Loader
- DarkWatchman
Threat actors using this technique
- Molerats
- Leafminer
- Mustang Panda
- APT37
- Turla
- APT32
- Saint Bear
- FIN6
- Sidewinder
- MoustachedBouncer
- APT-C-36
- MuddyWater
- Earth Lusca
- ShinyHunters
- TA577
- Winter Vivern
- Silence
- Contagious Interview
- LazyScripter
- TA505
- FIN7
- Cobalt Group
- Higaisa
- TeamPCP
- Kimsuky
- Mirage Kitten
- Evil Corp
- APT38
- TA578
- Evilnum
- Star Blizzard