Detection of Rundll32 Inline HTA Execution
Adversaries leverage rundll32.exe with inline protocol handlers like VBScript or JavaScript to execute fileless payloads and bypass security controls.
Attackers frequently utilize the legitimate Windows binary 'rundll32.exe' to execute malicious code via inline protocol handlers, specifically leveraging VBScript, JavaScript, or the 'About' protocol. This technique facilitates fileless malware execution and effectively bypasses application whitelisting and traditional signature-based security controls. By embedding scripts directly into the command line, actors can maintain persistence and execute arbitrary payloads without dropping traditional executable files to the disk. This activity is a known component of various campaigns, including those attributed to NOBELIUM, APT37, and broader 'Living Off The Land' (LotL) tactics. Security teams must monitor command-line arguments of rundll32.exe to detect instances where it is invoked with script-based protocols instead of its intended function of executing DLL exports.
Attack Chain
- Initial access is established, often via a spearphishing email with a malicious document or a drive-by download.
- The attacker triggers a secondary stage, such as a script embedded in a document or a malicious link.
- The attacker invokes 'rundll32.exe' from the command line or via a script launcher.
- The command line includes an inline handler such as 'vbscript:' or 'javascript:' to point to the malicious payload.
- Rundll32.exe processes the inline script, bypassing standard file integrity checks.
- Malicious code executes in memory, providing a foothold for C2 communication or credential theft.
- The attacker ensures persistence through scheduled tasks or registry modifications.
Impact
Successful execution of this technique allows for stealthy code execution, potential credential harvesting, and long-term persistence within the target environment. Because the primary process is a legitimate system binary, it is often overlooked by legacy security monitoring, increasing the dwell time for adversaries. This technique has been documented in operations targeting diverse sectors by advanced persistent threat groups.
Recommendation
Prioritize the deployment of the provided Sigma rule to monitor for suspicious rundll32.exe command-line arguments. Enable Sysmon or Windows Security event logs to capture command-line telemetry across all endpoints. Conduct periodic threat hunting for rundll32.exe processes exhibiting unexpected parent-child relationships or anomalous command-line usage. Ensure EDR tools are tuned to alert on instances of script handlers used as parameters for system binaries.
Immediate actions
Deploy Sigma detection rule to SIEM and tune for environment-specific legitimate usage.
Threat Hunt
Search for rundll32 processes with script-related protocol strings in the command line.
Data: Process creation logs
Detection coverage 1
Detect Rundll32 Inline HTA Execution
mediumDetects the execution of rundll32.exe with inline protocol handlers like JavaScript or VBScript, often used for fileless execution or bypasses.
Detection queries are available on the platform. Get full rules →