Attackers often use email as a vector for distributing malicious code, but very few threat actors use it as a mechanism for controlling malware on infected systems.
One exception is Turla, a highly sophisticated Russian-speaking cyberespionage group that for the past several years has been using PDF files in emails to control an especially stealthy Microsoft Outlook backdoor.
In a report this week, security vendor ESET described Turla as deploying versions of the backdoor against numerous government and military targets likely since 2009. The most recent victims of the backdoor include Germany’s Federal Foreign Office; a major defense contractor; and the foreign offices of at least two other European countries.
In the attack against the Germany foreign office, Turla dropped the backdoor on several systems and used them to steal data for almost all of 2017. The attacks on the other entities were not previously known until ESET's investigation uncovered them, the security vendor said.
Timestamps in the malware's code — likely faked — suggest that Turla developed a basic version of the Outlook backdoor in 2009. The first iteration of the malware could only dump email. Since then, however, the group has added new features to make it an extremely stealthy and resilient tool for stealing data from target networks, ESET said.
In 2013, for instance, Turla introduced a capability that allowed the backdoor to execute commands sent via email in XML format. In 2006, the group added the ability for the malware to respond to commands sent as email attachments in specially crafted PDF documents. The latest version- released in April 2018 -incorporates the ability to execute PowerShell scripts directly in computer memory.
"Email as a network protocol is very rare for a backdoor," says Matthieu Faou, malware researcher at ESET. Turla is currently the only threat group using a backdoor that's completely controllable via email.
Most backdoors use HTTP or HTTPS to communicate with their command and control (C2) servers and a few use other protocols such as DNS. Typically, the network traffic associated with these protocols is highly monitored or filtered, especially in big organizations and government entities. Emails are generally only monitored for spam and malicious attachments or links.
"Also, using emails means that the network traffic blends with the legitimate [traffic] more easily as it goes directly to the enterprise mail server instead of a malicious C&C server," Faou notes. "So [it] is very unlikely that an email, containing a PDF with information exfiltrated from the compromised machine, will be blocked by any security system."
The Turla group has been installing the Outlook backdoor — basically a Dynamic Link Library (DLL) — on hard drives using other first-stage droppers from its malware arsenal. To maintain persistence on a compromised system, the group uses a technique called COM object hijacking to tamper with the Windows registry, Faou says.
What it Does
The backdoor is designed to monitor all incoming and outgoing emails from the compromised system and to collect message metadata about the sender, recipient, subject, and attachment name (if any). The data is compiled in logs that are then bundled together and sent periodically to Turla operators in specially crafted PDF documents attached to emails.
The Outlook backdoor also checks all incoming email for PDFs that might contain commands from the attackers. The malware is designed to accept commands from any threat actor that is able to encode them in the right format in a PDF document. If the email address to which the malware typically transmits stolen data is blocked, the threat actor can regain control of the backdoor simply by sending a rogue PDF with a new C2 address.
The main difference from other backdoors is that the operator can initiate the communication with the backdoor while the malware is inspecting emails being downloaded automatically to the inbox, Faou says.
No Firewall Issues
A traditional backdoor receives C2 communications from a remote server. If the server is blocked, communication and control is lost as well. "For the Outlook backdoor, the operator can regain control of the compromised machine by sending an email from any email address, removing the single point of failure." Since the rogue email uses the enterprise Exchange Server, it does not have to deal with any firewalls either, Faou says.
The Turla group has been around for several years, and is called Snake and Uroburos by other security research teams. It is associated with a cybersecurity breach at US Central Command in 2008, and with attacks against numerous governments and military organizations worldwide. Known victims include Finland's foreign ministry, a Swiss military and the German government.
The manner in which Turla has refined the backdoor shows the group is active and constantly innovating. The improvements also show the group has a very skilled development team Faou says. "Enterprises should not only consider emails as a malware vector but also as a communication layer for malware," he says.
"It is important to monitor emails for unusual behavior, such as the forwarding of every email to an external email address."
Jai Vijayan is a seasoned technology reporter with over 20 years of experience in IT trade journalism. He was most recently a Senior Editor at Computerworld, where he covered information security and data privacy issues for the publication. Over the course of his 20-year ... View Full Bio