HZ RAT
- Type
- RAT
- Capabilities
- Credential theftExfiltrationReconnaissancePost exploitationDefense evasion
- Delivery
- Lure
- Platforms
- WindowsmacOS
HZ RAT is a remote access trojan with Windows and macOS variants used for remote command execution, credential theft, reconnaissance, and data exfiltration. Its campaign has been active since at least October 2020 and was publicly documented in November 2022. The macOS variant targets users of the Chinese messaging applications DingTalk and WeChat. Both variants support operator-directed command execution, writing files to disk, uploading files to command-and-control servers, and victim availability checks. Windows tasking uses PowerShell commands and scripts, while the macOS variant receives shell-script payloads.
Windows infection chains use malicious RTF documents exploiting CVE-2017-11882 in Microsoft Office's Equation Editor, or self-extracting archives masquerading as installers for legitimate software such as OpenVPN, PuTTYgen, and EasyConnect. The installer-based chain executes a Visual Basic Script that launches HZ RAT alongside the advertised application. A macOS distribution package similarly impersonates OpenVPN Connect. Windows samples use custom packers incorporating Base64 or AES, and the backdoor communicates through a custom XOR-encrypted protocol.
Observed Windows tasking targets browser and email-client credentials, database-management and development-tool artifacts, and WeChat-related data. The macOS variant collects system information, local network addresses, installed-application lists, and user data associated with DingTalk, WeChat, and Google Password Manager. Targeted messaging data includes account identifiers, email addresses, telephone numbers, and organizational details. Identified command-and-control infrastructure is concentrated in China.
Associated vulnerabilities
1 CVE Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
Techniques & procedures
10 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
2 techniques
Initial Access
MITRE ATT&CK T1566 Phishing
Either embedded as self-extracting zip archive or as malicious RTF document build presumably with the Royal Road framework.
Execution
3 techniques
Execution
Once opened, the document writes HZ Rat to disk as default.exe and executes it with an Equation Editor exploit (CVE-2017–11882) hidden in the document and triggered after opening the document.
only the lure filename is used to social engineer the victims into opening the document.
the archive actually executes install.vbs which first runs the contained default.exe (HZ Rat) and afterwards the actual lure program.
Persistence
1 technique
Persistence
MITRE ATT&CK T1112 Modify Registry
Defense Impairment
1 technique
Defense Impairment
MITRE ATT&CK T1112 Modify Registry
Credential Access
1 technique
Credential Access
Reviewing the received commands indicates that, beside system reconnaissance, a strong focus is set on credential dumping.
Discovery
2 techniques
Discovery
MITRE ATT&CK T1012 Query Registry
Our research revealed that this malware was utilised for credential stealing and system reconnaissance.
Exfiltration
1 technique
Exfiltration
* upload file to C2
Observables
291 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
4 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.