SAWFLY
- Type
- Webshell
- Capabilities
- Post exploitationPersistenceDefense evasion
- Platforms
- LinuxNetwork device
SAWFLY is a lightweight PHP webshell used by ARMORY CASTLE, a suspected China-linked cyberespionage actor formerly tracked as UNC5221 and also known as Warp Panda. It provides an interactive foothold on compromised BeyondTrust Remote Support appliances. Observed deployments followed exploitation of CVE-2026-102764, an improper message-origin validation vulnerability permitting unauthenticated remote file operations, during zero-day attacks in late August 2026. Attackers placed the webshell in the appliance’s Laravel web root.
SAWFLY receives instructions through HTTP POST requests, using custom Base32 encoding and RC4 encryption for bidirectional command-and-control communications. It decodes and decrypts submitted instructions, executes PHP code, and encrypts and encodes the results before returning them. Requests lacking its designated command parameter receive an HTTP 404 response, helping conceal its presence.
The webshell initially executes with the privileges of the web-service account. ARMORY CASTLE used this foothold to conduct subsequent operations, including establishing a separate SUID-enabled root backdoor. Associated intrusions also involved startup-based persistence, attempted appliance credential-vault extraction, log deletion, abuse of legitimate remote-support sessions to access internal endpoints and collect documents, and deployment of the BARECLAW tunneler. These additional activities are distinct from SAWFLY’s core webshell functionality.
Associated vulnerabilities
1 CVE Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
Associated threat actors
5 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
The attackers initially deployed SAWFLY (mangoapi.php), a PHP webshell that processes encrypted commands through HTTP POST requests using Base32 encoding and RC4 encryption.
Mandiant also attributed the hacking crew to the zero-day exploitation of a critical improper origin validation in BeyondTrust Remote Support (CVE-2026-102764, CVSS score: 9.3) to deliver malware families like SAWFLY and BARECLAW.
Mandiant also attributed the hacking crew to the zero-day exploitation of a critical improper origin validation in BeyondTrust Remote Support (CVE-2026-102764, CVSS score: 9.3) to deliver malware families like SAWFLY and BARECLAW.
Mandiant also attributed the hacking crew to the zero-day exploitation of a critical improper origin validation in BeyondTrust Remote Support (CVE-2026-102764, CVSS score: 9.3) to deliver malware families like SAWFLY and BARECLAW.
The SAWFLY PHP-based web shell and BARECLAW SOCKS5 proxy tunneler are novel strains of malware observed during post-exploitation activity.
Techniques & procedures
1 distinct technique documented for this family, organized by ATT&CK tactic.
Persistence
1 technique
Persistence
Dépôt du webshell SAWFLY ( mangoapi.php ) dans le répertoire web de l’appliance
Observables
2 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
25 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.