Security Experts:

'DePriMon' Malware First to Use Port Monitor for Persistence

A newly discovered malware downloader achieves persistence through registering a new local port monitor, ESET’s security researchers report.

Dubbed DePriMon, due to its use of the “Windows Default Print Monitor” name, the malware has a modular architecture and is complex enough for the researchers to consider it a framework.

The threat appears to have been active since at least March 2017 and was detected in a private company based in Central Europe, as well as tens of computers in the Middle East.

The use of Arabic words in some domain names employed as command and control (C&C) servers suggests a region-specific campaign.

In a handful of cases, the same machines were infected with both DePriMon and ColoredLambert malware, which is used by the cyber-espionage group known as Lamberts or Longhorn. This threat actor has been linked to WikiLeaks’ Vault 7 leak, which covers exploits and tools allegedly used by the U.S. Central Intelligence Agency (CIA).

The second and third stages of the attack are dropped to the disk in the first stage. After installing itself, the second stage loads the third stage using an encrypted, hardcoded path.

The third-stage DLL is registered as a port monitor, which ensures it is loaded by spoolsv.exe with SYSTEM privileges, which makes the attack highly effective.

Described in the MITRE ATT&CK framework as Port Monitors, the installation technique is unique and ESET believes DePriMon is the first malware employing this method to have been publicly detailed.

The second stage regularly checks the %system32% folder for a file featuring the same name as the third stage DLL, albeit without the “.dll” extension. Should it find this file, the malware removes it along with its own components.

The third stage, which is the downloader itself, uses the Microsoft implementation of SSL/TLS, named Secure Channel or Schannel, to communicate with the C&C, and makes heavy use of encryption.

DePriMon communicates securely over TLS, but uses Schannel after establishing the connection. Messages are encrypted and decrypted manually each time.

The malware’s configuration data has 27 members, an unusually large number for a downloader, and is stored encrypted in a temporary folder. Every time it needs an element from the configuration, the malware decrypts the file, retrieves the information, and encrypts the file back.

Analysis of the configuration file has revealed that the attackers were preparing to further their assault via a proxy with credentials. The file also contains different entries for C&C servers and ports (each used on a different occasion) and flags to indicate whether the connection is initialized via Security Support Provider Interface (SSPI) with a possible proxy or only a socket.

In addition to the C&C servers extracted from malware samples, ESET’s security researchers identified additional domains and servers likely related to the malware.

“DePriMon is an unusually advanced downloader whose developers have put extra effort into setting up the architecture and crafting the critical components. […] As a result, DePriMon is a powerful, flexible and persistent tool designed to download a payload and execute it, and to collect some basic information about the system and its user along the way,” ESET concludes.

Related: WikiLeaks CIA Files Linked to Espionage Group

Related: Sofacy Attacks Overlap With Other State-Sponsored Operations

view counter