Signed Binary Proxy Execution: Compiled HTML File

Adversaries may abuse Compiled HTML files (.chm) to conceal malicious code. CHM files are commonly distributed as part of the Microsoft HTML Help system. CHM files are compressed compilations of various content such as HTML documents, images, and scripting/web related programming languages such VBA, JScript, Java, and ActiveX. [1] CHM content is displayed using underlying components of the Internet Explorer browser [2] loaded by the HTML Help executable program (hh.exe). [3]

A custom CHM file containing embedded payloads could be delivered to a victim then triggered by User Execution. CHM execution may also bypass application application control on older and/or unpatched systems that do not account for execution of binaries through hh.exe. [4] [5]

Angreifer können kompilierte HTML-Dateien (.chm) missbrauchen, um bösartigen Code zu verstecken. CHM-Dateien werden in der Regel als Teil des Microsoft HTML-Hilfesystems verteilt. CHM-Dateien sind komprimierte Kompilationen verschiedener Inhalte wie HTML-Dokumente, Bilder und Skripting/Web-bezogene Programmiersprachen wie VBA, JScript, Java und ActiveX. (Zitat: Microsoft HTML Help Mai 2018) CHM-Inhalte werden mit Hilfe der zugrunde liegenden Komponenten des Internet Explorer-Browsers (Zitat: Microsoft HTML Help ActiveX) angezeigt, die vom ausführbaren HTML-Hilfeprogramm (hh.exe) geladen werden. (Zitat: Microsoft HTML Help Ausführbares Programm)

Eine benutzerdefinierte CHM-Datei, die eingebettete Nutzdaten enthält, könnte an ein Opfer geliefert und dann durch [User Execution] (/techniques/T1204) ausgelöst werden. Die CHM-Ausführung kann auch die Anwendungskontrolle auf älteren und/oder ungepatchten Systemen umgehen, die die Ausführung von Binärdateien über hh.exe nicht berücksichtigen. (Zitat: MsitPros CHM Aug 2017) (Zitat: Microsoft CVE-2017-8625 Aug 2017)

Les adversaires peuvent abuser des fichiers HTML compilés (.chm) pour dissimuler du code malveillant. Les fichiers CHM sont couramment distribués dans le cadre du système d'aide HTML de Microsoft. Les fichiers CHM sont des compilations compressées de divers contenus tels que des documents HTML, des images et des langages de programmation liés au script/web tels que VBA, JScript, Java et ActiveX. (Citation : Microsoft HTML Help Mai 2018) Le contenu CHM est affiché à l'aide de composants sous-jacents du navigateur Internet Explorer (Citation : Microsoft HTML Help ActiveX) chargés par le programme exécutable HTML Help (hh.exe). (Citation : Programme exécutable de l'aide HTML de Microsoft)

Un fichier CHM personnalisé contenant des charges utiles intégrées pourrait être livré à une victime puis déclenché par [User Execution] (/techniques/T1204). L'exécution de CHM peut également contourner le contrôle des applications sur les systèmes plus anciens et/ou non corrigés qui ne tiennent pas compte de l'exécution de binaires via hh.exe. (Citation : MsitPros CHM août 2017) (Citation : Microsoft CVE-2017-8625 août 2017)

Gli avversari possono abusare dei file Compiled HTML (.chm) per nascondere codice maligno. I file CHM sono comunemente distribuiti come parte del sistema Microsoft HTML Help. I file CHM sono compilazioni compresse di vari contenuti come documenti HTML, immagini e linguaggi di programmazione legati allo scripting/web come VBA, JScript, Java e ActiveX. (Citazione: Microsoft HTML Help May 2018) Il contenuto CHM viene visualizzato usando componenti sottostanti del browser Internet Explorer (Citazione: Microsoft HTML Help ActiveX) caricati dal programma eseguibile HTML Help (hh.exe). (Citazione: Programma eseguibile Microsoft HTML Help)

Un file CHM personalizzato contenente payloads incorporati potrebbe essere consegnato ad una vittima e poi innescato da [User Execution] (/techniques/T1204). L'esecuzione di CHM potrebbe anche bypassare il controllo dell'applicazione su sistemi più vecchi e/o senza patch che non tengono conto dell'esecuzione di binari attraverso hh.exe. (Citazione: MsitPros CHM Aug 2017) (Citazione: Microsoft CVE-2017-8625 Aug 2017)

Login
ID: T1218.001
Sub-technique of:  T1218
Tactic: Defense Evasion
Platforms: Windows
Permissions Required: User
Defense Bypassed: Application control, Digital Certificate Validation
Contributors: Rahmat Nurfauzi, @infosecn1nja, PT Xynexis International
Version: 1.0
Created: 23 January 2020
Last Modified: 20 June 2020
Translations:  DE FR IT EN
Provided by LAYER 8

Procedure Examples

ID Name Description
G0096 APT41

APT41 used compiled HTML (.chm) files for targeting.[6]

S0373 Astaroth

Astaroth uses ActiveX objects for file execution and manipulation. [7]

G0070 Dark Caracal

Dark Caracal leveraged a compiled HTML file that contained a command to download and run an executable.[8]

G0032 Lazarus Group

Lazarus Group has used CHM files to move concealed payloads.[9]

G0049 OilRig

OilRig has used a CHM payload to load and execute another malicious file once delivered to a victim.[10]

G0091 Silence

Silence has weaponized CHM files in their phishing campaigns.[11][12][13][14]

Mitigations

ID Mitigation Description
M1038 Execution Prevention

Consider using application control to prevent execution of hh.exe if it is not required for a given system or network to prevent potential misuse by adversaries.

M1021 Restrict Web-Based Content

Consider blocking download/transfer and execution of potentially uncommon file types known to be used in adversary campaigns, such as CHM files

Detection

ID Data Source Data Component
DS0017 Command Command Execution
DS0022 File File Creation
DS0009 Process Process Creation

Monitor and analyze the execution and arguments of hh.exe. [4] Compare recent invocations of hh.exe with prior history of known good arguments to determine anomalous and potentially adversarial activity (ex: obfuscated and/or malicious commands). Non-standard process execution trees may also indicate suspicious or malicious behavior, such as if hh.exe is the parent process for suspicious processes and activity relating to other adversarial techniques.

Monitor presence and use of CHM files, especially if they are not typically used within an environment.

Überwachen und analysieren Sie die Ausführung und die Argumente von hh.exe. (Zitat: MsitPros CHM Aug 2017) Vergleichen Sie die jüngsten Aufrufe von hh.exe mit der früheren Historie bekannter guter Argumente, um anomale und potenziell schädliche Aktivitäten zu ermitteln (z.B. verschleierte und/oder bösartige Befehle). Nicht standardmässige Prozessausführungsbäume können ebenfalls auf verdächtiges oder bösartiges Verhalten hinweisen, z.B. wenn hh.exe der übergeordnete Prozess für verdächtige Prozesse und Aktivitäten im Zusammenhang mit anderen Angreifertechniken ist.

Überwachen Sie das Vorhandensein und die Verwendung von CHM-Dateien, insbesondere wenn sie in einer Umgebung normalerweise nicht verwendet werden.

Surveiller et analyser l'exécution et les arguments de hh.exe. (Citation : MsitPros CHM Aug 2017) Comparez les invocations récentes de hh.exe avec l'historique des bons arguments connus afin de déterminer une activité anormale et potentiellement malveillante (ex : commandes obfusquées et/ou malveillantes). Les arbres d'exécution de processus non standard peuvent également indiquer un comportement suspect ou malveillant, par exemple si hh.exe est le processus parent de processus suspects et d'une activité liée à d'autres techniques adverses.

Surveillez la présence et l'utilisation des fichiers CHM, surtout s'ils ne sont pas typiquement utilisés dans un environnement.

Monitorare ed analizzare l'esecuzione e gli argomenti di hh.exe. (Citazione: MsitPros CHM Aug 2017) Confrontare invocazioni recenti di hh.exe con la storia precedente di argomenti noti e validi per determinare attività anomale e potenzialmente avversarie (es: comandi offuscati e/o malevoli). Anche gli alberi di esecuzione dei processi non standard possono indicare un comportamento sospetto o malevolo, ad esempio se hh.exe è il processo genitore di processi sospetti e attività relative ad altre tecniche avversarie.

Monitorare la presenza e l'uso di file CHM, specialmente se non sono usati tipicamente in un ambiente.

References