National Cyber Warfare Foundation (NCWF)login

PEERSTITCH malware: How Attackers Compromised 500 Firewalls Through FortiManager


0 user ratings
2026-10-16 09:42:06
milo
Blue Team (CND)
PEERSTITCH malware exploited FortiManager to expose 500+ firewalls, evade detection inside FortiOS memory, and maintain stealthy access. PEERSTITCH, a stealthy implant deployed during a prolonged intrusion, helped attackers maintain access to a telecom managed service provider after compromising its FortiManager appliance. Palo Alto Networks Unit 42 documented the operation, which began in September 2024 and […


PEERSTITCH malware exploited FortiManager to expose 500+ firewalls, evade detection inside FortiOS memory, and maintain stealthy access.





PEERSTITCH, a stealthy implant deployed during a prolonged intrusion, helped attackers maintain access to a telecom managed service provider after compromising its FortiManager appliance. Palo Alto Networks Unit 42 documented the operation, which began in September 2024 and exposed credentials and configurations for more than 500 downstream firewalls.





“Unit 42 investigated a multi-stage network intrusion against a telecommunications organization that occurred in September 2024, which we are tracking as cluster CL-STA-0954 (aka UNC5820). The attackers behind CL-STA-0954 achieved an initial compromise by exploiting CVE-2024-47575 against a centralized FortiManager appliance.” reads the report published by Palo Alto Networks. “From that single appliance, our observations are that the attackers exfiltrated an archive containing running configurations, cryptographic material and database files containing information about more than 500 managed FortiGate firewalls. Those firewalls protected the target’s own infrastructure and the networks of its clients.”





The initial access relied on CVE-2024-47575, known as FortiJump, which allowed an unauthenticated attacker to register a rogue virtual device with the central management platform over TCP port 541. Within minutes, the attackers extracted a configuration archive containing serial numbers, public IP addresses, routing tables, VPN credentials, and cryptographic trust material for every managed firewall. One compromised management system had effectively handed them the keys to hundreds of networks.





The targeted 500 devices didn’t all belong to the same organization. They protected the managed service provider’s infrastructure and its clients’ networks. The attackers got running configurations and private keys for firewalls belonging to organizations that had no idea any of this was happening. Unit 42 was clear about the scope: the investigation covered only the provider’s own environment, not the downstream clients.





Armed with decrypted credentials from the stolen configuration files, which stored passwords as reversible ciphertext, the attackers then established unauthorized SSL/VPN sessions into internal network management segments from external staging addresses. That’s the moment reconnaissance turned into active access.





In the second stage, attackers exploited CVE-2025-61624, a path traversal flaw in the FortiOS auto-script engine, to deploy a new implant called PEERSTITCH. The implant is a 64-bit ARM64 binary written in C, but what it does is unusual. Unit 42’s researchers put it plainly:





“PEERSTITCH leaves no persistent binary on disk, opens no listening ports and initiates no outbound network connections. Instead, it communicates through traffic generated by legitimate processes on the infected host, which makes the malware resistant to conventional endpoint and network detection.” the report continues.





“The attackers also impersonated the FortiManager platform to pull from managed firewalls of other hosts in the targeted network.”





Instead, it injects itself into two legitimate FortiOS daemons, the logging process and the VPN service, and creates a covert communication bridge between them using memory that’s already allocated to those running processes. When traffic passing through the logging daemon matches two specific markers, a port number embedded in data and a link-local IP address, it extracts a session token and writes it directly into the VPN daemon’s memory using Linux’s /proc filesystem. When the VPN daemon processes a subsequent session carrying that same tag, it takes an alternate execution path, bypassing FortiOS security checks entirely.









PEERSTITCH is hard to detect because it leaves no persistent file on disk, opens no listening ports, and initiates no outbound network connections. The only way to detect it is by inspecting live process memory for anomalous read-write-execute (RWX) regions in the two targeted daemons or identifying NOP patches at specific offsets in their code. Fortinet’s Integrity Checker Tool cannot detect the implant because it scans files on disk, which remain untouched.





The attackers also established a secondary command channel by abusing Apache’s built-in certificate management module on the firewalls. They embedded shell commands in the domain name field of certificate validation requests and configured Apache to retry them continuously, creating a persistent outbound reverse shell through a legitimate system process.





Before running their malicious auto-scripts, the attackers killed the logging and syslog daemons to suppress any trace of what was about to happen. Crash logs were wiped. Rogue administrator accounts and script objects were automatically deleted shortly after execution. The malicious ACME configuration file was overwritten with innocent-looking text. The PEERSTITCH injector unlinked its own binary from disk after completing execution.





“The cryptographic trust material governing the platform’s relationship with every managed device leaves with the attacker and remains valid until it is rotated. Defenders must treat edge management interfaces with the highest level of zero trust isolation.” Palo Alto Networks states. “They must also treat the credentials and certificates those interfaces hold as compromised the moment the platform is.”





Patching FortiManager doesn’t reverse the data theft. The stolen cryptographic keys remain valid until the trust material on every managed device is individually rotated. A firmware update alone won’t invalidate them.





The broader lesson goes beyond Fortinet: management platforms are high-value targets because compromising one can expose an entire network. As Unit 42 noted, “the management platform is the highest-value target on the network.” When that platform belongs to a managed service provider, a single breach can affect hundreds of downstream customers, turning a local compromise into a supply-chain security incident.





“For organizations that manage infrastructure on behalf of others, the management platform is the highest-value target on the network. Compromising the management platform is not contained by the boundary of the organization that owns it.” the report concludes. “That compromise also does not end when the platform is patched.”





Follow me on Twitter: @securityaffairs and Facebook and Mastodon





Pierluigi Paganini





(SecurityAffairs – hacking, PEERSTITCH malware)



Source: SecurityAffairs
Source Link: https://securityaffairs.com/201077/malware/peerstitch-malware-how-attackers-compromised-500-firewalls-through-fortimanager.html


Comments
new comment
Nobody has commented yet. Will you be the first?
 
Forum
Blue Team (CND)



Copyright 2012 through 2026 - National Cyber Warfare Foundation - All rights reserved worldwide.