Skip to main content
Mallory
Malware3 associated actors2 associated CVEs

KEYPLUG

Tracked since Nov 25, 2025 · Updated 6 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days3 mentions · peak 1 in a dayToday
Vulns2Associated
Actors3Associated
ATT&CK22Techniques
IOCs18Tracked
Type
Backdoor
Capabilities
ReconnaissanceExfiltrationPost exploitationDefense evasion
Platforms
WindowsLinux
Also known asKEYPLUG.LINUX

KEYPLUG is a modular backdoor implemented in C++ with Windows and Linux variants. It is used by multiple China-linked threat clusters, including APT41 and STORM-0866/Red Dev 40, rather than being exclusive to a single actor. Its use has been documented in intrusions against U.S. government entities and in operations targeting government organizations and telecommunications providers in the Middle East and South Asia.

KEYPLUG collects host information, exfiltrates system and user data, and manages plugins. It supports multiple command-and-control transports, including HTTP, TCP, UDP, WebSocket, TLS-encrypted WebSocket, QUIC, and KCP over UDP. It can retrieve the infected computer's tick count and use derived values for execution timing and protocol-specific keys.

The Windows variant can retrieve command-and-control addresses from encoded data embedded in posts on legitimate technology community forums, using these services as dead drop resolvers. Operators have also routed its communications through Cloudflare CDN infrastructure to conceal backend command-and-control servers. Deployment-related evasion techniques include splitting KEYPLUG binaries into multiple sections on disk and changing file extensions to hinder detection.

Is this in your environment?See whether this family's indicators match your telemetry and which of your assets are exposed to the CVEs associated with it.
Check your exposure
Associated CVEs

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.

CVE-2024-23108via ahnlab asec blogExploited in the wildUnauthenticated Root Command Execution in Fortinet FortiSIEM phMonitorAPT41’s infrastructure was briefly exposed, and scripts, encrypted web shells, and reconnaissance tools that exploit the vulnerability of Fortinet devices were discovered. Malware and Tools: KeyPlug backdoor, 1.py, ws_test.py, bx.php, fscan. | APT41’s infrastructure was briefly exposed, and scripts, encrypted web shells, and reconnaissance tools that exploit the vulnerability of Fortinet devices were discovered. ... CVE-2024-23108: Fortinet vulnerability ... Attempted to gain initial access by exploiting the vulnerability of Fortinet firewall and VPN devices ... Executed CLI commands through an unauthorized WebSocket endpoint.View vulnerability →Source ↗
CVE-2024-23109via ahnlab asec blogExploited in the wildUnauthenticated OS command injection in Fortinet FortiSIEM supervisorAPT41’s infrastructure was briefly exposed, and scripts, encrypted web shells, and reconnaissance tools that exploit the vulnerability of Fortinet devices were discovered. Malware and Tools: KeyPlug backdoor, 1.py, ws_test.py, bx.php, fscan. | APT41’s infrastructure was briefly exposed, and scripts, encrypted web shells, and reconnaissance tools that exploit the vulnerability of Fortinet devices were discovered. ... CVE-2024-23109: Fortinet vulnerability ... Attempted to gain initial access by exploiting the vulnerability of Fortinet firewall and VPN devices ... Executed CLI commands through an unauthorized WebSocket endpoint.View vulnerability →Source ↗
Threat actors

Associated threat actors

3 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.

View more details →
APT41

(Citation: Mandiant APT41)

via mitre attack structuredgithub.com
STORM-0866/Red Dev 40

The modular backdoor KEYPLUG is a staple in STORM-0866/Red Dev 40’s arsenal. Mandiant first reported on KEYPLUG as part of intrusions into U.S. government entities by the Chinese APT group APT41.

via sentinelone labssentinelone.com
UNC3569

The fake FBI domain is one of the group’s favourites... five of which are observed to be used as the C2 server for malware such as KEYPLUG, SOGU, Cobalt Strike BEACON, GRAYRABBIT and Gh0st.

via virusbulletinvirusbulletin.com
MITRE ATT&CK

Techniques & procedures

22 distinct techniques documented for this family, organized by ATT&CK tactic.

Persistence

1 technique
T1505.003Web ShellEvidence1

“A PHP-based webshell capable of AES and XOR-decrypted payload execution was included.”

Stealth

5 techniques
T1027Obfuscated Files or InformationEvidence6

The content repeatedly describes payloads, strings, configuration files, scripts, URLs, and binaries being obfuscated or encoded using Base64, XOR, RC4, AES, RSA, hex encoding, custom algorithms, and other methods across many malware families and threat actors.

T1027.013Encrypted/Encoded FileEvidence4

[KEYPLUG](https://attack.mitre.org/software/S1051) can use a hardcoded one-byte XOR encoded configuration file.(Citation: Mandiant APT41)

T1036MasqueradingEvidence2

During the 2016 Ukraine Electric Power Attack, DLLs and EXEs with filenames associated with common electric power sector protocols were used to masquerade files.

T1036.008Masquerade File TypeEvidence1

APT28 has changed extensions on files containing exfiltrated data to make them appear benign.

T1140Deobfuscate/Decode Files or InformationEvidence7

[KEYPLUG](https://attack.mitre.org/software/S1051) can decode its configuration file to determine C2 protocols.(Citation: Mandiant APT41)

Credential Access

1 technique
T1528Steal Application Access TokenEvidence1

At the heart of this new Winnti backdoor is a focused cloud credential harvesting engine that systematically walks through each major provider’s metadata and credential storage mechanisms. On AWS, the implant queries the instance metadata endpoint at 169.254.169.254 to extract IAM role credentials, while also reading the standard ~/.aws/credentials file if it exists. On GCP, it requests service account tokens from the metadata server and checks for application default credentials, and on Azure it pulls managed identity tokens from the IMDS endpoint and scans ~/.azure profiles. For Alibaba Cloud, the malware targets ECS metadata to obtain RAM role credentials and inspects the local Alibaba CLI configuration files.

Discovery

3 techniques
T1033System Owner/User DiscoveryEvidence1

Both backdoors first gather and exfiltrate system and user information in designated functions, with overlaps in gathered information (for example, MAC address, OS version, IP address, computer name, and username).

T1082System Information DiscoveryEvidence1

Both backdoors first gather and exfiltrate system and user information in designated functions, with overlaps in gathered information (for example, MAC address, OS version, IP address, computer name, and username).

T1124System Time DiscoveryEvidence4

[KEYPLUG](https://attack.mitre.org/software/S1051) can obtain the current tick count of an infected computer.(Citation: Mandiant APT41)

Command and Control

11 techniques
T1071Application Layer ProtocolEvidence3

The malware uses KCP protocol for backdoor communication... This backdoor has 20 commands and connects with C2 servers via KCP over UDP.

T1071.001Web ProtocolsEvidence10

[KEYPLUG](https://attack.mitre.org/software/S1051) has the ability to communicate over HTTP and WebSocket Protocol (WSS) for C2.(Citation: Mandiant APT41)

T1090ProxyEvidence4

[KEYPLUG](https://attack.mitre.org/software/S1051) has used Cloudflare CDN associated infrastructure to redirect C2 communications to malicious domains.(Citation: Mandiant APT41)

T1090.001Internal ProxyEvidence2

"APT41 used a tool called CLASSFON to covertly proxy network communications." / "BADCALL functions as a proxy server between the victim and C2 server." / "Sandworm Team's BCS-server tool can create an internal proxy server to redirect traffic..."

T1090.002External ProxyEvidence4

"APT41 used the Cloudflare CDN to proxy C2 traffic." / "Earth Lusca adopted Cloudflare as a proxy for compromised servers." / "KEYPLUG has used Cloudflare CDN associated infrastructure to redirect C2 communications..." / "Gamaredon Group has used the Cloudflare Tunnel client to proxy C2 traffic."

T1095Non-Application Layer ProtocolEvidence3

[KEYPLUG](https://attack.mitre.org/software/S1051) can use TCP and KCP (KERN Communications Protocol) over UDP for C2 communication.(Citation: Mandiant APT41)

T1102.001Dead Drop ResolverEvidence3

The [KEYPLUG](https://attack.mitre.org/software/S1051) Windows variant has retrieved C2 addresses from encoded data in posts on tech community forums.(Citation: Mandiant APT41)

T1105Ingress Tool TransferEvidence1

LuaDream and KEYPLUG then instantiate threads designated for sending and receiving C2 data, establish connection to the C2 server, and continue to process backdoor commands and manage plugins. Plugin management includes loading and unloading plugins.

T1572Protocol TunnelingEvidence1

Examples include: "COATHANGER uses an HTTP GET request to initialize a follow-on TLS tunnel for command and control" and "Drovorub can use the WebSocket protocol and has initiated communication with C2 servers with an HTTP Upgrade request."

T1573Encrypted ChannelEvidence1

The content repeatedly describes malware and threat actors using SSL, TLS, HTTPS, RSA, AES, Blowfish, RC4, ECIES, Diffie-Hellman, OpenSSL, WolfSSL, and mutual TLS to protect command and control traffic.

T1573.002Asymmetric CryptographyEvidence4

[KEYPLUG](https://attack.mitre.org/software/S1051) can use TLS-encrypted WebSocket Protocol (WSS) for C2.(Citation: Mandiant APT41)

Exfiltration

1 technique
T1041Exfiltration Over C2 ChannelEvidence1

Both backdoors first gather and exfiltrate system and user information in designated functions

Indicators of compromise

Observables

18 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.

View all in app →
Indicator values are available in Mallory. Pivot on every hash, domain, URL, and IP, or pipe them straight into your SIEM.View all in Mallory
Activity feed

Recent activity

23 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
+18 more in the timeline. Sign up to see them
Is this in your environment?See whether this family's indicators match your telemetry and which of your assets are exposed to the CVEs associated with it.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets match these IOCs, which detections are missing, which campaigns to expect next, and what to do in the next 30 minutes.
IOC matching18Match every observed IP, domain, and hash against your live telemetry.
Associated threat actors3Groups linked to this family, with evidence pinned to each claim.
Associated vulnerabilities2CVEs linked to this family, with the reporting behind each link.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
MITRE ATT&CK mapping22Every documented technique, ranked by evidence weight.
Researcher chatterReddit, Mastodon, and CTI community discussion around this family.