Skip to main content
Mallory
Malware3 associated actors4 associated CVEs

BPFDoor

Tracked since Nov 25, 2025 · Updated 3 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days7 mentions · peak 2 in a dayToday
Vulns4Associated
Actors3Associated
ATT&CK52Techniques
IOCs160Tracked
Type
Backdoor
Capabilities
Post exploitationDefense evasionPersistenceLateral movementExfiltration
Platforms
LinuxNetwork device
Also known asBackdoor.Linux.BPFDOORBackdoor.Solaris.BPFDOOR.ZAJEJustForFun

BPFDoor is a stealthy backdoor targeting Linux and Solaris servers, including telecommunications infrastructure and network-edge appliances. It uses classic Berkeley Packet Filter (BPF) socket filters to recognize specially crafted TCP, UDP, or ICMP activation packets. Before activation, it does not require a listening command-and-control port or periodic beaconing. Its packet inspection occurs before host firewall filtering, allowing activation even when firewall rules would otherwise block the triggering traffic. Linux implementations attach filters to raw packet sockets, while analyzed Solaris implementations use libpcap.

After activation, BPFDoor provides remote command execution through reverse shells or bind shells. Direct-access variants temporarily modify firewall rules to redirect operator connections to a shell and remove those rules after connection. Variants support encrypted shell sessions, and TinyShell-based implementations provide file uploads and downloads. Concealment techniques include legitimate-looking process names, execution from memory-backed storage, deletion of running executable copies, timestamp manipulation, and suppression of shell and database-client command histories. Observed deployments have used modified startup scripts for persistence, although analyzed binaries do not necessarily implement persistence themselves. Newer variants impersonate SpamSniper anti-spam components or processes associated with Oracle-based telecommunications platforms. Controllers can also wrap activation traffic in HTTPS POST requests for delivery through edge proxies using TLS offloading.

BPFDoor is associated with the China-based threat actor Red Menshen, also known as Earth Bluecrow, DecisiveArchitect, and Red Dev 18. Operations have targeted telecommunications, government, education, logistics, retail, and financial services organizations, particularly across Asia and the Middle East, with additional targeting in Africa and the United States. Controllers deployed on compromised hosts enable access to other infected systems within victim networks. Initial infection methods are not consistently established. Public disclosure of its source code in 2022 means BPFDoor's presence alone is insufficient to attribute an intrusion to a particular actor.

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

4 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-2019-3010via trendai security blogLocal Privilege Escalation in Oracle Solaris xscreensaver via -log SwitchFor example, there's a BPFDoor sample compiled for Solaris that exploits CVE-2019-3010, and there are efforts to bring eBPF to Windows. | The stealthy rootkit-like malware known as BPFDoor (detected as Backdoor.Linux.BPFDOOR) is a backdoor with strong stealth capabilities, most of them related to its use of Berkeley Packet Filtering (BPF).View vulnerability →Source ↗
CVE-2021-21972via medium mrtiepoloExploited in the wildUnauthenticated Remote Code Execution in VMware vSphere ClientThe threat actor then moved laterally to an unpatched VMware ESXi server and exploited CVE-2021–21972 and CVE-2021–21974 to achieve remote code execution on multiple ESXi hosts, where the BPFdoor controller was deployed. | Rapid7 Labs published the results of a months-long investigation into a sophisticated espionage campaign targeting telecommunications providers worldwide. Their analysis, “BPFdoor in Telecom Networks: Sleeper Cells in the Backbone,” is an excellent technical deep-dive into the BPFdoor malware and its capabilities.View vulnerability →Source ↗
CVE-2021-21974via medium mrtiepoloExploited in the wildVMware ESXi OpenSLP Heap Overflow Remote Code ExecutionThe threat actor then moved laterally to an unpatched VMware ESXi server and exploited CVE-2021–21972 and CVE-2021–21974 to achieve remote code execution on multiple ESXi hosts, where the BPFdoor controller was deployed. | Rapid7 Labs published the results of a months-long investigation into a sophisticated espionage campaign targeting telecommunications providers worldwide. Their analysis, “BPFdoor in Telecom Networks: Sleeper Cells in the Backbone,” is an excellent technical deep-dive into the BPFdoor malware and its capabilities.View vulnerability →Source ↗
CVE-2025-55182via f5 communityExploited in the wildReact2Shell"A critical remote code execution (RCE) vulnerability, identified as CVE-2025-55182 and dubbed React2Shell, exists within the React Server Components (RSC) architecture, allowing unauthenticated attackers to execute arbitrary code..."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 →
Red Menshen

This malware family seems to be tracked by PwC as BPFDoor used by the Red Menshen threat actor

via exatrack blogexatrack.com
DecisiveArchitect

BPFDoor opens a SOCK_RAW or AF_PACKET socket and attaches a BPF filter. This looks for marked traffic.

via trooperstroopers.de
Salt Typhoon

Dubbed "BPFdoor," the backdoor operates without opening ports or generating typical beaconing activity, which the cybersecurity firm said allowed the Chinese-linked actors to avoid detection across traditional endpoint and network monitoring tools.

via sdxcentral cybersecuritysdxcentral.com
MITRE ATT&CK

Techniques & procedures

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

Initial Access

3 techniques
T1078Valid AccountsEvidence2

Attacks usually begin at the network edge by exploiting exposed services or valid accounts on devices like VPNs, firewalls, and virtualization hosts.

T1133External Remote ServicesEvidence1

Based on the password or existence of a password sent in the “magic packet” the backdoor provides a reverse shell, establishes a bind shell, or sends back a ping.

T1190Exploit Public-Facing ApplicationEvidence5

in March 2024, a hacker infiltrated the network by exploiting a vulnerability on the KT Roaming Rental Service website

Execution

4 techniques
T1053.003CronEvidence1

Persistence would need to be initiated by the attacker in some other way such as rc or init scripts or scheduled tasks such as with crontab.

T1059Command and Scripting InterpreterEvidence10

The newer variant analyzed by Deep Instinct features static library encryption, reverse shell communication, and all commands are sent by the C2 server.

T1059.004Unix ShellEvidence11

[BPFDoor](https://attack.mitre.org/software/S1161) can create a reverse shell and supports vt100 emulator formatting.(Citation: Sandfly BPFDoor 2022)

T1106Native APIEvidence1

The malware creates a raw network socket and sets BPF filters on it to inspect incoming traffic.

Persistence

10 techniques
T1037Boot or Logon Initialization ScriptsEvidence1

Persistence would need to be initiated by the attacker in some other way such as rc or init scripts... The initial report referenced above indicates that persistence scripts have been found.

T1053.003CronEvidence1

Persistence would need to be initiated by the attacker in some other way such as rc or init scripts or scheduled tasks such as with crontab.

T1078Valid AccountsEvidence2

Attacks usually begin at the network edge by exploiting exposed services or valid accounts on devices like VPNs, firewalls, and virtualization hosts.

T1133External Remote ServicesEvidence1

Based on the password or existence of a password sent in the “magic packet” the backdoor provides a reverse shell, establishes a bind shell, or sends back a ping.

T1205Traffic SignalingEvidence5

BPFDoor and Rekoobe samples wait for a magic packet before opening interactive access.

T1205.001Port KnockingEvidence1

If a packet is observed that matches the BPF filters and contains the required data it is passed to the backdoor for processing... [it] looks for a so-called magic packet.

T1205.002Socket FiltersEvidence6

[BPFDoor](https://attack.mitre.org/software/S1161) uses BPF bytecode to attach a filter to a network socket to view ICMP, UDP, or TCP packets coming through ports 22 (ssh), 80 (http), and 443 (https). When [BPFDoor](https://attack.mitre.org/software/S1161) finds a packet containing its “magic” bytes, it parses out two fields and forks itself. The parent process continues to monitor filtered traffic while the child process executes the instructions from the parsed fields.(Citation: Sandfly BPFDoor 2022)(Citation: Deep Instinct BPFDoor 2023)

T1505Server Software ComponentEvidence2

It allows a threat actor to backdoor a system for remote code execution, without opening any new network ports or firewall rules.

T1542Pre-OS BootEvidence1

When an adversary implants a persistent backdoor at the kernel level within these environments, they are not simply compromising a server, they are positioning themselves adjacent to subscriber data, signaling flows, and the mechanisms that authenticate and route national and international communications.

T1547.006Kernel Modules and ExtensionsEvidence1

The campaign is characterized by the use of kernel-level implants, passive backdoors, credential-harvesting utilities, and cross-platform command frameworks, giving the threat actor the ability to persistently inhabit networks of interest.

Privilege Escalation

5 techniques
T1037Boot or Logon Initialization ScriptsEvidence1

Persistence would need to be initiated by the attacker in some other way such as rc or init scripts... The initial report referenced above indicates that persistence scripts have been found.

T1053.003CronEvidence1

Persistence would need to be initiated by the attacker in some other way such as rc or init scripts or scheduled tasks such as with crontab.

T1078Valid AccountsEvidence2

Attacks usually begin at the network edge by exploiting exposed services or valid accounts on devices like VPNs, firewalls, and virtualization hosts.

T1547.006Kernel Modules and ExtensionsEvidence1

The campaign is characterized by the use of kernel-level implants, passive backdoors, credential-harvesting utilities, and cross-platform command frameworks, giving the threat actor the ability to persistently inhabit networks of interest.

T1548.001Setuid and SetgidEvidence1

The following MITRE ATT&CK... sub-techniques have been observed with the BPFDoor malware... Abuse Elevation Control Mechanism: Setuid and Setgid.

Stealth

23 techniques
T1014RootkitEvidence5

Description Generated datasets for Linux Evidence of BPFdoor implant - creation of known lockfiles in attack range.

T1027Obfuscated Files or InformationEvidence12

[BPFDoor](https://attack.mitre.org/software/S1161) can require a password to activate the backdoor and uses RC4 encryption or static library encryption `libtomcrypt`.(Citation: Sandfly BPFDoor 2022)

T1036MasqueradingEvidence17

Renames its process to kdmtmpflush... [then] removes the old one setting (spoofing) a new process name.

T1036.004Masquerade Task or ServiceEvidence4

The common thread is regionalized disguise: each sample is aware of the vendor’s software running on the targeted systems and implements process spoofing accordingly.

T1036.005Match Legitimate Resource Name or LocationEvidence1

The SpamSniper /var/run/spamsniper.pid mutex, together with the sample provenance, ties this build to the South Korean cluster.

T1036.009Break Process TreesEvidence4

After initial execution, [BPFDoor](https://attack.mitre.org/software/S1161) forks itself and runs the fork with the `--init` flag, which allows it to execute secondary clean up operations. The parent process terminates leaving the forked process to be inherited by the legitimate process init.(Citation: Sandfly BPFDoor 2022)

T1036.011Overwrite Process ArgumentsEvidence4

[BPFDoor](https://attack.mitre.org/software/S1161) overwrites the `argv[0]` value used by the Linux `/proc` filesystem to determine the command line and command name to display for each process. [BPFDoor](https://attack.mitre.org/software/S1161) selects a name from 10 hardcoded names that resemble Linux system daemons, such as; `/sbin/udevd -d`, `dbus-daemon --system`, `avahi-daemon: chroot helper`, `/sbin/auditd -n`, and `/usr/lib/systemd/systemd-journald`.(Citation: Sandfly BPFDoor 2022)

T1070Indicator RemovalEvidence9

[BPFDoor](https://attack.mitre.org/software/S1161) clears the file location `/proc/<PID>/environ` removing all environment variables for the process.(Citation: Sandfly BPFDoor 2022)

T1070.003Clear Command HistoryEvidence4

VIMINIT="set viminfo=", HISTFILE=/dev/null, HISTSIZE=0, and HISTFILESIZE=0.

T1070.004File DeletionEvidence13

After initial setup, [BPFDoor](https://attack.mitre.org/software/S1161)'s original execution process deletes the dropped binary and exits.(Citation: Sandfly BPFDoor 2022)

T1070.006TimestompEvidence12

[BPFDoor](https://attack.mitre.org/software/S1161) uses the `utimes()` function to change the executable's timestamp.(Citation: Sandfly BPFDoor 2022)

T1078Valid AccountsEvidence2

Attacks usually begin at the network edge by exploiting exposed services or valid accounts on devices like VPNs, firewalls, and virtualization hosts.

T1140Deobfuscate/Decode Files or InformationEvidence1

That key seeds RC4's key-scheduling algorithm, and the resulting S-box is used directly as a keystream.

T1205Traffic SignalingEvidence5

BPFDoor and Rekoobe samples wait for a magic packet before opening interactive access.

T1205.001Port KnockingEvidence1

If a packet is observed that matches the BPF filters and contains the required data it is passed to the backdoor for processing... [it] looks for a so-called magic packet.

T1205.002Socket FiltersEvidence6

[BPFDoor](https://attack.mitre.org/software/S1161) uses BPF bytecode to attach a filter to a network socket to view ICMP, UDP, or TCP packets coming through ports 22 (ssh), 80 (http), and 443 (https). When [BPFDoor](https://attack.mitre.org/software/S1161) finds a packet containing its “magic” bytes, it parses out two fields and forks itself. The parent process continues to monitor filtered traffic while the child process executes the instructions from the parsed fields.(Citation: Sandfly BPFDoor 2022)(Citation: Deep Instinct BPFDoor 2023)

T1218System Binary Proxy ExecutionEvidence1

another execve syscall was invoked, passing the arguments /bin/rm -f /dev/shm/kdmtmpflush to /bin/sh ... execve("/bin/cp", ["/bin/cp", "./BPFDoor", "/dev/shm/kdmtmpflush"] ... ) ... execve("/bin/chmod", ["/bin/chmod", "755", "/dev/shm/kdmtmpflush"]

T1480Execution GuardrailsEvidence5

[BPFDoor](https://attack.mitre.org/software/S1161) creates a zero byte PID file at `/var/run/haldrund.pid`. [BPFDoor](https://attack.mitre.org/software/S1161) uses this file to determine if it is already running on a system to ensure only one instance is executing at a time.(Citation: Sandfly BPFDoor 2022)

T1480.002Mutual ExclusionEvidence4

When executed, [BPFDoor](https://attack.mitre.org/software/S1161) attempts to create and lock a runtime file, `/var/run/initd.lock`, and exits if it fails using the specified file, resulting in a makeshift mutex.(Citation: Deep Instinct BPFDoor 2023)

T1542Pre-OS BootEvidence1

When an adversary implants a persistent backdoor at the kernel level within these environments, they are not simply compromising a server, they are positioning themselves adjacent to subscriber data, signaling flows, and the mechanisms that authenticate and route national and international communications.

T1564Hide ArtifactsEvidence6

BPFDoor... takes great care to be as efficient and stealthy as possible... [and] creates a PID file in /var/run, another temporary file storage facility.

T1564.001Hidden Files and DirectoriesEvidence3

The attacker took special attention to make the lock’s filename appears legitimate, and used several of these filenames across the samples.

T1564.011Ignore Process InterruptsEvidence4

[BPFDoor](https://attack.mitre.org/software/S1161) sets its process to ignore the following signals; `SIGHUP`, `SIGINT`, `SIGQUIT`, `SIGPIPE`, `SIGCHLD`, `SIGTTIN`, and `SIGTTOU`.(Citation: Deep Instinct BPFDoor 2023)

Defense Impairment

3 techniques
T1685Disable or Modify ToolsEvidence2

BPFDoor is equipped with stealthy defense evasion techniques.

T1686Disable or Modify System FirewallEvidence8

[BPFDoor](https://attack.mitre.org/software/S1161) starts a shell on a high TCP port starting at 42391 up to 43391, then changes the local `iptables` rules to redirect all packets from the attacker to the shell port.(Citation: Sandfly BPFDoor 2022)

T1690Prevent Command History LoggingEvidence4

[BPFDoor](https://attack.mitre.org/software/S1161) sets the `MYSQL_HISTFILE` and `HISTFILE` to `/dev/null` preventing the shell and MySQL from logging history in `/proc/<PID>/environ`.(Citation: Sandfly BPFDoor 2022)

Credential Access

2 techniques
T1040Network SniffingEvidence8

Next, the malware allocates a memory buffer and creates a packet sniffing socket that it'll use for monitoring incoming traffic for a "magic" byte sequence.

T1649Steal or Forge Authentication CertificatesEvidence1

We found custom sniffers, custom tooling to intercept usernames and passwords — very highly sophisticated operations.

Discovery

3 techniques
T1040Network SniffingEvidence8

Next, the malware allocates a memory buffer and creates a packet sniffing socket that it'll use for monitoring incoming traffic for a "magic" byte sequence.

T1482Domain Trust DiscoveryEvidence1

From the compromised OSS application, the operators abused trust relationships between network segments to pivot from the transport network into the mobile Core network.

T1613Container and Resource DiscoveryEvidence1

Here, the attackers gained privileged access to a Kubernetes container where BPFdoor was deployed.

Lateral Movement

2 techniques
T1021Remote ServicesEvidence5

“Reverse shell (TCP/UDP/ICMP) leveraged as a pivot point to access and laterally move to additional systems within the network.”

T1210Exploitation of Remote ServicesEvidence2

The threat actor then moved laterally to an unpatched VMware ESXi server and exploited CVE-2021–21972 and CVE-2021–21974 to achieve remote code execution on multiple ESXi hosts

Command and Control

12 techniques
T1001Data ObfuscationEvidence3

For example, if a webapp exists on port 443, it can listen and react on the existing port 443, and the implant can be reached over the webapp port (even with the webapp running).

T1071Application Layer ProtocolEvidence7

After establishing a connection with the C2, the malware sets up a reverse shell and waits for a command from the server.

T1090ProxyEvidence4

When the magic packet is received by the host, the implant will spawn a new instance and change the local iptables rules to do a redirect from the requesting host to the shell port... traffic will look like TLS/SSL traffic but in fact the attacker is interacting with a remote root shell.

T1095Non-Application Layer ProtocolEvidence16

“C2 communication established over raw TCP, UDP, or ICMP packets, using ‘magic bytes’ to maintain stealth and evade traditional application-layer inspection.”

T1105Ingress Tool TransferEvidence5

22 Upload a file to the host in chunks, appending on resume.

T1205Traffic SignalingEvidence5

BPFDoor and Rekoobe samples wait for a magic packet before opening interactive access.

T1205.001Port KnockingEvidence1

If a packet is observed that matches the BPF filters and contains the required data it is passed to the backdoor for processing... [it] looks for a so-called magic packet.

T1205.002Socket FiltersEvidence6

[BPFDoor](https://attack.mitre.org/software/S1161) uses BPF bytecode to attach a filter to a network socket to view ICMP, UDP, or TCP packets coming through ports 22 (ssh), 80 (http), and 443 (https). When [BPFDoor](https://attack.mitre.org/software/S1161) finds a packet containing its “magic” bytes, it parses out two fields and forks itself. The parent process continues to monitor filtered traffic while the child process executes the instructions from the parsed fields.(Citation: Sandfly BPFDoor 2022)(Citation: Deep Instinct BPFDoor 2023)

T1219Remote Access ToolsEvidence2

this backdoor provided the attackers with simple yet powerful capabilities, such as a remote access to the infected systems.

T1571Non-Standard PortEvidence1

It opens a new listening socket on an inconspicuous port (42391 - 43391).

T1572Protocol TunnelingEvidence11

We can deduce from this that the backdoor can be triggered by three different means: 1) An UDP packet starting with the bytes 0x7255 2) An ICMP packet also starting with the bytes 0x7255 3) A TCP packet starting with the bytes 0x5293.

T1573Encrypted ChannelEvidence7

The implant uses RC4 as the encryption layer... The real implant would require the correct password and RC4 encryption layer to see these results.

Exfiltration

1 technique
T1041Exfiltration Over C2 ChannelEvidence1

21 Download a file from the host, with resume support.

Indicators of compromise

Observables

160 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

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

View more in app →
+88 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 matching160Match every observed IP, domain, and hash against your live telemetry.
Associated threat actors3Groups linked to this family, with evidence pinned to each claim.
Associated vulnerabilities4CVEs 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 mapping52Every documented technique, ranked by evidence weight.
Researcher chatterReddit, Mastodon, and CTI community discussion around this family.