Hancitor
- Type
- Loader
- Capabilities
- PersistenceDefense evasion
- Delivery
- PhishingMalspamLure
- Platforms
- Windows
Hancitor, also known as Chanitor, is a Windows malware loader and downloader used to deliver and execute additional malicious payloads, including information stealers, remote access trojans, banking malware, and ransomware. It has distributed Pony and Vawtrak and has been used by Cuba ransomware operators to deploy ransomware on compromised systems.
Hancitor is distributed through phishing emails containing malicious links or attachments. Campaigns have used invoice, billing, receipt, contract, and HelloFax-themed lures to persuade recipients to open malicious Microsoft Word documents and enable macros. Document-based infection chains decode embedded shellcode, allocate executable memory, and use Windows callback APIs to transfer execution within the Word process. The shellcode can recover and decrypt an embedded executable from the document before writing the payload to disk. Delivery components have supported both 32-bit and 64-bit Windows environments.
Hancitor has used PowerShell for command execution and Registry-based autostart mechanisms for persistence. Its delivery chains have also decoded Base64-encoded links, extracted executables from ZIP archives, and deleted files through VBA. Its principal role is staging subsequent malware; credential theft and ransomware extortion performed by delivered payloads are distinct from the loader's own functionality.
Associated vulnerabilities
2 CVEs Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
Associated threat actors
7 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
The actors distributed Cuba ransomware on compromised systems through Hancitor—a loader known for dropping or executing stealers, such as Remote Access Trojans (RATs) and other types of ransomware.
"1873433027": "TA511/Hancitor - Stats uniques -> ips/hostnames: 36 publickeys: 29"
"1873433027": "TA511/Hancitor - Stats uniques -> ips/hostnames: 36 publickeys: 29"
"1873433027": "TA511/Hancitor - Stats uniques -> ips/hostnames: 36 publickeys: 29"
Also known as Chanitor, Hancitor is malware used by a threat actor designated as MAN1, Moskalvzapoe or TA511. Hancitor establishes initial access on a vulnerable Windows host and sends additional malware.
Also known as Chanitor, Hancitor is malware used by a threat actor designated as MAN1, Moskalvzapoe or TA511. Hancitor establishes initial access on a vulnerable Windows host and sends additional malware.
+1 more in the app. View in Mallory
Techniques & procedures
55 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
3 techniques
Initial Access
The eSentire Threat Intelligence team is tracking a recently identified campaign delivering Hancitor malware through malicious “HelloFax” emails.
[Hancitor](https://attack.mitre.org/software/S0499) has been delivered via phishing emails with malicious attachments.(Citation: FireEye Hancitor)
[Hancitor](https://attack.mitre.org/software/S0499) has been delivered via phishing emails which contained malicious links.(Citation: Threatpost Hancitor)
Execution
16 techniques
Execution
After execution of the initial access malware, many threat actors deploy persistence mechanisms, such as the creation of scheduled tasks... Scheduled tasks were the most common persistence method observed in our intrusions.
Visual Basic can directly execute Microsoft Windows API calls, which allows it perform a number of interesting functions -- exactly what this VB code is doing.
[Hancitor](https://attack.mitre.org/software/S0499) has used PowerShell to execute commands.(Citation: FireEye Hancitor)
If the file is a DLL, the malware launches its start export function by calling CreateProcessA with a formatted rundll32.exe command as the command line.
When the document macro is executed, it will inject malicious code into a svchost.exe process.
The last approach is to extract the config using python script, the biggest advantage of this method is that once we have our script, it can basically work on any other Hancitor sample.
The content repeatedly mentions malicious macros in Word/Excel documents, such as "enable macros," "embedded macros," and "macro-enabled documents."
Cuba ransomware actors use Hancitor as a tool to spread malicious files throughout a victim’s network.
[Hancitor](https://attack.mitre.org/software/S0499) has used <code>CallWindowProc</code> and <code>EnumResourceTypesA</code> to interpret and execute shellcode.(Citation: FireEye Hancitor)
The payload in question is base64-encoded and embedded within a form in the VBProject as a value of the ‘Text’ field on the ‘choline’ TextBox.
campaigns on January 24, 2018 and January 25, 2018 used a different document format, Rich Text Format (RTF), that leveraged an exploit (CVE-2017-11882) to launch shellcode which executed a PowerShell command
has attempted to get victims to launch malicious Microsoft Word attachments delivered via spearphishing emails... has required user execution of a malicious MSI installer... has been executed through user installation of an executable disguised as a flash installer.
[Hancitor](https://attack.mitre.org/software/S0499) has relied upon users clicking on a malicious link delivered through phishing.(Citation: Threatpost Hancitor)
[Hancitor](https://attack.mitre.org/software/S0499) has used malicious Microsoft Word documents, sent via email, which prompted the victim to enable macros.(Citation: FireEye Hancitor)
Word documents from the distribution servers used the DDE attack method. In this case, Hancitor was completely separated from the Word document and downloaded as a separate malware binary.
Smokeloader first creates a new copy of ntdll.dll as a temporary file ... and then loads it using LdrLoadDll. Following this, it resolves all the functions it requires for its own usage and invokes them from the new copy of ntdll in its memory.
Persistence
4 techniques
Persistence
After execution of the initial access malware, many threat actors deploy persistence mechanisms, such as the creation of scheduled tasks... Scheduled tasks were the most common persistence method observed in our intrusions.
Across the content, malware repeatedly 'adds Registry Run keys', 'creates Registry entries', 'modifies the Windows Registry', or 'overwrites registry keys' to maintain persistence.
To inject into svchost , the malware first creates a suspended svchost process...
[Hancitor](https://attack.mitre.org/software/S0499) has added Registry Run keys to establish persistence.(Citation: FireEye Hancitor)
Privilege Escalation
8 techniques
Privilege Escalation
After execution of the initial access malware, many threat actors deploy persistence mechanisms, such as the creation of scheduled tasks... Scheduled tasks were the most common persistence method observed in our intrusions.
When the document macro is executed, it will inject malicious code into a svchost.exe process.
On the beachhead system, the malicious Hancitor DLL injected into the svchost.exe process. The code was injected into multiple instances of svchost.exe.
The malware properly sets up the injected thread’s context by setting the image base address from PEB (through the context’s EBX register) to the injected base address and the thread’s entry point (through the context’s EAX register) to the injected entry point. Finally, it launches the executable by calling ResumeThread
Next, the malware injects the downloaded executable into an svchost.exe process. To do this, it first creates the process in a suspended state using CreateProcessA ... writes the payload ... sets up the injected thread’s context ... Finally, it launches the executable by calling ResumeThread
Used a tool to exploit CVE-2020-1472 (also known as “ZeroLogon”) to gain Domain Administrative privileges.
To inject into svchost , the malware first creates a suspended svchost process...
[Hancitor](https://attack.mitre.org/software/S0499) has added Registry Run keys to establish persistence.(Citation: FireEye Hancitor)
Stealth
19 techniques
Stealth
[Hancitor](https://attack.mitre.org/software/S0499) has used Base64 to encode malicious links.(Citation: Threatpost Hancitor)
Step 1: Unpacking HANCITOR’s first executable stage is a packed DLL... First, we can set breakpoints on VirtualAlloc and VirtualProtect as those two API calls are typically used by packers to allocate memory for the unpacked executable and change the memory’s protection to executable prior to launching.
This black box represents a VBA object embedded in the document, and once interacted by the victim or the VBA macros, the object is automatically dropped to the file system.
[Hancitor](https://attack.mitre.org/software/S0499) has delivered compressed payloads in ZIP files to victims.(Citation: FireEye Hancitor)
The Google feedproxy URL leads to a malicious page on a compromised webite designed to send the initial malicious file and redirect the browser to DocuSign's website... This process makes it appear as if the file was offered by DocuSign, when it was actually sent through a malicious web page.
This function executes the VBA Name statement to rename the zoro.kl file in the Temp folder to zoro.doc and move it to the user template folder.
When the document macro is executed, it will inject malicious code into a svchost.exe process.
On the beachhead system, the malicious Hancitor DLL injected into the svchost.exe process. The code was injected into multiple instances of svchost.exe.
The malware properly sets up the injected thread’s context by setting the image base address from PEB (through the context’s EBX register) to the injected base address and the thread’s entry point (through the context’s EAX register) to the injected entry point. Finally, it launches the executable by calling ResumeThread
Next, the malware injects the downloaded executable into an svchost.exe process. To do this, it first creates the process in a suspended state using CreateProcessA ... writes the payload ... sets up the injected thread’s context ... Finally, it launches the executable by calling ResumeThread
It then waits for a few seconds before deleting the original file... The Vawtrak dropper Trojan then deletes itself from the target system.
[Hancitor](https://attack.mitre.org/software/S0499) has deleted files using the VBA <code>kill</code> function.(Citation: FireEye Hancitor)
[Hancitor](https://attack.mitre.org/software/S0499) has decoded Base64 encoded URLs to insert a recipient’s name into the filename of the Word document. [Hancitor](https://attack.mitre.org/software/S0499) has also extracted executables from ZIP files.(Citation: Threatpost Hancitor)(Citation: FireEye Hancitor)
Finally, the code calls the Shell VBA function to execute the following command. rundll32.exe <user template path>\gelforr.dap, BNJAFSRSQIX
[Hancitor](https://attack.mitre.org/software/S0499) has used verclsid.exe to download and execute a malicious script.(Citation: Red Canary Verclsid.exe)
[Hancitor](https://attack.mitre.org/software/S0499) has used a macro to check that an ActiveDocument shape object in the lure message is present. If this object is not found, the macro will exit without downloading additional payloads.(Citation: FireEye Hancitor)
The block.txt file appears to track IP addresses that should be blocked. Many IP addresses in the block.txt file resolved to Amazon AWS servers. We suspect this list maybe used to block analysis on automated systems run by security vendors and researchers, by not serving content to IP addresses known to be analyzing malware.
Smokeloader first creates a new copy of ntdll.dll as a temporary file ... and then loads it using LdrLoadDll. Following this, it resolves all the functions it requires for its own usage and invokes them from the new copy of ntdll in its memory.
Thus, the module is not written to the disk, and no files or persistence mechanisms are created for it.
Defense Impairment
1 technique
Defense Impairment
Across the content, malware repeatedly 'adds Registry Run keys', 'creates Registry entries', 'modifies the Windows Registry', or 'overwrites registry keys' to maintain persistence.
Discovery
9 techniques
Discovery
Check external IP with api[.]ipify[.]org
The threat actors then began port scanning for SMB and a few backup systems such as Synology, Veeam and Backup Exec.
It also retrieves the process ID of an explorer.exe process and calls LookupAccountSidA to get the current user’s account name and domain name.
rather than calling GetUserName, it enumerates through running processes searching for explorer.exe
this particular sample will do. Get OS version Get adapter address Get Windows directory Get volume information Check external IP with api[.]ipify[.]org
Ultimately, this Search call recursively searches for the zoro.kl file that is dropped earlier and sets the global variable nccx to the file path.
The malware then calls DsEnumerateDomainTrustsA to enumerate and retrieve all NETBIOS and DNS domain names.
[Hancitor](https://attack.mitre.org/software/S0499) has used a macro to check that an ActiveDocument shape object in the lure message is present. If this object is not found, the macro will exit without downloading additional payloads.(Citation: FireEye Hancitor)
The block.txt file appears to track IP addresses that should be blocked. Many IP addresses in the block.txt file resolved to Amazon AWS servers. We suspect this list maybe used to block analysis on automated systems run by security vendors and researchers, by not serving content to IP addresses known to be analyzing malware.
Lateral Movement
2 techniques
Lateral Movement
Cuba ransomware actors use Hancitor as a tool to spread malicious files throughout a victim’s network.
In some cases, we also see Send-Safe spambot malware, which turns the infected Windows host into a spambot pushing more Hancitor emails.
Collection
1 technique
Collection
Examples in the content include 'DropBook can unarchive data downloaded from the C2 to obtain the payload and persistence modules,' 'Molerats decompresses ZIP files once on the victim machine,' and 'Rocke has extracted tar.gz files after downloading them from a C2 server.'
Command and Control
5 techniques
Command and Control
The response comes in the form of a Base64-encoded string... If the response is valid, HANCITOR decodes the string using Base64 and XORs the result with the character ‘z’.
The svchost.exe process will then reach out to the Hancitor Command and Control infrastructure to download a secondary payload.
Before this update, the Hancitor command-and-control (C&C) check-in ... used a pipe-separated POST data format... The updated Hancitor submits similar information to the C&C, but in a different format.
[Hancitor](https://attack.mitre.org/software/S0499) has the ability to download additional files from C2.(Citation: Threatpost Hancitor)
Started with a Microsoft Word document Extracted base64 encoded shellcode Extracted encoded payload
Observables
275 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
90 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.