Potential LethalHTA Technique Execution

Last updated on:

Rule name

Rule type

Log sources

MITRE ATT&CK tags

Severity

Potential LethalHTA Technique Execution

Standard

Windows

Defense Evasion: System Binary Proxy Execution - Mshta (T1218.005)

Trouble

About the rule

Rule Type

Standard

Rule Description

LethalHTA is technique which involves spawning of Mshta.exe by svchost.exe process. Mshta.exe is usually run by user processes like browsers and scripts and not by system processes. This rule detects such instances where Mshta.exe is launched by the Service Host.

Severity

Trouble

Rule journey

Attack chain scenario

Initial Access → Privilege Escalation → Defense Evasion → Execution of Mshta.exe by svchost.exe

Impact

  • Process manipulation
  • System compromise
  • Defense evasion

Rule Requirement

Prerequisites

  • Windows Event Viewer

Log in to a domain controller with domain admin credentials and open the Group Policy Management Console. Create or edit a Group Policy Object linked to the appropriate organizational unit. Enable auditing for process creation and process termination events, ensuring success events are logged. For enhanced process tracking enable the inclusion of command line information in process creation events. Finally, create a new registry key "Microsoft-Windows-Security-Auditing/Operational" in the directory "Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog".

  • Sysmon

Install Sysmon from Microsoft Sysinternals and download the Sysmon configuration file that includes process creation monitoring. Add process creation events to the configuration file to capture all process creations. Finally, create a registry key "Microsoft-Windows-Sysmon/Operational" in the directory "Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog".

Criteria

Action1: actionname = "Process started" AND PARENTPROCESSNAME endswith "\svchost.exe" AND PROCESSNAME endswith "\mshta.exe" select Action1.HOSTNAME,Action1.MESSAGE,Action1.COMMANDLINE,Action1.FILE_NAME,Action1.PROCESSNAME,Action1.USERNAME,Action1.PARENTPROCESSNAME

Detection

Execution Mode

realtime

Log Sources

Windows

MITRE ATT&CK

Defense Evasion: System Binary Proxy Execution - Mshta (T1218.005)

Security Standards

Enabling this rule will help you meet the security standard's requirement listed below:

DE.AE-02: Potentially adverse events are analyzed to better understand associated activities.

When this rule is triggered, you're notified of the execution of Mshta.exe by svchost.exe. This enables you to identify malicious process executions in the system and detect the execution of the LethalHTA technique to evade detection in the network.

Author

Markus Neis

Future actions

Known False Positives

This rule might be triggered when Mshta.exe is launched by svchost.exe when invoked by third-party applications.

Next Steps

When this rule is triggered, the following measures can be implemented:

  1. Identification: Identify if the flagged event is a new incident or part of an existing incident.
  2. Analysis: Analyze the impact and extent of the incident to comprehend the severity of the attack using the Incident Workbench.
  3. Response: Respond promptly by initiating an automated workflow to interrupt the network connections and cease the malicious process.
  4. System process audit: Continuously monitor system processes to identify the execution of Mshta.exe by svchost.exe and detect attempts to evade detection using the LethalHTA technique.

Mitigation

Mitigation ID

Mitigation Name

Mitigation description

M1042

Disable or Remove Feature or Program

Disable Mshta.exe if not required.

M1038

Execution Prevention

Enforce application control policies to block execution of Mshta.exe.