GreyEnergy is a modular Windows backdoor used for espionage and persistent access to critical infrastructure networks. A successor to BlackEnergy3, it has been associated with Sandworm-linked operations and activity tracked by Dragos as KAMACITE. Its targets include energy providers, transportation organizations, and industrial enterprises, particularly in Ukraine and other Central and Eastern European countries. Campaigns have also targeted industrial organizations in Kazakhstan.
Infection chains use spearphishing documents and compromised public-facing web servers. Malicious documents have exploited CVE-2017-0199 and CVE-2017-11882 to retrieve subsequent payloads. The lightweight GreyEnergy Mini backdoor serves as an initial stage, collecting and exfiltrating host, account, operating-system, network, and security-software information before deployment of the main payload.
GreyEnergy can download additional modules and payloads, capture keystrokes and screenshots, collect system information and event logs, harvest saved passwords, and dump Windows credentials through a Mimikatz module. It supports portable executable injection into remote processes and enumerates Windows services. The main payload can operate entirely in memory or establish persistence by configuring a Windows service to load a malicious DLL. It uses PsExec locally to launch the Windows Rundll32 utility with SYSTEM privileges.
Command-and-control communications use HTTP and HTTPS, with AES-256 and RSA-2048 encryption. GreyEnergy has used Tor relays and internal proxy chains to conceal external command-and-control infrastructure. Its evasion mechanisms include encrypted configuration data and strings, custom packing, dynamic Windows API resolution, anti-analysis code, memory wiping, and secure file deletion. Digitally signed samples have also been observed. GreyEnergy droppers continued to evolve, with new variants identified in March and August 2021.
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.
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.
Like its predecessor, GreyEnergy malware has been detected attacking industrial and ICS targets, mainly in Ukraine.
In 2021, Dragos uncovered two new GREYENERGY dropper variants in the wild: one in March of 2021, and another in August 2021.
GreyEnergy and its accompanying toolset was typically prefaced with a phishing attack, containing malicious documents that would deploy “GreyEnergy mini”, a first-stage backdoor.
37 distinct techniques documented for this family, organized by ATT&CK tactic.
A second point of entry was via vulnerable public-facing web services that are connected to the organization’s internal network.
The attack on the Ukrainian power grid was prefaced with a phishing attack against a number of energy distribution companies. The phishing email contained a Word document that, when Macros were enabled, dropped the Black Energy malware to disk.
This same C2 server was also used in a spearphishing email attachment sent by GreyEnergy (aka FELIXROOT)... Another server we detected that was used both by Zebrocy and by GreyEnergy is 185.217.0[.]124. Similarly, we detected a spearphishing GreyEnergy document...
When a Web server is hosted internally and connected to the rest of an organization's network, the attackers have typically used that to try and move laterally on the network and plant backup backdoors so they can reinfect a victim network if their malware is spotted and removed.
[GreyEnergy](https://attack.mitre.org/software/S0342) uses cmd.exe to execute itself in-memory.(Citation: ESET GreyEnergy Oct 2018)
The file ... with the name “Seminar.rtf” exploited CVE-2017-0199 ... “Seminar.rtf” downloaded a second stage document ... (4de5adb865b5198b4f2593ad436fceff, exploiting CVE-2017-11882) ... we detected a spearphishing GreyEnergy document ... exploiting CVE-2017-11882
GreyEnergy chooses a service, drops a DLL file, and writes it to that serviceDLL Registry key.
They also replaced the ImagePath registry value of a Windows service with a new backdoor binary.
[GreyEnergy](https://attack.mitre.org/software/S0342) modifies conditions in the Registry and adds keys.(Citation: ESET GreyEnergy Oct 2018)
[GreyEnergy](https://attack.mitre.org/software/S0342) chooses a service, drops a DLL file, and writes it to that serviceDLL Registry key.(Citation: ESET GreyEnergy Oct 2018)
On other systems, attackers have been using a relatively obscure Windows registry key feature to install and disguise the GreyEnergy malware so it is capable of surviving system reboots.
On other systems, attackers have been using a relatively obscure Windows registry key feature to install and disguise the GreyEnergy malware so it is capable of surviving system reboots.
[GreyEnergy](https://attack.mitre.org/software/S0342) has a module to inject a PE binary into a remote process.(Citation: ESET GreyEnergy Oct 2018)
[GreyEnergy](https://attack.mitre.org/software/S0342) chooses a service, drops a DLL file, and writes it to that serviceDLL Registry key.(Citation: ESET GreyEnergy Oct 2018)
On other systems, attackers have been using a relatively obscure Windows registry key feature to install and disguise the GreyEnergy malware so it is capable of surviving system reboots.
On other systems, attackers have been using a relatively obscure Windows registry key feature to install and disguise the GreyEnergy malware so it is capable of surviving system reboots.
The GreyEnergy dropper is protected using a custom packer with the following characteristics: Custom decryption algorithm LZW (variant) decompression algorithm Junk code & JMP instructions (anti-analysis)
[GreyEnergy](https://attack.mitre.org/software/S0342) is packed for obfuscation.(Citation: ESET GreyEnergy Oct 2018)
The GreyEnergy dropper is protected using a custom packer with the following characteristics: ... Dynamically-resolved WinAPIs
[GreyEnergy](https://attack.mitre.org/software/S0342) encrypts its configuration files with AES-256 and also encrypts its strings.(Citation: ESET GreyEnergy Oct 2018)
[GreyEnergy](https://attack.mitre.org/software/S0342) has a module to inject a PE binary into a remote process.(Citation: ESET GreyEnergy Oct 2018)
The GreyEnergy dropper is protected using a custom packer with the following characteristics: ... Memory wiping (anti-forensic)
[GreyEnergy](https://attack.mitre.org/software/S0342) can securely delete a file by hooking into the DeleteFileA and DeleteFileW functions in the Windows API.(Citation: ESET GreyEnergy Oct 2018)
[GreyEnergy](https://attack.mitre.org/software/S0342) uses PsExec locally in order to execute rundll32.exe at the highest privileges (NTAUTHORITY\SYSTEM).(Citation: ESET GreyEnergy Oct 2018)
GreyEnergy chooses a service, drops a DLL file, and writes it to that serviceDLL Registry key.
They also replaced the ImagePath registry value of a Windows service with a new backdoor binary.
GreyEnergy's main module can run either in memory only... The malware is installed so when the attackers are done, the malicious DLL file that is used to infect the system is securely wiped from disk, and the payload exists only in the memory of the Windows service that is hosting it.
[GreyEnergy](https://attack.mitre.org/software/S0342) modifies conditions in the Registry and adds keys.(Citation: ESET GreyEnergy Oct 2018)
[GreyEnergy](https://attack.mitre.org/software/S0342) digitally signs the malware with a code-signing certificate.(Citation: ESET GreyEnergy Oct 2018)
NotPetya ransomware caused worldwide damages due to its highly effective spreading mechanism combining the EternalBlue (MS17-010) vulnerability, credential dumping from infected systems and PsExec for lateral movement.
[GreyEnergy](https://attack.mitre.org/software/S0342) has a module for [Mimikatz](https://attack.mitre.org/software/S0002) to collect Windows credentials from the victim’s machine.(Citation: ESET GreyEnergy Oct 2018)
[GreyEnergy](https://attack.mitre.org/software/S0342) has a module to harvest pressed keystrokes.(Citation: ESET GreyEnergy Oct 2018)
The modules that ESET has observed so far include those for collecting system information, event logs, malware hashes, file system operations, screen shots, keystroke logs, saved passwords, and user credentials using the Mimikatz tool.
[GreyEnergy](https://attack.mitre.org/software/S0342) enumerates all Windows services.(Citation: ESET GreyEnergy Oct 2018)
The attacker’s toolset also contained Nmap and Mimikatz for discovery and lateral movement.
Like several threat groups these days, GreyEnergy also has been using multiple legitimate tools, such as Mimikatz, PsExec, and Nmap, in its campaigns.
[GreyEnergy](https://attack.mitre.org/software/S0342) has a module to harvest pressed keystrokes.(Citation: ESET GreyEnergy Oct 2018)
The modules that ESET has observed so far include those for collecting system information, event logs, malware hashes, file system operations, screen shots, keystroke logs, saved passwords, and user credentials using the Mimikatz tool.
Both sets of activity used the same servers at the same time and targeted the same organization... different Zebrocy C2 servers, including 193.23.181[.]151 ... Another server we detected that was used both by Zebrocy and by GreyEnergy is 185.217.0[.]124 ... They retrieve additional data from the following URL...
[GreyEnergy](https://attack.mitre.org/software/S0342) uses HTTP and HTTPS for C2 communications.(Citation: ESET GreyEnergy Oct 2018)
[GreyEnergy](https://attack.mitre.org/software/S0342) has used [Tor](https://attack.mitre.org/software/S0183) relays for Command and Control servers.(Citation: ESET GreyEnergy Oct 2018)
[GreyEnergy](https://attack.mitre.org/software/S0342) can download additional modules and payloads.(Citation: ESET GreyEnergy Oct 2018)
The content is a catalog of malware and threat groups that encrypt command-and-control communications using algorithms such as DES, AES, RC4, XOR, Blowfish, RSA, Camellia, RC2, RC6, and custom ciphers.
[GreyEnergy](https://attack.mitre.org/software/S0342) encrypts communications using AES256.(Citation: ESET GreyEnergy Oct 2018)
[GreyEnergy](https://attack.mitre.org/software/S0342) encrypts communications using RSA-2048.(Citation: ESET GreyEnergy Oct 2018)
13 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
49 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.