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.[1]

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.[2],[3],[4]

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.[5],[6],[7],[8],[9]

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.

References

  1. OpenJS Foundation. (n.d.). Node.js. Retrieved June 23, 2020.
  2. Microsoft. (2018, May 31). Translating to JScript. Retrieved June 23, 2020.
  3. Microsoft. (2007, August 15). The World of JScript, JavaScript, ECMAScript …. Retrieved June 23, 2020.
  4. Microsoft. (2017, January 18). Windows Script Interfaces. Retrieved June 23, 2020.
  5. Apple. (2016, June 13). About Mac Scripting. Retrieved April 14, 2021.
  6. Pitt, L. (2020, August 6). Persistent JXA. Retrieved April 14, 2021.
  7. Phil Stokes. (2019, December 5). macOS Red Team: Calling Apple APIs Without Building Binaries. Retrieved July 17, 2020.
  8. Tony Lambert. (2021, February 18). Clipping Silver Sparrow’s wings: Outing macOS malware before it takes flight. Retrieved April 20, 2021.
  9. Dominic Chell. (2021, January 1). macOS Post-Exploitation Shenanigans with VSCode Extensions. Retrieved April 20, 2021.

Tichete legate

Legături
Tip de legătură Tichet
is related to Techniques
is blocked by Cross-Platform Detection of JavaScript Execution Abuse
is blocked by Behavior Prevention on Endpoint
is blocked by Execution Prevention
is blocked by Disable or Remove Feature or Program
is blocked by Restrict Web-Based Content
is blocked by Asset Governance
is blocked by Statutory, Regulatory & Contractual Compliance
is blocked by Configuration Management Program
is blocked by Least Functionality
is blocked by Continuous Monitoring Policy
is blocked by Malicious Code Protection (Antimalware)
is blocked by Documented Endpoint Security Protection Measures
is blocked by Extended Detection & Response (XDR)
is blocked by Password-Based Authentication
is blocked by Authenticator Feedback
is blocked by Restrictions on Shared Groups / Accounts
is blocked by Zero Trust Architecture (ZTA)
is blocked by Security Function Isolation
is blocked by Use of Live Data
is blocked by Vulnerability Remediation Process
is blocked by Asset Inventories
is blocked by Executive Leadership Oversight of Security, Compliance & Resilience Controls
is blocked by Secure Baseline Configurations
is blocked by Continuous Monitoring
is blocked by Endpoint File Integrity Monitoring (FIM)
is blocked by Mobile Code
is blocked by Account Management
is blocked by Access Enforcement
is blocked by Least Privilege
is blocked by Remote Access
is blocked by Memory Protection
is blocked by Input Data Validation
is blocked by Vulnerability Scanning