ComRAT
- Type
- Backdoor
- Capabilities
- PersistenceDefense evasionProcess injectionReconnaissanceExfiltration
- Delivery
- USB
- Platforms
- Windows
ComRAT is a Windows backdoor associated with the Russian cyberespionage group Turla. It supports remote execution of PowerShell scripts and Windows executables loaded from memory or disk. ComRAT v4, publicly identified in 2020, abuses Gmail web services for command and control.
ComRAT uses a modular architecture comprising an orchestrator and a communications module. It injects the orchestrator into the Windows shell and the communications module into the victim’s default browser, making command-and-control activity appear less suspicious. It maintains persistence through a scheduled task that launches a PowerShell loader at user logon. Encrypted orchestrator code and a PowerShell script can be stored in the Windows Registry. ComRAT uses unique per-machine passwords to decrypt its orchestrator and hidden file system, and an embedded XOR key to decrypt its communications module. It can also check the system date and time to restrict activity to weekday business hours.
The associated Agent.BTZ variant is a USB-propagating worm capable of collecting and exfiltrating information and communicating with remote servers. Its reconnaissance includes collecting the victim’s username, network-adapter addresses, and gateway, DNS, DHCP, and WINS configuration. Agent.BTZ was involved in the 2008 compromise of U.S. Department of Defense systems after an infected USB drive was connected to a laptop with access to U.S. Central Command.
Associated threat actors
4 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
Its known arsenal includes ComRAT, Crutch, and LightNeuron, the latter of which abused Microsoft Exchange servers to receive commands concealed in email attachments.
At the same time, malware most likely associated with the FSB penetrated U.S. defense networks to facilitate one of the most significant breaches of classified data in history (Council on Foreign Relations 2008).
ComRAT has used PowerShell to load itself every time a user logs in to the system. ComRAT can execute PowerShell scripts loaded into memory or from the file system.
Techniques & procedures
61 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
4 techniques
Initial Access
[Agent.btz](https://attack.mitre.org/software/S0092) drops itself onto removable media devices and creates an autorun.inf file with an instruction to run that file. When the device is inserted into another system, it opens autorun.inf and loads the malware.(Citation: ThreatExpert Agent.btz)
"IRON HUNTER tactics include strategic web compromises..."
"IRON HUNTER tactics include... fake software update files..."
"IRON HUNTER tactics include... themed spearphishing lures..."
Execution
7 techniques
Execution
'APT29 also used PowerShell to create new tasks on remote machines.'
[ComRAT](https://attack.mitre.org/software/S0126) has used a scheduled task to launch its PowerShell loader.(Citation: ESET ComRAT May 2020)(Citation: CISA ComRAT Oct 2020)
[ComRAT](https://attack.mitre.org/software/S0126) has used PowerShell to load itself every time a user logs in to the system. [ComRAT](https://attack.mitre.org/software/S0126) can execute PowerShell scripts loaded into memory or from the file system.(Citation: ESET ComRAT May 2020)(Citation: CISA ComRAT Oct 2020)
[ComRAT](https://attack.mitre.org/software/S0126) has used <code>cmd.exe</code> to execute commands.(Citation: ESET ComRAT May 2020)
[ComRAT](https://attack.mitre.org/software/S0126) can load a PE file from memory or the file system and execute it with <code>CreateProcessW</code>.(Citation: ESET ComRAT May 2020)
"The communication between the processes is performed by named pipe."
Once executed, the dropper installs activeds.dll - a proxy dll which is loaded directly to explorer.exe once the machine reboots. The purpose of this proxy dll is to load the malware’s main payload - stdole2.tlb.
Persistence
8 techniques
Persistence
ComRAT has used PowerShell to load itself every time a user logs in to the system.
'APT29 also used PowerShell to create new tasks on remote machines.'
[ComRAT](https://attack.mitre.org/software/S0126) has used a scheduled task to launch its PowerShell loader.(Citation: ESET ComRAT May 2020)(Citation: CISA ComRAT Oct 2020)
[ComRAT](https://attack.mitre.org/software/S0126) has modified Registry values to store encrypted orchestrator code and payloads.(Citation: ESET ComRAT May 2020)(Citation: CISA ComRAT Oct 2020)
IoCs include services such as WOWmanager service, TlbControl service, WinMI32 service, HP003044 service, NetBIOS2010 service, pnppci service, ethio service, ntdos505 service.
[ComRAT](https://attack.mitre.org/software/S0126) samples have been seen which hijack COM objects for persistence by replacing the path to shell32.dll in registry location <code>HKCU\Software\Classes\CLSID\{42aedc87-2188-41fd-b9a3-0c966feabec1}\InprocServer32</code>.(Citation: NorthSec 2015 GData Uroburos Tools)
Once executed, the dropper installs activeds.dll - a proxy dll which is loaded directly to explorer.exe once the machine reboots.
"To be started during the boot process of the infected machine, the malware creates the following registry key: HKCU\Software\Classes\CLSID\{...}\InprocServer32 = ..."
Privilege Escalation
9 techniques
Privilege Escalation
ComRAT has used PowerShell to load itself every time a user logs in to the system.
'APT29 also used PowerShell to create new tasks on remote machines.'
[ComRAT](https://attack.mitre.org/software/S0126) has used a scheduled task to launch its PowerShell loader.(Citation: ESET ComRAT May 2020)(Citation: CISA ComRAT Oct 2020)
Aria-body has the ability to inject itself into another process such as rundll32.exe and dllhost.exe... BlackEnergy injects its DLL component into svchost.exe... ComRAT has injected its orchestrator DLL into explorer.exe... Stuxnet injects an entire DLL into an existing, newly created, or preselected trusted process.
[ComRAT](https://attack.mitre.org/software/S0126) has injected its orchestrator DLL into explorer.exe. [ComRAT](https://attack.mitre.org/software/S0126) has also injected its communications module into the victim's default browser to make C2 connections appear less suspicious as all network connections will be initiated by the browser process.(Citation: ESET ComRAT May 2020)(Citation: CISA ComRAT Oct 2020)
IoCs include services such as WOWmanager service, TlbControl service, WinMI32 service, HP003044 service, NetBIOS2010 service, pnppci service, ethio service, ntdos505 service.
[ComRAT](https://attack.mitre.org/software/S0126) samples have been seen which hijack COM objects for persistence by replacing the path to shell32.dll in registry location <code>HKCU\Software\Classes\CLSID\{42aedc87-2188-41fd-b9a3-0c966feabec1}\InprocServer32</code>.(Citation: NorthSec 2015 GData Uroburos Tools)
Once executed, the dropper installs activeds.dll - a proxy dll which is loaded directly to explorer.exe once the machine reboots.
"To be started during the boot process of the infected machine, the malware creates the following registry key: HKCU\Software\Classes\CLSID\{...}\InprocServer32 = ..."
Stealth
14 techniques
Stealth
[ComRAT](https://attack.mitre.org/software/S0126) has encrypted its virtual file system using AES-256 in XTS mode.(Citation: ESET ComRAT May 2020)(Citation: CISA ComRAT Oct 2020)
[ComRAT](https://attack.mitre.org/software/S0126) has embedded a XOR encrypted communications module inside the orchestrator module.(Citation: ESET ComRAT May 2020)(Citation: CISA ComRAT Oct 2020)
[ComRAT](https://attack.mitre.org/software/S0126) has used encryption and base64 to obfuscate its orchestrator code in the Registry. [ComRAT](https://attack.mitre.org/software/S0126) has also used encoded PowerShell scripts.(Citation: ESET ComRAT May 2020)(Citation: CISA ComRAT Oct 2020)
[ComRAT](https://attack.mitre.org/software/S0126) has stored encrypted orchestrator code and payloads in the Registry.(Citation: ESET ComRAT May 2020)(Citation: CISA ComRAT Oct 2020)
Although the code itself was written from scratch and has nothing to do with WinRAR, the adversary tried to mimic WinRAR’s SFX installer. Resource data was duplicated, including icons and layouts used by the original installer
[ComRAT](https://attack.mitre.org/software/S0126) has used a task name associated with Windows SQM Consolidator.(Citation: ESET ComRAT May 2020)
Aria-body has the ability to inject itself into another process such as rundll32.exe and dllhost.exe... BlackEnergy injects its DLL component into svchost.exe... ComRAT has injected its orchestrator DLL into explorer.exe... Stuxnet injects an entire DLL into an existing, newly created, or preselected trusted process.
[ComRAT](https://attack.mitre.org/software/S0126) has injected its orchestrator DLL into explorer.exe. [ComRAT](https://attack.mitre.org/software/S0126) has also injected its communications module into the victim's default browser to make C2 connections appear less suspicious as all network connections will be initiated by the browser process.(Citation: ESET ComRAT May 2020)(Citation: CISA ComRAT Oct 2020)
The dropper then also deletes any previous installation of Agent.BTZ if it exists... Once finished, the dropper renames and self delete using the following command line
[ComRAT](https://attack.mitre.org/software/S0126) has used unique per machine passwords to decrypt the orchestrator payload and a hardcoded XOR key to decrypt its communications module. [ComRAT](https://attack.mitre.org/software/S0126) has also used a unique password to decrypt the file used for its hidden file system.(Citation: ESET ComRAT May 2020)(Citation: CISA ComRAT Oct 2020)
"The dropper executes the following command... rundll32.exe %APPDATA%\Microsoft\credprov.tlb,Install %APPDATA%\Microsoft\shdocvw.tlp"
What about to store payload in registry? Let’s go to check it in practice.
[ComRAT](https://attack.mitre.org/software/S0126) has used a portable FAT16 partition image placed in %TEMP% as a hidden file system.(Citation: ESET ComRAT May 2020)
Once executed, the dropper installs activeds.dll - a proxy dll which is loaded directly to explorer.exe once the machine reboots. The purpose of this proxy dll is to load the malware’s main payload - stdole2.tlb.
Defense Impairment
1 technique
Defense Impairment
[ComRAT](https://attack.mitre.org/software/S0126) has modified Registry values to store encrypted orchestrator code and payloads.(Citation: ESET ComRAT May 2020)(Citation: CISA ComRAT Oct 2020)
Discovery
9 techniques
Discovery
[ComRAT](https://attack.mitre.org/software/S0126) can check the default browser by querying <code>HKCR\http\shell\open\command</code>.(Citation: ESET ComRAT May 2020)
[Agent.btz](https://attack.mitre.org/software/S0092) collects the network adapter’s IP and MAC address as well as IP addresses of the network adapter’s default gateway, primary/secondary WINS, DHCP, and DNS servers, and saves them into a log file.(Citation: ThreatExpert Agent.btz)
[Agent.btz](https://attack.mitre.org/software/S0092) obtains the victim username and saves it to a file.(Citation: ThreatExpert Agent.btz)
Frameworks gather information such as computer name, username, domain name, list of running processes
Frameworks gather information such as computer name, username, domain name, list of running processes, listing of files in directories, drives and network shares, as well as network configuration information
listing of files in directories, drives and network shares
[ComRAT](https://attack.mitre.org/software/S0126) has checked the victim system's date and time to perform tasks during business hours (9 to 5, Monday to Friday).(Citation: CISA ComRAT Oct 2020)
"Bundlore has the ability to enumerate what browser is being used as well as version information"; "Orz can gather the victim's Internet Explorer version"; "SUGARDUMP can identify ... browsers, including version number"; "SideCopy has collected browser information"
[ComRAT](https://attack.mitre.org/software/S0126) can check the victim's default browser to determine which process to inject its communications module into.(Citation: ESET ComRAT May 2020)
Lateral Movement
1 technique
Lateral Movement
[Agent.btz](https://attack.mitre.org/software/S0092) drops itself onto removable media devices and creates an autorun.inf file with an instruction to run that file. When the device is inserted into another system, it opens autorun.inf and loads the malware.(Citation: ThreatExpert Agent.btz)
Collection
5 techniques
Collection
While performing the analysis, we noticed that the list of files that a module named “USB Stealer” searches for on USB flash drives connected to infected computers included the names of files created by Agent.btz “mssysmgr.ocx” and “thumb.dd”.
On infected systems, the worm creates a file named ‘thumb.dd’ on all USB flash drives connected to the computer, using it to store a CAB file containing the following files: “winview.ocx”, “wmcache.nld” and “mswmpdat.tlb”. These files contain information about the infected system and the worm’s activity logs for that system.
ComRAT has the ability to use the Gmail web UI to receive commands and exfiltrate information. OilCheck can use a REST-based Microsoft Graph API to access draft messages in a shared Microsoft Office 365 Outlook email account used for C2 communication. SampleCheck5000 can use the Microsoft Office Exchange Web Services API to access an actor-controlled account and retrieve C2 commands and payloads placed in Draft messages.
The malicious software, or malware, caught a ride on an everyday thumb drive that allowed it to enter the secret system and begin looking for documents to steal.
[Agent.btz](https://attack.mitre.org/software/S0092) saves system information into an XML file that is then XOR-encoded.(Citation: ThreatExpert Agent.btz)
Command and Control
10 techniques
Command and Control
We extracted the configuration from each sample in order to obtain the c2 address... more than seventy previously unknown live IP & DNS addresses indicating the ongoing abuse of satellite internet providers operating in both Africa & the Middle East.
[ComRAT](https://attack.mitre.org/software/S0126) has used HTTP requests for command and control.(Citation: NorthSec 2015 GData Uroburos Tools)(Citation: ESET ComRAT May 2020)(Citation: CISA ComRAT Oct 2020)
[ComRAT](https://attack.mitre.org/software/S0126) can use email attachments for command and control.(Citation: ESET ComRAT May 2020)
"2008 Agent.BTZ"
The adversaries had communicated to both Dropbox and Pastebin. APT28 has used Google Drive for C2. APT37 leverages social networking sites and cloud platforms (AOL, Twitter, Yandex, Mediafire, pCloud, Dropbox, and Box) for C2.
[ComRAT](https://attack.mitre.org/software/S0126) has the ability to use the Gmail web UI to receive commands and exfiltrate information.(Citation: ESET ComRAT May 2020)(Citation: CISA ComRAT Oct 2020)
[Agent.btz](https://attack.mitre.org/software/S0092) attempts to download an encrypted binary from a specified domain.(Citation: ThreatExpert Agent.btz)
the attackers used a combination of recently updated remote administration trojans (RATs) and remote procedure call (RPC)-based backdoors
The content repeatedly describes malware and threat actors using SSL, TLS, HTTPS, RSA, AES, Blowfish, RC4, ECIES, Diffie-Hellman, OpenSSL, WolfSSL, and mutual TLS to protect command and control traffic.
[ComRAT](https://attack.mitre.org/software/S0126) can use SSL/TLS encryption for its HTTP-based C2 channel. [ComRAT](https://attack.mitre.org/software/S0126) has used public key cryptography with RSA and AES encrypted email attachments for its Gmail C2 channel.(Citation: ESET ComRAT May 2020)(Citation: CISA ComRAT Oct 2020)
Exfiltration
6 techniques
Exfiltration
[ComRAT](https://attack.mitre.org/software/S0126) has been programmed to sleep outside local business hours (9 to 5, Monday to Friday).(Citation: ESET ComRAT May 2020)
ComRAT has the ability to use the Gmail web UI to receive commands and exfiltrate information. Crutch can use Dropbox to receive commands and upload stolen data. RIFLESPINE can retrieve C2 commands from an encrypted file on Google Drive then upload the results of command execution back to Google Drive.
Turla is a prolific Russian-speaking group known for its covert exfiltration tactics such as the use of hijacked satellite connections ... covert channel backdoors ...
used USB drives as the physical transmission medium to transfer information across air gaps.
[Agent.btz](https://attack.mitre.org/software/S0092) creates a file named thumb.dd on all USB flash drives connected to the victim. This file contains information about the infected system and activity logs.(Citation: Securelist Agent.btz)
ESET spotted a new version of the ComRAT backdoor controlled by Turla using the Gmail web interface in data theft attacks that targeted governmental institutions.
Impact
1 technique
Impact
ComRAT has modified Registry values to store encrypted orchestrator code and payloads ... QakBot can modify the Registry to store its configuration information ... Volgmer modifies the Registry to store an encoded configuration file ...
Observables
107 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
114 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.