Email Filters Defeated by Polyglot File Trick Used in Malware Campaigns

Email Filters Defeated by Polyglot File Trick Used in Malware Campaigns

Attackers are increasingly using advanced disguising techniques, such polyglot files, to get around email filters and successfully send phishing payloads in the constantly changing world of cyber threats.

These polyglot files, which can be interpreted as multiple file formats simultaneously, allow malicious content to evade detection by appearing benign to security scanners.

This shift marks a departure from traditional malicious document distribution, with adversaries favoring alternative formats like Windows shortcut (LNK) files for their stealth and execution efficiency.

Concurrently, hacktivist groups are pivoting from ideological campaigns toward more conventional illicit pursuits, including espionage and financial exploitation, while integrating advanced tools and methodologies to enhance their operational sophistication.

Evolving Tactics in Phishing

A recent campaign exemplifies these tactics, where adversaries leveraged compromised organizational email addresses to disseminate phishing messages.

Phishing email

These emails featured subject lines mimicking legitimate business documents, such as “Транспортная накладная ТТН № 391-44 от 26.06.2025” (Waybill WB No. 391-44 dated June 26, 2025) and “Договор РН83-371” (Contract PH83-371).

Attached were .zip polyglot files, which doubled as PE32+ dynamic link libraries (DLLs).

These polyglots concealed a decoy document and an embedded ZIP archive containing an LNK file.

Upon execution, the LNK file initiates a sequence to locate the polyglot file first in the current directory, then recursively in the %USERPROFILE% and %TEMP% directories.

It then invokes the polyglot via rundll32.exe, targeting the exported EntryPoint function.

Subsequently, it extracts a decoy file by reading specific byte offsets (e.g., skipping 1,107,968 bytes and taking the next 3,280,549 bytes) and saves it to %TEMP%, before opening it using cmd /c start to maintain the illusion of legitimacy.

An example command from a sample LNK file, such as “Договор_РН83_37_изменения.pdf.lnk,” employs PowerShell to handle path resolution, execution, and decoy extraction, ensuring hidden operation with parameters like -WindowStyle hidden.

PhantomRemote Backdoor

At the core of this malware delivery is the PhantomRemote backdoor, a PE32+ DLL developed in C++ that embeds its malicious logic within the DllMain function.

The EntryPoint export includes a check on a global variable; if set to 1, it enters an infinite loop with 5-second Sleep() calls to potentially evade analysis.

PhantomRemote begins by gathering system intelligence: it generates a GUID via CoCreateGuid() (defaulting to “UNKNOWN” on failure), retrieves the computer name using GetComputerNameW(), and obtains the domain via GetComputerNameExW(ComputerNameDnsDomain).

It establishes a working directory in %PROGRAMDATA%, named either “YandexCloud” or “MicrosoftAppStore” across samples, for storing downloaded files.

Communication with the command-and-control (C2) server occurs over HTTP, initiating with a GET request to URLs like “91.239.148[.]21/poll?id=&hostname=&domain=”, transmitting collected data under User-Agent headers such as “YandexCloud/1.0” or “MicrosoftAppStore/2001.0.”

The backdoor processes commands in formats like “cmd:|” for executing shell commands via cmd.exe (with output piped from stdout and stderr, sometimes using Unicode encoding via /u and chcp 65001), or “download:|” to fetch files using WinHTTP.dll functions, saving them to the working directory.

Post-execution, responses are sent via POST to “/result” endpoints, detailing success or failure (e.g., “Download successful: %PROGRAMDATA%YandexCloud” or “Download failed”).

Between cycles, the malware sleeps for 10 seconds on success or 1 second on failure, maintaining persistence and low visibility.

According to the Report, this backdoor’s modular design enables loading additional executables from C2, amplifying threats like data exfiltration or lateral movement.

These campaigns underscore the need for enhanced email gateway protections against polyglot anomalies and behavioral analysis for LNK-induced executions.

Security teams should monitor for anomalous DLL loads via rundll32 and HTTP traffic with specific User-Agents.

Indicators of Compromise (IOCs)

Category File/IP MD5 SHA1 SHA256
PhantomRemote Договор_РН83_37_изменения.zip 75a26a138783032ee18dcfc713b1b34c 04d364d7cc98379352e89757d62521271cb410cb ed9b24a77a74cd34c96b30f8de794fe85eb1d9f188f516bd7d6020cc81a86728
PhantomRemote Договор_РН83_37_изменения.zip 7e52be17fd33a281c70fec14805113a8 6942e07e7d08781cba571211a08e779838e72e9a 204544fc8a8cac64bb07825a7bd58c54cb3e605707e2d72206ac23a1657bfe1e
PhantomRemote Транспортная_накладная_ТТН_№391-44_от_26.06.2025.zip be990a49fa1e3789ebc5c55961038029 851157c01da6e85ffa94ded7f42cab19aa8528d6 01f12bb3f4359fae1138a194237914f4fcdbf9e472804e428a765ad820f399be
PhantomRemote (Unnamed) b586cf958334415777719bf512304fbd 775b7e726ba6cf6d9a6463a62797c97612018066 4c78d6bba282aaff0eab749cfa8a28e432f7cbf9c61dec8de8f4800fd27e0314
PhantomRemote Договор_РН83_изменения.zip 65967d019076e700deb20dcbc989c99c 49a18dc1d8f84394d3373481dbac89d11e373dbd 413c9e2963b8cca256d3960285854614e2f2e78dba023713b3dd67af369d5d08
PhantomRemote (Unnamed) b49a7ef89cfb317a540996c3425fcdc2 d9a4fd39a55cd20d55e00d3cace3f637b8888213 b683235791e3106971269259026e05fdc2a4008f703ff2a4d32642877e57429a
LNK Договор_РН83_37_изменения.pdf.lnk 698337a1be374f3ebb9556ccdc794389 dc149c042747ddf4f58c7ac6bf23e6a02ce1fc77 e3e3f7d9abb9696904684d8e32f36818e1939c8122dcc73299a1b7f6b6b700b2
LNK Транспортная_накладная_ТТН_№391-44_от_26.06.2025.xls.lnk 88453eb954669b5c7ac712ecf1e0179c 2a14a9dd1032479ab5bf8ed945ef9a22ebd4999d 4d4304d7ad1a8d0dacb300739d4dcaade299b28f8be3f171628a7358720ca6c5
LNK Договор_РН83_изменения.pdf.lnk 08a92ba1d1d9e5c498dcaf53af7cd071 c52d70b92e41db70d4ca342c8dc32eff7883c861 a9324a1fa529e5c115232cbbc60330d37cef5c20860bafc63b11e14d1e75697c
Decoy %TEMP%Договор_РН83_37_изменения.pdf 1dff0bcf719f3509c597a8955e49af38 4ce5e6e0b21323409db8cd8ed2a7ed251656d18a 47262571a87e70238bd6afd376560e9cfdc94bfacae72f36b6aa9fb6e769eb9c
Decoy %TEMP%Договор_РН83_изменения.pdf 1dff0bcf719f3509c597a8955e49af38 4ce5e6e0b21323409db8cd8ed2a7ed251656d18a 47262571a87e70238bd6afd376560e9cfdc94bfacae72f36b6aa9fb6e769eb9c

Stay Updated on Daily Cybersecurity News. Follow us on Google News, LinkedIn, and X.


Source link