MASEPIE
- Type
- Backdoor
- Capabilities
- ExfiltrationPost exploitation
- Delivery
- SpearphishingLanding pageLure
- Platforms
- Windows
MASEPIE is a Python backdoor used by APT28, the Russian GRU Unit 26165 cyberespionage group, against Windows systems. Publicly documented in December 2023, it provides arbitrary shell-command execution and bidirectional file transfer, supporting payload delivery and data exfiltration. It has been used against Ukrainian government entities and Polish organizations, and in espionage campaigns targeting Western logistics and technology companies supporting assistance to Ukraine.
MASEPIE infection chains use spearphishing messages linking to document-themed landing pages. These pages abuse Windows search URI handling to display attacker-controlled WebDAV content in Windows Explorer. Victims are induced to open malicious shortcuts, sometimes distributed in archives, which execute a Python interpreter and the backdoor while displaying a decoy document. MASEPIE has also been used to load STEELHOOK PowerShell scripts for browser-data theft.
The backdoor communicates over raw TCP channels on nonstandard ports and supports uploading files, downloading files, and executing commands through the Python operating-system interface. Observed implementations encrypt traffic using AES-128 in CBC mode with a randomly generated 16-character key transmitted in cleartext at session establishment. APT28 has repeatedly used compromised Ubiquiti EdgeRouters as MASEPIE command-and-control infrastructure; the backdoor itself runs on victim endpoints rather than on those routers.
Associated vulnerabilities
2 CVEs Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
Associated threat actors
2 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
MASEPIE : Python downloader, abuses the Windows URI handler with WebDAV staging.
The Russian GRU cyber campaign also involves malware such as HEADLACE and MASEPIE, which are used for persistence and data exfiltration.
Techniques & procedures
23 distinct techniques documented for this family, organized by ATT&CK tactic.
Resource Development
2 techniques
Resource Development
In early 2023, APT28 actors authored custom Python scripts to collect account credentials for specifically targeted webmail users.
For example, in January 2022, GRU Unit 29155 launched WhisperGate, a wiper malware attack that overwrote the master boot records of Ukrainian government systems.
Initial Access
6 techniques
Initial Access
"those protocol handlers can be leveraged to trigger the display of remote files made available through a WebDAV server"
A significant aspect of the campaign involves the exploitation of known vulnerabilities. The actors have weaponized multiple CVEs, including: CVE-2023-23397 in Microsoft Outlook to harvest credentials Roundcube vulnerabilities for email server access CVE-2023-38831 in WinRAR for remote code execution
The Russia-linked threat actor known as APT28 has been linked to multiple ongoing phishing campaigns that employ lure documents imitating government and non-governmental organizations (NGOs) in Europe, the South Caucasus, Central Asia, and North and South America.
The phishing attacks impersonate entities from several countries such as Argentina, Ukraine, Georgia, Belarus, Kazakhstan, Poland, Armenia, Azerbaijan, and the U.S., putting to use a mix of authentic publicly available government and non-government lure documents to activate the infection chains.
"The phishing emails contained links to malicious webpages (e.g. e-wody.firstcloudit[.]com )"
"The threat actor sent phishing emails to targeted recipients using previously compromised email accounts."
Execution
7 techniques
Execution
The climax of APT28's elaborate scheme ends with the execution of MASEPIE, OCEANMAP, and STEELHOOK, which are designed to exfiltrate files, run arbitrary commands, and steal browser data.
APT28 used MASEPIE to load PowerShell scripts called Steelhook...
"a Python interpreter and a malicious payload script (MASEPIE) would be downloaded and executed"
The actors have weaponized multiple CVEs, including: CVE-2023-23397 in Microsoft Outlook to harvest credentials ... CVE-2023-38831 in WinRAR for remote code execution
"following the click on a link in a phishing email and then on the landing page"
The latest campaigns observed by IBM X-Force between late November 2023 and February 2024 take advantage of the "search-ms:" URI protocol handler in Microsoft Windows to trick victims into downloading malware hosted on actor-controlled WebDAV servers.
"the JavaScript execution will ... [do] a page location redirection to a URI of type search:"
Persistence
1 technique
Persistence
"those protocol handlers can be leveraged to trigger the display of remote files made available through a WebDAV server"
Credential Access
1 technique
Credential Access
The climax of APT28's elaborate scheme ends with the execution of MASEPIE, OCEANMAP, and STEELHOOK, which are designed to exfiltrate files, run arbitrary commands, and steal browser data.
Collection
2 techniques
Collection
The climax of APT28's elaborate scheme ends with the execution of MASEPIE, OCEANMAP, and STEELHOOK, which are designed to exfiltrate files, run arbitrary commands, and steal browser data.
APT28 used MASEPIE to load PowerShell scripts called Steelhook to steal Chrome browser-based data, which APT28 sent to its C2 server.
Command and Control
5 techniques
Command and Control
The latest campaigns observed by IBM X-Force between late November 2023 and February 2024 take advantage of the "search-ms:" URI protocol handler in Microsoft Windows to trick victims into downloading malware hosted on actor-controlled WebDAV servers.
"Ubiquiti networks devices are being used as malicious infrastructure to stage infection files, and as command and control servers or reverse-proxies."
"MASEPIE uses two raw TCP connections to a command and control (C2) server on non-standard and high TCP ports"
The latest campaigns observed by IBM X-Force between late November 2023 and February 2024 take advantage of the "search-ms:" URI protocol handler in Microsoft Windows to trick victims into downloading malware hosted on actor-controlled WebDAV servers.
"Data over TCP connections is further encrypted (AES-128 with CBC mode)"
Observables
6 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
15 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.