SappyCache

Malware

⚠️ Overview

SappyCache is a malicious Web Shell tool first documented by Palo Alto Networks Unit 42 in February 2023, attributed to the Chinese state-sponsored threat group tracked as Barium (also known as APT41 or Winnti). It is categorized as a passive backdoor that resides on compromised web servers, allowing attackers to execute arbitrary commands via HTTP requests.

🔧 Technical Capabilities

SappyCache is written in Go and compiled into a single binary with minimal dependencies. It operates as an HTTP server listening on a configurable port (commonly 8080 or 8443), accepting POST requests containing base64-encoded command payloads in the Cache-Control HTTP header to evade detection by standard web application firewalls. The malware parses the header value using a custom format (e.g., cache-command:base64-payload), executes the command via os/exec on the host, and returns the output in the HTTP response body. For persistence, it installs itself as a systemd service on Linux targets—typically /etc/systemd/system/sappycache.service—and uses cron jobs for periodic re-execution. It employs basic evasion by checking for sandbox environments (looking for virtualization artifacts in /proc/cpuinfo) and by encoding C2 communications in HTTP headers rather than standard POST bodies.

📜 History & Notable Incidents

Palo Alto Networks Unit 42 first reported SappyCache in February 2023 after observing it deployed against a Southeast Asian telecommunications provider. The malware was used as a second-stage implant following initial compromise via exploitation of a known vulnerability (CVE-2021-40444 – MSHTML remote code execution) delivered through phishing emails. No specific law enforcement actions have been publicly documented as of early 2025.

🔍 Detection Indicators

Known indicators include the User-Agent string Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36 used by the malware’s HTTP client. Network IOCs include POST requests to non-standard ports with unusually long Cache-Control headers containing base64 patterns. On-disk artifacts include the binary name sappycache (no known fixed file hash) and the persistence file /etc/systemd/system/sappycache.service.

☠️ Risk & Impact

SappyCache enables attackers to maintain persistent, stealthy access to compromised web servers, facilitating data exfiltration, lateral movement, and deployment of additional malware such as Cobalt Strike beacons. The telecommunications and technology sectors are most commonly targeted, with financial losses primarily stemming from intellectual property theft and service disruption. No publicly reported data breach size estimates exist.

🛡️ Mitigation

Organizations should monitor for anomalous Cache-Control HTTP headers in web server logs, restrict outbound traffic from web servers to only necessary ports, and apply the latest security patches for vulnerabilities like CVE-2021-40444. Use of endpoint detection and response (EDR) systems with behavioral analytics can identify the malware’s systemd service creation and cron job modifications.

Free Threat Visibility

Get Visibility Into Automated Threats Reaching Your Server

Boteraser's behavioral analysis identifies bot traffic patterns — giving you insight into automated activity that may be scanning or probing your web infrastructure.

🔍 Scan My Site Free

Powered by JA4 fingerprinting, honeypot traps & behavioral analysis

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the malware listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.