
A brand new, stealthier variant of the Linux malware ‘BPFDoor’ has been found, that includes extra sturdy encryption and reverse shell communications.
BPFDoor is a stealthy backdoor malware that has been energetic since not less than 2017 however was solely found by safety researchers round 12 months in the past.
The malware will get its identify from the usage of the ‘Berkley Packet Filter’ (BPF) for receiving directions whereas bypassing incoming visitors firewall restrictions.
BPFDoor is designed to permit menace actors to take care of prolonged persistence on breached Linux programs and stay undetected for prolonged intervals.
New BPFDoor model
Till 2022, the malware used RC4 encryption, bind shell and iptables for communication, whereas instructions and filenames had been hardcoded.
The newer variant analyzed by Deep Intuition options static library encryption, reverse shell communication, and all instructions are despatched by the C2 server.

By incorporating the encryption inside a static library, the malware builders obtain higher stealth and obfuscation, because the reliance on exterior libraries like one that includes the RC4 cipher algorithm is eliminated.
The principle benefit of the reverse shell towards the bind shell is that the previous establishes a connection from the contaminated host to the menace actor’s command and management servers, permitting communication to the attackers’ servers even when a firewall protects the community.
Lastly, eradicating hardcoded instructions makes it much less doubtless for anti-virus software program to detect the malware utilizing static evaluation like signature-based detection. It theoretically additionally provides it extra flexibility, supporting a extra numerous command set.
Deep Intuition studies that the most recent model of BPFDoor just isn’t flagged as malicious by any accessible AV engines on VirusTotal, regardless of its first submission on the platform courting February 2023.
Operation logic
Upon first execution, BPFDoor creates and locks a runtime file at “/var/run/initd.lock,” after which forks itself to run as a toddler course of, and at last units itself to disregard numerous OS indicators that might interrupt it.

Subsequent, the malware allocates a reminiscence buffer and creates a packet sniffing socket that it will use for monitoring incoming visitors for a “magic” byte sequence (“x44x30xCDx9Fx5Ex14x27x66”).

At this stage, BPFDoor attaches a Berkley Packet Filter to the socket to learn solely UDP, TCP, and SCTP visitors via ports 22 (ssh), 80 (HTTP), and 443 (HTTPS).
Any firewall restrictions current on the breached machine will not impression this sniffing exercise as a result of BPFDoor operates at such a low stage that they are not relevant.

“When BPFdoor finds a packet containing its “magic” bytes within the filtered visitors, it’s going to deal with it as a message from its operator and can parse out two fields and can once more fork itself,” explains Deep Intuition.
“The dad or mum course of will proceed and monitor the filtered visitors coming via the socket whereas the kid will deal with the beforehand parsed fields as a Command & Management IP-Port mixture and can try to contact it.”
After establishing a reference to the C2, the malware units up a reverse shell and waits for a command from the server.
.png)
(Deep Intuition)
BPFDoor stays undetected by safety software program, so system admins could solely depend on vigorous community visitors and logs monitoring, utilizing state-of-the-art endpoint safety merchandise, and monitor the file integrity on “/var/run/initd.lock.”
Additionally, a Might 2022 report by CrowdStrike highlighted that BPFDoor used a 2019 vulnerability to attain persistence on focused programs, so making use of the accessible safety updates is all the time a vital technique towards all sorts of malware.
