For the past few months, developers who publish their code on GitHub have been targeted in an attack campaign that uses a little-known but potent cyberespionage malware.
The attacks started in January and consisted of malicious emails specifically crafted to attract the attention of developers, such as requests for help with development projects and offers of payment for custom programming jobs.
The emails had .gz attachments that contained Word documents with malicious macro code attached. If allowed to execute, the macro code executed a PowerShell script that reached out to a remote server and downloaded a malware program known as Dimnie.
According to researchers from Palo Alto Networks, Dimnie has been around since at least 2014, but has flown under the radar until now because it primarily targeted users from Russia.
The malware uses some stealthy techniques to make its malicious traffic blend into normal user activity. It generates requests that appear to be directed to Google-owned domain names, but which in reality are sent to an attacker-controlled IP address.
Dimnie is able to download additional malicious modules that are injected directly into the memory of legitimate Windows processes. These modules leave no traces on disk, which makes their detection and analysis more complicated, the Palo Alto researchers said in a blog post.
There are separate modules for keylogging, screen grabbing, interacting with smartcards attached to the computer and more. There is even a self-destruct module that wipes all files from the system drive in order to destroy traces of the malware's presence.
Data stolen from an infected computer is encrypted and appended to image headers in an attempt to bypass intrusion prevention systems.
Even though Palo Alto Networks did not attribute these attacks to a particular group, the malware bears striking similarities to other recent attacks that are suspected of being state-sponsored: the use of documents with malicious macros, the use of PowerShell, the loading of malicious code directly in memory, the use of stealthy command-and-control channels and data exfiltration techniques, highly targeted phishing campaigns and more.
Developers can be valuable targets for cyberespionage. Their computers often hold proprietary information and access credentials for their employers' networks and systems.
The Yahoo breach that resulted in hackers gaining access to the accounts of 500 million users started with a semi-privileged employee falling for a spear-phishing email.
The Dimnie attack campaign seems to have specifically targeted developers who are present on GitHub, a free source code hosting service. This category also includes developers who work for large companies and who publish personal open source projects in their spare time.
In a response to a report about these emails in January, Gervase Markham, who works as a policy engineer at Mozilla, said that he received several such messages to an email address that he only used on Github. This made him believe that the targeting might have been automated.
With access to source code repositories and distribution servers attackers can inject backdoors into software projects or turn the compiled binaries into Trojan horses. This has happened several times in the past.Â For example, the macOS version of the Transmission BitTorrent client hosted on the project's official website was found to contain malware on two separate occasions.