AI Security AI安全 1d ago Updated 16h ago 更新于 16小时前 46

F5 BIG-IP APM Malware Injects a PHP Web Shell Into Memory, Evading Disk Scans F5 BIG-IP APM 恶意软件将 PHP Web Shell 注入内存,规避磁盘扫描

Sophos revealed that malware targeting F5 BIG-IP APM appliances injects a PHP web shell directly into Apache's memory at runtime, bypassing traditional disk-based file integrity checks The malware hooks the `apr_dso_load` function in Apache, intercepts PHP module loading, and rewrites file-mapping syscalls to prepend the web shell to three specific PHP scripts in memory only The infection chain begins with an installer (named "umount") that modifies the Apache binary at `/usr/sbin/`, disables SE F5 BIG-IP APM设备遭恶意软件攻击,攻击者将PHP Web Shell注入内存而非磁盘,成功规避传统文件完整性扫描检测 攻击利用CVE-2025-53521漏洞(CVSS 9.8),该漏洞最初被归类为DoS,后被重新分类为无需认证的远程代码执行漏洞 恶意软件通过修改Apache程序实现持久化,在内存中动态注入Web Shell,同时提供本地socket反向shell作为备用访问途径 检测需结合文件完整性、内存行为分析和日志审计,单一指标无法确认入侵

72
Hot 热度
65
Quality 质量
60
Impact 影响力

Analysis 深度分析

TL;DR

  • Sophos revealed that malware targeting F5 BIG-IP APM appliances injects a PHP web shell directly into Apache's memory at runtime, bypassing traditional disk-based file integrity checks
  • The malware hooks the apr_dso_load function in Apache, intercepts PHP module loading, and rewrites file-mapping syscalls to prepend the web shell to three specific PHP scripts in memory only
  • The infection chain begins with an installer (named "umount") that modifies the Apache binary at /usr/sbin/, disables SELinux, and infects /usr/bin/umount and rc.local inside BIG-IP install images for lateral spread
  • A secondary backdoor opens a local Unix socket at /run/bigtlog.pipe, binding it to /bin/bash for interactive shell access without opening any network port
  • The underlying vulnerability, CVE-2025-53521, was initially disclosed as a DoS flaw in October 2025 and later reclassified as an unauthenticated RCE (CVSS 9.8) actively exploited in the wild

Why It Matters

This attack demonstrates a sophisticated memory-only persistence technique that renders conventional file-integrity monitoring and disk-scanning defenses ineffective, forcing defenders to adopt behavioral and memory-based detection strategies. It also highlights the critical risk of supply-chain-style infection vectors, where infecting BIG-IP install images enables the malware to propagate to newly deployed or rebuilt appliances.

Technical Details

  • Memory-injection web shell: The malware hooks apr_dso_load, locates libphp in memory via /proc/self/maps, temporarily makes those pages writable, rewrites the open/size/map syscalls used by PHP, and restores original permissions—ensuring the web shell is prepended to the three target scripts (apm_css.php3, full_wt.php3, webtop_popup_css3) only in memory, leaving disk files untouched.
  • Web shell behavior: The shell reads raw HTTP request bodies, checks for a short marker string, decrypts and executes the remainder, and responds with HTTP 201 and a CSS content type to blend in with legitimate stylesheet requests.
  • Local backdoor: A Unix domain socket at /run/bigtlog.pipe accepts a fixed token and connects directly to /bin/bash, providing interactive root shell access without any network listener.
  • Installer and persistence: The "umount" installer runs as root, disables SELinux, infects the Apache binary at /usr/sbin/ by prepending malicious code, and also infects umount and rc.local inside BIG-IP install images to spread via installation media.
  • Affected versions: CVE-2025-53521 impacts BIG-IP APM versions 17.5.0–17.5.1, 17.1.0–17.1.2, 16.1.0–16.1.6, and 15.1.0–15.1.10; patches were released in October 2025 (e.g., 17.5.1.3, 17.1.3, 16.1.6.1, 15.1.10.8).
  • Detection indicators: Presence of /run/bigtlog.pipe or /run/bigstart.ltm, hash/size/timestamp mismatches on /usr/bin/umount or /usr/sbin/, failed sys-eicheck, SELinux disabled via auditd, localhost iControl REST API access, HTTP 201 responses with CSS content type, and anomalous Apache worker memory-permission changes.

Industry Insight

  • Organizations relying solely on file-integrity monitoring (e.g., checksums, hash comparisons) against compromised BIG-IP appliances will have blind spots; memory forensics and behavioral detection must be layered into defensive postures.
  • The infection of BIG-IP install images represents a supply-chain persistence mechanism that can re-infect patched systems during redeployment—defenders should validate install media integrity and consider air-gapped or verified update pipelines.
  • The unauthenticated RCE nature of CVE-2025-53521, combined with its high CVSS score and CISA Known Exploited Vulnerabilities listing, makes immediate patching non-negotiable for any organization running affected BIG-IP APM versions.

TL;DR

  • F5 BIG-IP APM设备遭恶意软件攻击,攻击者将PHP Web Shell注入内存而非磁盘,成功规避传统文件完整性扫描检测
  • 攻击利用CVE-2025-53521漏洞(CVSS 9.8),该漏洞最初被归类为DoS,后被重新分类为无需认证的远程代码执行漏洞
  • 恶意软件通过修改Apache程序实现持久化,在内存中动态注入Web Shell,同时提供本地socket反向shell作为备用访问途径
  • 检测需结合文件完整性、内存行为分析和日志审计,单一指标无法确认入侵

为什么值得看

本文揭示了高级持久化威胁如何通过内存注入技术绕过传统安全检测,对网络安全防御策略具有重要参考价值。对于使用F5 BIG-IP APM的企业,理解该攻击链有助于建立更有效的检测和响应机制。

技术解析

  • 攻击链:恶意软件通过修改Apache可执行文件(/usr/sbin/)实现持久化,在程序启动时注入恶意代码。当Apache加载PHP模块时,恶意代码通过hook apr_dso_load函数,读取/proc/self/maps定位libphp模块,修改内存权限后重写文件打开系统调用,将Web Shell注入到三个特定PHP脚本(apm_css.php3、full_wt.php3、webtop_popup_css.php3)的内存副本中。
  • Web Shell机制:Web Shell读取HTTP请求原始body,检查特定标记后解密并执行命令,返回HTTP 201状态码和CSS内容类型以伪装成正常样式表请求。同时提供本地socket反向shell(/run/bigtlog.pipe),连接至/bin/bash,无需开放网络端口。
  • 漏洞背景:CVE-2025-53521最初于2025年10月15日发布为DoS漏洞,2026年3月27日重新分类为RCE漏洞,CVSS 3.1评分9.8,4.0评分9.3。CISA同日将其加入已知被利用漏洞目录,要求联邦机构在3月30日前采取行动。
  • 检测指标:文件层面检查/run/bigtlog.pipe或/run/bigstart.ltm是否存在;二进制层面验证/usr/bin/umount或/usr/sbin/的哈希、大小或时间戳;工具层面关注sys-eicheck失败;日志层面检查restjavad-audit中的本地iControl REST API访问、auditd中SELinux关闭记录、audit中通过iControl REST执行的bash命令;流量层面识别HTTP 201配合CSS内容类型;主机行为层面监控Apache进程读取/proc/self/maps、修改内存权限、绑定/run下socket或启动/bin/bash。
  • 受影响版本:17.5.0-17.5.1(修复于17.5.1.3)、17.1.0-17.1.2(修复于17.1.3)、16.1.0-16.1.6(修复于16.1.6.1)、15.1.0-15.1.10(修复于15.1.10.8)。修复补丁已于2025年10月发布。

行业启示

  • 内存注入技术正成为规避传统安全检测的新趋势,防御策略需从单纯的磁盘文件扫描转向内存行为监控和运行时完整性验证,建立多层检测体系。
  • 漏洞分类的动态演变(DoS→RCE)凸显了持续监控安全公告和及时更新威胁评估的重要性,组织应建立灵活的漏洞响应机制,而非依赖初始分类。
  • 高级持续性威胁(APT)攻击链日益复杂,单一检测手段已不足以应对,需结合文件完整性、内存分析、日志审计和流量监控构建纵深防御,同时加强员工安全意识培训。

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

Security 安全 Research 科学研究