A case of mistaken identity?

The role of BlackEnergy in Ukrainian power grid disruption

Co-authored by Raj Samani, Chief Technology Officer of Intel Security’s Europe, Middle East, and Africa division

Recent reports of electricity outages across the Ukraine has led to significant speculation regarding the specific malware that was used to disrupt supply.  Intel Security’s approach in understanding this particular event included making contact with the impacted organization to offer our support, and where possible, retrieving data in order to analyze the true nature of the threat.  In this case the impacted organization allowed us to publicly share our findings in order to benefit the entire industry.  Researchers from the Advanced Programs Group (APG) team within Intel Security were able to analyze multiple samples that were used in an attack, raising questions regarding the role of Black Energy in disrupting the supply of electricity.  We would also like to acknowledge the support we were provided in the technical investigation of our partner BAKOTECH Group.

This post builds upon our initial blog posting that detailed the historical evolution of Black Energy.

It begins with a Phish

Our malware zoo within McAfee Labs contains a wealth of data that can be used to identify the re-use of tools in a particular attack.  In this instance we cross referenced the initial dropper and collected samples that were used by infected systems.  Indeed this was absolutely necessary because the criminal infrastructure used to host the second malware instance was offline when our initial analysis began.  As we began our analysis, we identified a number of similarities with previous campaigns that targeted the energy sector.

In March 2015, an email appearing to be from the Supreme Council of Ukraine (Verkhovna Rada of Ukraine) was sent to multiple state institutions in the Ukraine. One of the targets in this campaign was a power company situated in the western part of the Ukraine. The spear-phishing email contained an XLS attachment with a macro in it.

Picture1

Once the document was opened, a macro was executed, the BlackEnergy dropper was created and the dropper started to download the final BlackEnergy 2/3 version.

One of the interesting email-artifacts was a part of the SMTP header that pointed into an IP-address and name of the mail-server used to spread the spear-phishing emails.

We received information that, once the attackers were in the network, they compromised a webserver and used it as a beach-head for entering a segment of the company’s network. The attackers were using tools that are freely available on the Internet for download, including web-shells, tunneling tools and SSH server tools.

If we compare the previous attack with the BlackEnergy attack on the grid reported in December we can recognize a number of similarities.   First, the attack-vector is exactly the same, namely a spear-phishing campaign.  Below is an example of the content of the email:

Picture2

The attachment was a weaponized Excel sheet containing a dropper. Once launched, the payload was downloaded from a site hosted in the Ukraine.

We investigated the SMTP headers in this case and found that the attack in December leveraged a mail server with the same IP-address and name as a server used in the previously described campaign in March. The energy sector was one of the targets in both campaigns.

Besides these files, we received also a package of suspicious files for analysis. These files were part of a web template system called Synio. The Synio template is part of the LiveStreet Content Management System (CMS). Livestreet is a Russian site that allows for the free download of engines for blogging and social networking. It is not known to us whether these files were related to the spear-phishing campaign or part of lateral movement. However, we noticed references to the synio template being used on the server that hosted the payload for the dropper: “8080/templates/compiled/synio/…” One of the files in the templates was definitely not part of normal content management.

After analysis of this php-file, we determined that it was a php-web-shell.

Picture3

These WSO web-shells are often used after compromising a server to keep access. They usually support multiple modules with a variety of features. In this case the shell included the following modules:

  • Console
  • SQL Manager
  • Support for Windows and Linux OS
  • Server Information
  • File Manager
  • Editing, Modifying files
  • SQL Console
  • PHP Console
  • Network Analysis tools

Access to the web-shell was secured with an easy to crack md5 password.

One interesting feature was the ‘search for hash option’ – where discovered hashes could be sent to certain sites that might have cracked the value for these hashes:

Picture4

For both the March and December attacks, there are some similarities:

  • Spear-phishing using weaponized Office documents
  • Email-sender is using a valid “info” addressee in the Ukraine
  • Same mail-provider and server used
  • The usage of common backdoor tools
  • Sophistication of attacks are low.

The use of BlackEnergy for espionage is not new, but prior to the December attack, there has been no evidence that prior campaigns used BlackEnergy for more than stealing confidential information from a victim organization.   While the latest attack included a wiper component, we did not find any evidence that this malware specifically targeted SCADA systems. Therefore, it appears unlikely that the BlackEnergy malware was the direct cause of the outage. It is unclear if a single actor both controlled BlackEnergy and also issued a coordinated shutdown of the electrical system.

Meanwhile, the spear-phishing campaigns in Ukraine appear to have continued into January 2016, using Word documents instead of Excel. While available information does not yet point to a clear root cause, additional details are emerging and analysis is ongoing.  There is greater confidence that the follow-up phishes was from the same group, than this group being responsible for the availability disruption.  Not only does this adopt the same modus operandi but is more aligned with the level of technical sophistication that we have seen with BlackEnergy.     We are continuing analysis as more samples are received and will provide more detail in due course.

The post A case of mistaken identity? appeared first on McAfee.