Hackers deploy Linux rootkit on F5 BIG-IP APM devices, hiding web shell in memory
Sophos analyzed a Linux rootkit, tracked as PoisonedRefresh, on hacked F5 BIG-IP APM devices hiding an in-memory web shell linked to exploited CVE-2025-53521.
Sophos and ESET analyzed an implant (named PoisonedRefresh by ESET) deployed on compromised F5 BIG-IP APM appliances, which serves enterprise, financial, government, and public sector deployments. The second-stage payload intercepts __libc_start_main, hooks Apache's APR module loader (apr_dso_load), RC4-encodes key strings, and rewrites PHP file reads in memory to embed a web shell inside legitimate scripts like apm_css.php3, full_wt.php3, and webtop_popup_css.php3, leaving on-disk files unchanged. A related installer component infects /usr/sbin/httpd, persists across BIG-IP upgrade images, modifies SELinux configuration, and deploys the payload. The malware also creates a Unix domain socket at /run/bigtlog.pipe that hands authenticated local connections to /bin/bash; F5 links the activity to CVE-2025-53521, an unauthenticated RCE in BIG-IP APM already exploited in the wild.
- Web shell is injected in memory, so filesystem-focused responders can miss evidence
- Installer persists across BIG-IP upgrade images and alters SELinux settings
- Unix domain socket at /run/bigtlog.pipe provides interactive /bin/bash shell
- Sophos lists IOC checks: .php3 requests, HTTP 201 responses on CSS endpoints, /proc/self/maps reads
Vulnerabilities mentionedAll →
| CVE | Vulnerability | CVSS | EPSS | Flags | Affected | Exposure | Published |
|---|---|---|---|---|---|---|---|
| CVE-2025-53521 | Stack-Based Buffer Overflow in F5 BIG-IP APM Enables Unauthenticated RCE CVE-2025-53521 is a stack-based buffer overflow (CWE-121) in F5 BIG-IP's Access Policy Manager (APM) that allows remote code execution. The flaw is triggered when a virtual server is configured with an APM access policy and receives specific malicious network traffic; no authentication or user interaction is required per the CVSS 4.0 vector. An attacker who exploits it gains remote code execution on the BIG-IP device, and in observed intrusions attackers have deployed a fileless Linux rootkit (dubbed 'PoisonedRefresh') that injects a PHP web shell into server memory to evade disk-based scanning. Any F5 BIG-IP deployment with an APM access policy configured on a virtual server is potentially affected; versions that have reached End of Technical Support are not evaluated by the vendor. The vulnerability is being actively exploited in the wild — it was added to CISA's Known Exploited Vulnerabilities catalog on 2026-03-27, with active exploitation and in-memory malware campaigns confirmed in press reports, though ransomware use is unknown. Do: Patch immediately by upgrading affected BIG-IP systems to fixed releases per F5's security advisory (note that versions in End of Technical Support will not be fixed and should be upgraded or retired), prioritizing internet-facing virtual servers with APM access policies. Because observed attacks deploy a memory-resident PHP web shell via the PoisonedRefresh Linux rootkit, disk-only scans may miss compromise — inspect running processes and memory, and hunt for suspicious PHP or rootkit activity on BIG-IP APM devices. Federal agencies must follow the required action in CISA KEV/BOD 22-01: apply vendor mitigations or discontinue use of the product if mitigations are unavailable. | 9.3 | 2% | KEV |
| large≈14,000+ internet-exposed F5 BIG-IP devices (per public scan figures cited in press coverage) |
Full article701 words · extracted from helpnetsecurity.com · click to collapse
A rootkit found on hacked F5 BIG-IP APM devices skips the usual step of writing a web shell to disk, hiding it in memory instead, according to Sophos.

F5 BIG-IP APM provides access policy enforcement to secure access to apps, APIs, and data. It’s primarily used by enterprises, financial institutions, government agencies, and public sector organizations.
“The implant delivers a familiar outcome – on-demand server-side code execution commonly associated with web shells – but implements it using deeper Linux- and Apache-specific tradecraft,” Sophos said.
“The malware targets deployments featuring Apache, libphp, APR module loading, BIG-IP APM webtop components, and BIG-IP upgrade workflows, suggesting it was developed for specific environments,” they added.
F5 has linked related activity to CVE-2025-53521, an unauthenticated remote code execution flaw in BIG-IP APM that has already been exploited in the wild.
While digging through the sample, the Sophos team learned that ESET had already looked at the same malware and given it a name, PoisonedRefresh.
Web shell lives in memory
The malware analyzed is a second-stage payload, according to Sophos. During a parallel analysis of a related sample called “umount,” researchers identified a separate installer component responsible for infecting the Apache binary at /usr/sbin/httpd, persisting across BIG-IP upgrade images, modifying SELinux configurations, and deploying the second-stage payload.
“The second-stage sample hides key operational strings with RC4, gains execution before the host application main() function is invoked by intercepting __libc_start_main, targets Apache’s PHP module by hooking the Apache Portable Runtime (APR) module loader (apr_dso_load), and injects a PHP web shell into memory.”
Once Apache loads PHP, the second-stage implant intercepts PHP file operations and rewrites them in memory to hide a web shell inside legitimate scripts, including apm_css.php3, full_wt.php3, and webtop_popup_css.php3.
Sophos says these files were likely chosen because they’re common in BIG-IP APM webtop environments and unlikely to draw attention. The files on disk stay unchanged, cutting down what file-based scanning can detect.
“When PHP opens one of these files, the implant records the file descriptor. When that file is subsequently memory mapped, the implant creates a modified in-memory view containing both the embedded web shell and the original script content. The on-disk file does not need to contain the final web shell content at all; execution follows from the modified in-memory representation created by the implant at runtime,” researchers explained.
A second route to a shell
Alongside the web shell, the malware sets up a Unix domain socket at /run/bigtlog.pipe. After a short token check, a connection to that socket gets handed straight to /bin/bash, giving an attacker an interactive shell. Because it’s a local socket rather than a network listener, it won’t show up as a listening TCP port or in network monitoring that only looks for open TCP ports.
Researchers found no code inside the sample that would let an attacker reach that socket from outside the server, so it’s not clear how the two access methods are meant to work together, or whether the web shell is used to reach the socket indirectly.
What defenders can look for
Sophos lists a handful of signals worth checking for on Apache servers, including requests to the three .php3 files named above, PHP endpoints that return an HTTP 201 status while claiming to serve CSS content, and Apache worker processes that read /proc/self/maps and then change memory permissions shortly after.
It also suggests blocking .php3 execution where it isn’t needed, though administrators of BIG-IP APM systems should follow F5’s guidance before making such changes.
Sophos also recommends restricting ptrace access to reduce other ways processes can be inspected or manipulated, while noting that this would not necessarily stop the implant’s in-process behavior.
“Based on our analysis of the related umount and infected httpd samples, we assess that this campaign involves a staged architecture.”
“Perhaps the most significant finding is that the web shell does not need to exist in its final form on disk. Instead, the implant alters how targeted PHP files are presented to the running process, meaning the content observed by Apache and PHP can differ from the content visible to traditional file-based inspection. As a result, responders who focus exclusively on the filesystem may overlook critical evidence,” Sophos concluded.
Text extracted automatically; images, tables and formatting may be missing. Original: https://www.helpnetsecurity.com/2026/09/09/f5-big-ip-apm-rootkit-hides-web-shell-in-memory/