BPFDoor Hides in `/dev/shm` and Re-Executes via `execve` to Establish Persistence
Malware Intelligence · 2 sources · Updated 4mo ago · First seen Oct 30, 2008

Analysis of the Linux backdoor BPFDoor shows the malware copying itself to /dev/shm/kdmtmpflush, changing the file’s permissions, and then re-launching the new instance through execve with the --init flag to complete setup. During execution it checks for /var/run/haldrund.pid to avoid multiple starts, deletes any prior copy of the payload, and timestomps the replacement file to 2008-10-30 19:17:16 UTC to reduce suspicion. Runtime tracing also showed the malware adopting deceptive process names including dbus-daemon --system and /usr/libexec/postfix/master to blend into normal Linux activity.
The traced sample then created a raw packet socket and attached a BPF filter with SO_ATTACH_FILTER, enabling BPFDoor to watch for specially crafted network traffic used to activate the implant. The backdoor was reported to respond to magic packets containing hardcoded passwords such as justforfun or socket, after which it could send a ping, spawn a reverse shell, or open a bind shell. The behavior highlights a stealth-focused Linux implant that combines fileless-style staging in shared memory, process masquerading, and packet-triggered remote access.


