T1218.001 Elastic Security · Elastic

Detect Compiled HTML File in Elastic Security

Adversaries may abuse Compiled HTML files (.chm) to conceal malicious code. CHM files are commonly distributed as part of the Microsoft HTML Help system and are compressed compilations of HTML documents, images, and scripting languages such as VBA, JScript, Java, and ActiveX. CHM content is displayed using underlying components of the Internet Explorer browser loaded by the HTML Help executable program (hh.exe). A custom CHM file containing embedded payloads could be delivered to a victim then triggered by User Execution. CHM execution may also bypass application control on older and/or unpatched systems. Groups known to abuse CHM files include OilRig, Dark Caracal, Silence, APT41, and APT38.

MITRE ATT&CK

Tactic
Defense Evasion
Technique
T1218 System Binary Proxy Execution
Sub-technique
T1218.001 Compiled HTML File
Canonical reference
https://attack.mitre.org/techniques/T1218/001/

Elastic Detection Query

Elastic Security (Elastic)
eql
sequence by host.name with maxspan=30s
  [process where event.type == "start" and
   process.name : "hh.exe" and
   (process.args : ("*.chm", "ms-its:*", "mk:@MSITStore*", "http://*", "https://*", "\\\\*") or
    process.parent.name : ("winword.exe", "excel.exe", "outlook.exe", "powerpnt.exe", "cmd.exe", "wscript.exe", "cscript.exe", "mshta.exe"))]
  [process where event.type == "start" and
   process.parent.name : "hh.exe" and
   process.name : ("cmd.exe", "powershell.exe", "wscript.exe", "cscript.exe", "mshta.exe", "rundll32.exe", "regsvr32.exe", "certutil.exe")]

/* Standalone: hh.exe with suspicious indicators */
process where event.type == "start" and
  process.name : "hh.exe" and
  (
    process.args : ("ms-its:*", "mk:@MSITStore*") or
    process.args : ("http://*", "https://*", "\\\\*") or
    process.parent.name : ("winword.exe", "excel.exe", "outlook.exe", "powerpnt.exe", "wscript.exe", "cscript.exe", "mshta.exe")
  )
high severity high confidence

Detects abuse of hh.exe (HTML Help executable) to execute malicious CHM files. The sequence rule correlates hh.exe execution with suspicious command-line arguments or parents followed by child process spawning. The standalone rule catches hh.exe invoked via Office applications or with remote/protocol-based CHM loading (ms-its:, mk:@MSITStore, HTTP/UNC paths). Covers T1218.001 abuse patterns used by OilRig, APT41, and Silence threat groups.

Data Sources

Elastic Endpoint SecurityWinlogbeat with SysmonElastic Agent (endpoint)

Required Tables

logs-endpoint.events.process-*winlogbeat-*

False Positives & Tuning

  • Legitimate Windows Help system invocations where developers or IT staff open .chm documentation files directly from disk without suspicious parents
  • Helpdesk or IT management tools that bundle CHM-based documentation and launch hh.exe programmatically from known software directories
  • Software installers that extract and display embedded CHM help files during installation routines — common in older enterprise software suites
Download portable Sigma rule (.yml)

Other platforms for T1218.001


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1CHM Execution via hh.exe with Embedded Script

    Expected signal: Sysmon Event ID 1: Process Create with Image=hh.exe, CommandLine containing 'ms-its:' and '.chm'. Security Event ID 4688 if command line auditing is enabled. Any child process creation (if CHM contains script) will also appear as Sysmon Event ID 1 with ParentImage=hh.exe.

  2. Test 2CHM File Spawning PowerShell

    Expected signal: Sysmon Event ID 1 for hh.exe, then a child Sysmon Event ID 1 for powershell.exe with ParentImage=hh.exe. The suspicious child process relationship is the primary detection indicator. Security Event ID 4688 for both processes if command line auditing is on.

  3. Test 3CHM File Opened from Email Attachment Location

    Expected signal: Sysmon Event ID 11: File Create in the Outlook temp path. Sysmon Event ID 1: hh.exe with the Outlook temp path in its command line. File System: CHM file written to Content.Outlook directory.

Unlock Pro Content

Get the full detection package for T1218.001 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections