Stealthy command and control methods allowed a newly discovered malware family to fly under the radar for more than three years, Palo Alto Networks security researchers reveal.
Dubbed Dimnie, the threat was discovered in mid-January 2017, when it was targeting open-source developers via phishing emails. An attached malicious .doc file contained embedded macro code that executed a PowerShell command to download and execute a file.
The first samples pertaining to this malware family dated back to early 2014, but the use of stealthy command and control (C&C) methods, combined with a Russian-focused target base helped the threat remain unnoticed until this year. Dimnie, which attempted a global reach with its January 2017 campaign, is capable of downloading additional malware and stealing information from compromised systems.
The malware has a modular design and can hinder analysis by injecting each of its modules into the memory of core Windows processes. What’s more, the malware appears to have undergone a series of changes over time, Palo Alto Networks reveals.
Looking at the threat’s communication with the C&C infrastructure, the security researchers discovered that it uses HTTP Proxy requests to the Google PageRank service, which hasn’t been available to the public since last year. Because the absolute URI in the HTTP request is for a non-existent service, the server isn’t acting as a proxy, and the seemingly RFC compliant request is merely camouflage.
The HTTP traffic also reveals that the malware uses an AES key to decrypt payloads (which have been previously encrypted using AES 256 in ECB mode). The server’s reply also contains a Cookie value, which is a 48 byte, base64 encoded, AES 256 ECB encrypted series of UINT32 values pertaining to the payload. The malware uses the Cookie parameter to verify the payload’s integrity.
One of the threat’s modules can exfiltrate data using HTTP POST requests to another Google domain, gmail[.]com. These requests, however, are hardcoded to be sent to an attacker controlled server. The malware attempts to hide its presence by masquerading the network traffic as legitimate requests. The data is once again encrypted, the security researchers say.
Analyzing the manner in which Dimnie handles payloads, the researchers discovered that data isn’t written to disk, but the payloads are simply downloaded and subsequently injected directly into memory. The various modules the malware downloads can: extract PC information and send it to the C&C server; enumerate running processes and send the list; log keystrokes, take screenshots; send logged keys and clipboard data to the server; and delete all files on the C:\ drive.
According to Palo Alto, the malware’s main functionality appears to be information stealing and reconnaissance. However, the threat’s modular framework supposedly allows attackers to use numerous capabilities, and the malware might be able to perform other operations as well, courtesy of modules that haven’t been observed during analysis.
“Multiple factors have contributed to Dimnie’s relatively long-lived existence. By masking upload and download network traffic as innocuous user activity, Dimnie has taken advantage of defenders’ assumptions about what normal traffic looks like. This blending in tactic, combined with a prior penchant for targeting systems used by Russian speakers, likely allowed Dimnie to remain relatively unknown,” Palo Alto researchers conclude.