# 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 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 that do not account for execution of binaries through hh.exe

**Example**

&#x20;In this Demo a simple CHM file created and being executed, I have added references to manually and automatically create these payloads

Will use the Out-CHM to create the payload, by adding the payload parameter where it is located and the hh.exe utility for it to compile it in a format capable for hh.exe in understanding

![](/files/-MRkXQLwt1bawbfqhgHL)

Once this is done, execution is simple.

![](/files/-MRkXSU0sEjD7L3nlr4Z)

References:

<https://gist.github.com/mgeeky/cce31c8602a144d8f2172a73d510e0e7>

<https://github.com/samratashok/nishang/blob/master/Client/Out-CHM.ps1>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dmcxblue.gitbook.io/red-team-notes-2-0/red-team-techniques/defense-evasion/t1218-signed-binary-proxy-execution/untitled-10.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
