← All hunts critical TLP:CLEAR

Fortinet Management Plane Exploitation and PEERSTITCH Deployment

An attacker has exploited a central management appliance to exfiltrate configurations and then used stolen credentials to deploy a memory-resident ARM64 implant on managed firewalls.

Based on research by Unit 42 2026-10-15 12 steps · 5 queries T1041 T1071 T1133 T1190

Brief

Why this hunt

Unit 42 recently reported on PEERSTITCH, a stealthy ARM64 implant targeting FortiGate appliances. This activity follows the exploitation of CVE-2024-47575 in FortiManager, where attackers exfiltrate configurations and use stolen credentials for persistent access. Traditional alerts often miss this transition from management plane breach to perimeter implantation. This hunt provides a structured way to verify the full intrusion chain.

How the hunt flows

The first phase identifies vulnerable appliances using the hb_vulnerability_finding surface. The query searches for CVE-2024-47575 and related path traversal vulnerabilities to define the initial scope of potentially compromised management hosts. Next, the hunt corroborates rogue access and exfiltration on the identified appliances. It examines hb_network_connection for inbound traffic on port 541 from known attacker infrastructure and uses hb_file_activity to stack-count touches to sensitive configuration databases like global.db. The deployment of PEERSTITCH marks a sophisticated shift in how attackers maintain access to network infrastructure. By targeting the management plane first, the adversary gains a map of the environment. The exfiltrated configuration files contain not only device settings but also the credentials needed to access managed firewalls. The final phase pivots to the perimeter firewalls. It checks hb_auth_signin for unauthorized VPN logons from attacker-controlled IPs and scans hb_process_activity for the PEERSTITCH injector, lldprx, or command lines containing path traversal patterns used to drop the payload. This binary performs a memory-only injection into a legitimate process like lldpd to intercept traffic.

Blind spots

This hunt faces challenges with memory-resident evasion. Because PEERSTITCH patches daemons in memory, it is invisible to standard file queries once the initial lldprx injector finishes. Additionally, default logging levels on FortiOS might not capture the low-level path traversal events required to confirm payload delivery.

Steps

  1. Vulnerability identification

    Query · scoping

    Identify appliances currently reporting vulnerabilities used in the PEERSTITCH campaign.

    reads hb_vulnerability_findingsql
    SELECT device_uid, resource_uid, cve_uid, severity_id, status FROM hb_vulnerability_finding WHERE instr(',' || '{{vulnerability_ids}}' || ',', ',' || cve_uid || ',') > 0

    What a hit looks like. A list of unique device IDs exposed to management plane or path traversal exploits. Silence indicates no reported findings.

  2. Rogue FortiManager registration

    Query · triage

    Detect inbound connections to the management channel from known attacker infrastructure.

    reads hb_network_connectionsql
    SELECT device_hostname, src_endpoint_ip, dst_endpoint_port, direction, time FROM hb_network_connection WHERE dst_endpoint_port = 541 AND instr(',' || '{{attacker_ips_initial}}' || ',', ',' || src_endpoint_ip || ',') > 0 AND time >= datetime('now', '-{{lookback_days}} days')

    What a hit looks like. Inbound connections from report IPs to port 541. This signifies a probable rogue registration attempt.

  3. Rare configuration archive touches

    Query · baseline

    Stack-count touches to database or archive files used by FortiManager to identify rare exfiltration events.

    reads hb_file_activitysql
    SELECT file_name, activity_name, COUNT(DISTINCT device_hostname) AS hosts, MIN(time) AS first_seen FROM hb_file_activity WHERE (LOWER(file_name) IN ('.tm', 'global.db', 'revinfo.db')) AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY file_name, activity_name HAVING hosts < 3

    What a hit looks like. File touches on archive names restricted to very few hosts. Fleet-wide noise would imply standard backups.

  4. Management plane compromise triage

    Agent triage

    Assess whether the appliance vulnerability, rogue network access, and rare file touches indicate a management-plane breach.

  5. Unauthorized VPN sign-ins

    Query · enrichment

    Find sign-in events from the report's VPN IPs, filtered by the hosts identified in the scoping phase.

    reads hb_auth_signinsql
    SELECT device_hostname, src_endpoint_ip, actor_user_name, status, time FROM hb_auth_signin WHERE instr(',' || '{{attacker_ips_vpn}}' || ',', ',' || src_endpoint_ip || ',') > 0 AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')

    What a hit looks like. Authentication events from report-specified IPs to scoped firewalls. This confirms the attacker is using stolen credentials.

  6. PEERSTITCH deployment artifacts

    Query · detection candidate

    Identify the PEERSTITCH native injector or path-traversal activity on firewall command lines.

    reads hb_process_activitysql
    SELECT device_hostname, process_name, process_cmd_line, time FROM hb_process_activity WHERE (LOWER(process_name) LIKE '%lldprx' OR (LOWER(process_cmd_line) LIKE '%setup%' AND LOWER(process_cmd_line) LIKE '%../../../../%')) AND time >= datetime('now', '-{{lookback_days}} days')

    What a hit looks like. Processes running the lldprx binary or command lines executing the setup script via traversal. Any such row is a high-fidelity indicator of implantation.

  7. Full chain intrusion triage

    Agent triage

    Synthesize management plane evidence with follow-on persistence and deployment evidence to confirm the intrusion.

  8. Route on verdict

    Decision

    Route the hunt based on the forensic triage of the PEERSTITCH intrusion chain.

  9. Isolate firewalls and rotate credentials

    Response action

    Sever attacker persistence and prevent further use of stolen configurations.

  10. Verify implant presence

    Analyst task

    Verify the agent's synthesis and examine the extent of the traffic interception.

  11. Hunt closure

    Analyst task

    Finalize findings and coverage notes.

Coverage

Scenario coverage

StageCoveredHow, or why not
FortiManager Exploitation and Rogue Registration
T1190
Yes vulnerability-scoping, rogue-fmg-access
Database and Configuration Exfiltration
T1041
Yes rare-config-archive-touches
Credential-based VPN Persistence
T1133
Yes unauthorized-vpn-logons
FortiOS Path Traversal and PEERSTITCH Deployment
T1190
Yes peerstitch-deployment
PEERSTITCH Memory-Resident Injection
T1071
Yes peerstitch-deployment

Blind spots

  • Needs ptrace and memory allocation telemetry. The implant resides only in memory and uses existing processes for C2; if the initial injector process (lldprx) is not captured, the implant is invisible to standard process/file queries. It would answer whether PEERSTITCH has successfully patched daemons in memory.
  • Needs FortiOS auto-script execution logs. Management plane logs may record object creation but not the low-level path traversal that drops the malware payload if logging levels are default. It would answer whether the auto-script traversal succeeded in dropping files.

Parameters & data

Parameters

ParameterTypeDefaultWhat it is
attacker_ips_initiallist[ip]45.32.41.202, 198.199.122.22IPs observed performing rogue FortiManager registration.
attacker_ips_vpnlist[ip]23.240.77.233, 47.18.167.159IPs observed establishing unauthorized SSL/VPN sessions.
lookback_daysnumber14Days of history to examine.
scope_hostslist[host]—Target hosts identified by the scoping step.
vulnerability_idslist[string]CVE-2024-47575, CVE-2025-61624CVEs for FortiManager auth bypass and FortiOS path traversal.

Telemetry

SourceCategoryTelemetry
Endpoint telemetry (hb_ surfaces)endpointendpoint
Identity / sign-in telemetryidentityidentity
Network telemetrynetworknetwork

Source

Download hunt.md Definition (JSON) An open hunt.md file; it runs anywhere that reads the format.
---
analysis: A single rule might find the rogue IPs, but this hunt connects the initial
  management-plane breach to a multi-stage persistence and deployment chain targeting
  specific ARM64 firewall daemons, requiring cross-surface correlation between vulnerability,
  network, and process activity.
blind_spots:
- id: memory-hook-blind-spot
  question: whether PEERSTITCH has successfully patched daemons in memory
  requires: ptrace and memory allocation telemetry
  risk: The implant resides only in memory and uses existing processes for C2; if
    the initial injector process (lldprx) is not captured, the implant is invisible
    to standard process/file queries.
  stage: defense-evasion-memory-injection
- id: fortios-auto-script-logging
  question: whether the auto-script traversal succeeded in dropping files
  requires: FortiOS auto-script execution logs
  risk: Management plane logs may record object creation but not the low-level path
    traversal that drops the malware payload if logging levels are default.
  stage: privilege-escalation-path-traversal
coverage:
- stage: initial-access-fortimanager-exploit
  status: covered
  steps:
  - vulnerability-scoping
  - rogue-fmg-access
- stage: exfiltration-configuration-archive
  status: covered
  steps:
  - rare-config-archive-touches
- stage: persistence-unauthorized-vpn-access
  status: covered
  steps:
  - unauthorized-vpn-logons
- stage: privilege-escalation-path-traversal
  status: covered
  steps:
  - peerstitch-deployment
- stage: defense-evasion-memory-injection
  status: covered
  steps:
  - peerstitch-deployment
guardrails:
  claims: no_unsupported
  evidence: citation_required
  missing_data: not_benign
  telemetry: untrusted
hunt:
  applicability: campaign-specific
  handoff: promote-to-detection
  justification: The theft of central management configurations exposes the entire
    perimeter security architecture. Detecting the PEERSTITCH implant is required
    to prevent long-term credential interception across the managed estate.
  methodology: model-assisted
  trigger: intel-report
hypothesis: An attacker has exploited a central management appliance to exfiltrate
  configurations and then used stolen credentials to deploy a memory-resident ARM64
  implant on managed firewalls.
labels:
- hunt
- attack.t1190
- attack.t1041
- attack.t1133
- attack.t1071
- defense evasion
- execution
- exfiltration
- initial access
- persistence
name: Fortinet Management Plane Exploitation and PEERSTITCH Deployment
parameters:
  attacker_ips_initial:
    default:
    - 45.32.41.202
    - 198.199.122.22
    description: IPs observed performing rogue FortiManager registration.
    from:
      kind: article
      observed: '2024-10-14'
      ref: unit42-peerstitch
    type: list[ip]
  attacker_ips_vpn:
    default:
    - 23.240.77.233
    - 47.18.167.159
    description: IPs observed establishing unauthorized SSL/VPN sessions.
    from:
      kind: article
      observed: '2024-10-14'
      ref: unit42-peerstitch
    type: list[ip]
  lookback_days:
    default: '14'
    description: Days of history to examine.
    type: number
  scope_hosts:
    default: []
    description: Target hosts identified by the scoping step.
    type: list[host]
  vulnerability_ids:
    default:
    - CVE-2024-47575
    - CVE-2025-61624
    description: CVEs for FortiManager auth bypass and FortiOS path traversal.
    from:
      kind: article
      observed: '2024-10-14'
      ref: unit42-peerstitch
    type: list[string]
provenance:
  authors:
  - name: Huntbase hunt generation
    org: huntbase.io
  generated:
    by: huntbase-hunt-generation
    from: https://unit42.paloaltonetworks.com/fortimanager-cve-2024-47575-peerstitch-malware/
    gates:
    - dry-run
    - lint
    model: hb_google/gemini-3-flash-preview
rationale: Start with centralized FortiManager instances as identifying the breach
  here is the first link. Widen to perimeter firewalls using the hosts returned by
  the scoping step to identify subsequent implantation.
references:
- name: "Unit 42 \u2014 Unit 42 Uncovers PEERSTITCH, a Stealthy FortiGate Implant"
  url: https://unit42.paloaltonetworks.com/fortimanager-cve-2024-47575-peerstitch-malware/
related:
- hunt: fortios-configuration-integrity-monitor
  reason: This hunt focuses on PEERSTITCH deployment; a separate hunt should monitor
    for unauthorized sniffer configuration changes.
  relation: out-of-scope-alternative
scenario:
  stages:
  - name: FortiManager Exploitation and Rogue Registration
    observables:
    - CVE-2024-47575
    - TCP port 541 (FMG-Access)
    - 'Rogue device serial: FMG-VMTM23017412'
    - 'Rogue device name: localhost'
    - 'Source IPs: 45.32.41.202, 198.199.122.22'
    slug: initial-access-fortimanager-exploit
    tactic: initial-access
    techniques:
    - T1190
  - name: Database and Configuration Exfiltration
    observables:
    - 'Archive file: .tm'
    - 'Database files: global.db, revinfo.db'
    - Configuration for over 500 managed FortiGate firewalls
    slug: exfiltration-configuration-archive
    tactic: exfiltration
    techniques:
    - T1041
  - name: Credential-based VPN Persistence
    observables:
    - 'Source IPs: 23.240.77.233, 47.18.167.159'
    - SSL/VPN sessions to perimeter firewalls
    - Usage of administrative credentials recovered from exfiltrated configs
    slug: persistence-unauthorized-vpn-access
    tactic: persistence
    techniques:
    - T1133
  - name: FortiOS Path Traversal and PEERSTITCH Deployment
    observables:
    - CVE-2025-61624
    - 'Object name: ../../../../setup'
    - auto-script engine exploitation
    - 'Directory: /data2/template/'
    - 'Malware files: pM.js, index.js, index.wasm, ipssem.js, lldprx'
    slug: privilege-escalation-path-traversal
    tactic: execution
    techniques:
    - T1190
  - name: PEERSTITCH Memory-Resident Injection
    observables:
    - 'Process injection targets: /bin/miglogd, /bin/iked'
    - ptrace(PTRACE_SEIZE, pid) usage
    - Writing to /proc/<pid>/mem
    - 'Memory patches at static offsets: base + 0x106F7B8, base + 0x1072E20, base
      + 0x109A570'
    - 20-byte trampoline at base + 0x135102C
    - In-memory marker search for '8550' and '169.254.0.1'
    slug: defense-evasion-memory-injection
    tactic: defense-evasion
    techniques:
    - T1071
  summary: Attackers exploited CVE-2024-47575 on FortiManager to register rogue appliances
    and exfiltrate configuration archives containing credentials for over 500 managed
    firewalls. They subsequently used these credentials to establish VPN sessions
    and exploit CVE-2025-61624 for privilege escalation, ultimately deploying PEERSTITCH,
    a memory-resident ARM64 implant that intercepts traffic and bypasses security
    validations via process injection.
severity: critical
targets:
  analyst:
    name: Tier-2 analyst
    role: analyst
  endpoint:
    category: endpoint
    name: Endpoint telemetry (hb_ surfaces)
    telemetry:
    - endpoint
  hunter:
    agent: true
    name: Hunt agent
  identity:
    category: identity
    name: Identity / sign-in telemetry
    telemetry:
    - identity
  network:
    category: network
    name: Network telemetry
    telemetry:
    - network
tlp: clear
type: investigation
---


# Fortinet Management Plane Exploitation and PEERSTITCH Deployment

This hunt targets the multi-stage exploitation of Fortinet infrastructure. It starts by identifying vulnerable appliances and rogue device registrations used for configuration exfiltration. It then pivots to find unauthorized VPN access from known actor infrastructure and the deployment of PEERSTITCH, a memory-resident injector that intercepts traffic by patching core daemons. The hunt correlates initial management-plane compromise with follow-on persistence on perimeter firewalls using a phased approach.

## vulnerability-scoping
<!-- Vulnerability identification -->
Identify appliances currently reporting vulnerabilities used in the PEERSTITCH campaign.

```sqlite target=endpoint role=scoping params=(vulnerability_ids=vulnerability_ids)
~~~yaml
expected: A list of unique device IDs exposed to management plane or path traversal
  exploits. Silence indicates no reported findings.
reads:
- device_uid
- resource_uid
- cve_uid
- severity_id
- status
silence: not_evidence_of_absence
source: hb_vulnerability_finding
verified: dry-run
verified_at: '2026-10-15'
~~~
SELECT device_uid, resource_uid, cve_uid, severity_id, status FROM hb_vulnerability_finding WHERE instr(',' || '{{vulnerability_ids}}' || ',', ',' || cve_uid || ',') > 0
```

## early-stage-corroboration
<!-- Corroborate rogue access and rare exfiltration -->
parallel:
- → rogue-fmg-access
- → rare-config-archive-touches
join: → early-stage-read

## rogue-fmg-access
<!-- Rogue FortiManager registration -->
Detect inbound connections to the management channel from known attacker infrastructure.

```sqlite target=network role=triage params=(attacker_ips_initial=attacker_ips_initial, lookback_days=lookback_days)
~~~yaml
expected: Inbound connections from report IPs to port 541. This signifies a probable
  rogue registration attempt.
reads:
- device_hostname
- src_endpoint_ip
- dst_endpoint_port
- direction
- time
silence: not_evidence_of_absence
source: hb_network_connection
verified: dry-run
verified_at: '2026-10-15'
~~~
SELECT device_hostname, src_endpoint_ip, dst_endpoint_port, direction, time FROM hb_network_connection WHERE dst_endpoint_port = 541 AND instr(',' || '{{attacker_ips_initial}}' || ',', ',' || src_endpoint_ip || ',') > 0 AND time >= datetime('now', '-{{lookback_days}} days')
```

## rare-config-archive-touches
<!-- Rare configuration archive touches -->
Stack-count touches to database or archive files used by FortiManager to identify rare exfiltration events.

```sqlite target=endpoint role=baseline params=(lookback_days=lookback_days)
~~~yaml
baseline:
  compare: first_seen
  window: '{{lookback_days}}d'
expected: File touches on archive names restricted to very few hosts. Fleet-wide noise
  would imply standard backups.
prevalence:
  by: device_hostname
  key:
  - file_name
  rare_below: 3
reads:
- file_name
- activity_name
- device_hostname
- time
silence: not_evidence_of_absence
source: hb_file_activity
verified: dry-run
verified_at: '2026-10-15'
~~~
SELECT file_name, activity_name, COUNT(DISTINCT device_hostname) AS hosts, MIN(time) AS first_seen FROM hb_file_activity WHERE (LOWER(file_name) IN ('.tm', 'global.db', 'revinfo.db')) AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY file_name, activity_name HAVING hosts < 3
```

## early-stage-read
<!-- Management plane compromise triage -->
```agent target=hunter
cite: required
context:
- vulnerability-scoping
- rogue-fmg-access
- rare-config-archive-touches
max_iterations: 4
objective: Determine if any management hosts show signs of exploitation (CVE-2024-47575)
  and subsequent configuration theft.
success_criteria: A per-host verdict of compromised | suspicious | clean, citing rows
  from network and file surfaces.
tools:
- endpoint
- identity
- network
```

## follow-on-activity
<!-- Corroborate VPN persistence and implant deployment -->
parallel:
- → unauthorized-vpn-logons
- → peerstitch-deployment
join: → full-chain-read

## unauthorized-vpn-logons
<!-- Unauthorized VPN sign-ins -->
Find sign-in events from the report's VPN IPs, filtered by the hosts identified in the scoping phase.

```sqlite target=identity role=enrichment params=(attacker_ips_vpn=attacker_ips_vpn, scope_hosts=scope_hosts, lookback_days=lookback_days)
~~~yaml
expected: Authentication events from report-specified IPs to scoped firewalls. This
  confirms the attacker is using stolen credentials.
reads:
- device_hostname
- src_endpoint_ip
- actor_user_name
- status
- time
silence: not_evidence_of_absence
source: hb_auth_signin
verified: dry-run
verified_at: '2026-10-15'
~~~
SELECT device_hostname, src_endpoint_ip, actor_user_name, status, time FROM hb_auth_signin WHERE instr(',' || '{{attacker_ips_vpn}}' || ',', ',' || src_endpoint_ip || ',') > 0 AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')
```

## peerstitch-deployment
<!-- PEERSTITCH deployment artifacts -->
Identify the PEERSTITCH native injector or path-traversal activity on firewall command lines.

```sqlite target=endpoint role=detection-candidate params=(lookback_days=lookback_days)
~~~yaml
expected: Processes running the lldprx binary or command lines executing the setup
  script via traversal. Any such row is a high-fidelity indicator of implantation.
reads:
- device_hostname
- process_name
- process_cmd_line
- time
silence: not_evidence_of_absence
source: hb_process_activity
verified: dry-run
verified_at: '2026-10-15'
~~~
SELECT device_hostname, process_name, process_cmd_line, time FROM hb_process_activity WHERE (LOWER(process_name) LIKE '%lldprx' OR (LOWER(process_cmd_line) LIKE '%setup%' AND LOWER(process_cmd_line) LIKE '%../../../../%')) AND time >= datetime('now', '-{{lookback_days}} days')
```

## full-chain-read
<!-- Full chain intrusion triage -->
```agent target=hunter
cite: required
context:
- early-stage-read
- unauthorized-vpn-logons
- peerstitch-deployment
max_iterations: 5
objective: Synthesize the results from early-stage management triage with follow-on
  VPN and deployment evidence to confirm if firewalls have been compromised and implanted.
success_criteria: A forensic summary confirming credential theft, unauthorized access,
  and malware deployment per host.
tools:
- endpoint
- identity
- network
```

## route-on-verdict
<!-- Route on verdict -->
if~: "the forensic triage confirms a chain from management exfiltration to firewall implantation" (confidence: high, judge=hunter)
then: → contain-and-revoke
indeterminate: → analyst-review
unavailable: → analyst-review (blind_spot: memory-hook-blind-spot)
else: → close-out

## contain-and-revoke
<!-- Isolate firewalls and rotate credentials -->
```action target=endpoint
~~~yaml
approval: required
~~~
Isolate the FortiManager and affected FortiGate appliances. Revoke all credentials contained in the exfiltrated archives (administrative, local, and SSL/VPN passwords).
```
→ analyst-review

## analyst-review
<!-- Verify implant presence -->
```manual target=analyst
Review the full chain triage. Confirm the presence of the lldprx injector. Document which firewalls were touched by the attacker's VPN infrastructure. Document if ptrace or /proc/pid/mem activity was observed.
```
→ close-out

## close-out
<!-- Hunt closure -->
```manual target=analyst
Note the blind spots related to in-memory passive traffic monitoring. Record whether any hosts in scope were missing vulnerability telemetry.
```
→ end

Run it

Take this hunt into your environment.

Open it in Huntbase to run every step against your own connections, with Scout weighing the evidence and your analysts in command. Or take the open hunt.md file anywhere that reads the format.

Machine-drafted by huntbase-hunt-generation using hb_google/gemini-3-flash-preview, gated by dry-run, lint, then reviewed by a person.