GreyEnergy: Welcome to 2019

Pierluigi Paganini January 16, 2019

Early January, an interesting malware sample has been disclosed through the InfoSec community: a potential GreyEnergy implant still under investigation.

Figure 1. Possible GreyEnergy sample

This kind of threat, previously analyzed by third party firms, contains similarities with the infamous BlackEnergy malware, used in the attacks against the Ukrainian energy industry back in 2015.

The Cybaze-Yoroi ZLAB researchers dissected this new sample to investigate its attribution.

Background – Past Research

According to a recent ESET report, GreyEnergy malware is part of the new cyber arsenal of the BlackEnergy APT group, whose main toolset was last seen back in 2015 during the Ukraine power grid cyber-attack. It typically spreads through two different vectors:

  1. perimeter breach, for instance compromising company’s websites;
  2. spear-phishing emails and malicious attachments.

The GreyEnergy implant is also known as “FELIXROOT” backdoor: FireEye researchers published a technical article on July 2018 about a spear-phishing campaign trying to deliver the malware to undisclosed targets.

The entire malware architecture is modular and very difficult to neutralize. It is able to retrieve new modules from command and control servers, empowering the offensive capabilities of the implant: modules such as NMAP and MIMIKATZ were used in the past to perform lateral movement and privilege escalation. 

Figure 2 – Modules of GreyEnergy malware (Figure by ESET)

Technical analysis

In order to investigate the attribution of the sample, Cybaze-Yoroi Zlab researchers performed a comparative analysis of the January 2019’s sample with respect to technical indicators and TTP published in previous articles.

First of all, static analysis on this sample shows the information about original filename, size, exported functions and other information are closely similar to the FE_Dropper_Win32_FELIXROOT_1 sample.

Figure 3 – January’s sample on the left; FELIXROOT_1 sample on the right.

Despite this similarity, the first sample results to be known to the community only since the 6th of January 2019, meanwhile the FELIXROOT_1 one has been submitted to the VT platform almost an year earlier, back in 2018.

Figure 4 – January’s sample on top; FELIXROOT_1 sample on bottom.

A dynamic analysis of the sample shows classic, but effective, automated analysis’ evasion techniques such as long sleep time-periods of dozens of minutes.

Figure 5 – GreyEnergy invokes sleep API to evade analysis.

After this incubation time, the malware contacts the C2 server sending checking information about victim machine. The remote destination ends to the 217.12.204.100 IP address, owned by an Ukrainian contractor and manufacturer company.

Figure 6 – The malicious IP

The callback activity of the malware is periodic, every thirty minutes it gets in touch with the remote C2 to notify the implant is still running. It sends information about computer name, user name, volume serial number, Windows version, processor architecture and two additional values: “1.3” and “KdfrJKN”. These values match the campaign-id reported by the FE researchers back in 2018.

These identifiers are clearly visible in Figure 7, where the in-memory analysis session shows the malware configuration.

Figure 7 – The malware accesses to its configurations.

The data sent to the C2 are protected by SSL encryption. However, emulating the network destination is possible to decrypt the victim information sent to the remote server; the data are transmitted into the “u=” parameter of HTTP POST requests.

Figure 8 – POST body.

This evidence matches the FELIXROOT backdoor’s behavior reported into past FE researches, where the usage of three main HTTP parameter, including the “u=” one, have been documented.

CommandDescription
“u=”Send information about victim machine as computer name, 
user name, volume serial number, Windows version, 
processor architecture and two additional values: “1.3” and “KdfrJKN
“&h=”Command executed and its results
“&p=”Information about data associated with the C2 server.

Also, a binary differential analysis between the January’s sample and the FELIXROOT_1 sample reported only three modified binary areas, as shown in Figure 10.

Figure 10 – Differences between the latest binary and FELIXROOT_1 sample.

Conclusion

The sample disclosed in January 2019 is clearly classifiable as GreyEnergy malware implant with highest level of confidence: the behaviour, the configurations and the static data closely match TTP and technical details from previous analysis. 

This means the analyzed sample is linked to the BlackEnergy/Sandworm APT group.

The recent detection of this previously unknown sample containing known campaign identifiers, may suggest the attack operations reported by third party firms in 2018 are still ongoing.

The lack of contextual data about this new sample makes the determination of the current targeted organizations harder; however CERT-Yoroi assessed no organization part of its constituency have been impacted by this threat.

Further details, including IoCs and Yara rules are reported in the analyais published by Yoroi.

https://blog.yoroi.company/research/greyenergy-welcome-to-2019/
[adrotate banner=”9″] [adrotate banner=”12″]

Pierluigi Paganini

(SecurityAffairs – GreyEnergy, ICS-SCADA)

[adrotate banner=”5″]

[adrotate banner=”13″]



you might also like

leave a comment