SOC Prime Bias: Critical

13 Feb 2026 15:45

Cato CTRL Threat Research: Foxveil – New Malware Loader Abusing Cloudflare, Discord, and Netlify as Staging Infrastructure

Author Photo
Ruslan Mikhalov Chief of Threat Research at SOC Prime linkedin icon Follow
Cato CTRL Threat Research: Foxveil – New Malware Loader Abusing Cloudflare, Discord, and Netlify as Staging Infrastructure
shield icon

Detection stack

  • AIDR
  • Alert
  • ETL
  • Query

Summary

Foxveil is a newly identified initial-stage malware loader first seen in August 2025. It pulls Donut-generated shellcode from “trusted” hosting surfaces—Cloudflare Pages, Netlify, and Discord attachments—then runs it through process-injection techniques. For persistence, the loader either registers a Windows service or attempts to tamper with Microsoft Defender settings. Across observed variants, the main differences are the staging source, the injection approach, and the persistence method.

Investigation

Cato researchers analyzed two Foxveil variants and documented the end-to-end flow: shellcode retrieval, injection via Early Bird APC (or direct self-injection), and persistence through a service named AarSvc. Dropped artifacts were observed under C:\Windows\SysWOW64 using masqueraded filenames to blend with legitimate components. The loader also includes string-mutation logic that rewrites high-signal terms to reduce static detections. Network telemetry showed connections to multiple Cloudflare and Netlify domains, with occasional fetches from Discord attachment URLs.

Mitigation

The Cato SASE platform blocked the loader before payload execution by inspecting download behavior and suspicious process creation patterns. To reduce risk, block known staging domains and alert on injection-related behavior associated with Foxveil’s tradecraft. Disable untrusted script execution and harden policies around Windows Defender exclusions to limit persistence attempts. Keep allow-list rules for legitimate cloud services current to minimize false positives while maintaining coverage.

Response

If Foxveil activity is detected, isolate the endpoint, terminate the malicious process, and remove any registered service (including AarSvc). Perform forensic review of SysWOW64 for dropped executables and collect hashes for scoping. Pivot on network logs for connections to identified staging domains and block them at DNS/proxy layers. Roll out detections for Early Bird APC injection and self-injection patterns across the fleet to identify additional impacted hosts.

graph TB %% Class Definitions classDef technique fill:#ffcc99 classDef malware fill:#ff9999 classDef tool fill:#99ccff classDef payload fill:#ccccff classDef operator fill:#ff9900 %% Node Definitions initial_execution[“<b>Technique</b> – <b>T1574.005 Hijack Execution Flow: Executable Installer File Permissions Weakness</b><br/>Victim runs malicious EXE/DLL dropping the Foxveil loader.”] class initial_execution technique staging_retrieval[“<b>Technique</b> – <b>T1102.001 Web Service: Dead Drop Resolver</b> and <b>T1102 Web Service</b><br/>Foxveil contacts attacker‑controlled Cloudflare Pages, Netlify domains or Discord attachment links to download Donut‑generated shellcode.”] class staging_retrieval technique in_memory_loading[“<b>Technique</b> – <b>T1620 Reflective Code Loading</b><br/>Downloaded shellcode is loaded directly into memory without touching disk.”] class in_memory_loading technique process_injection[“<b>Technique</b> – <b>T1055.002 Portable Executable Injection</b> and <b>T1055.001 DLL Injection</b><br/>Foxveil v1 injects via Early‑Bird APC into a newly spawned svchost.exe process; Foxveil v2 self‑injects.”] class process_injection technique persistence_service[“<b>Technique</b> – <b>T1543 Create or Modify System Process</b><br/>Foxveil v1 registers a Windows service (AarSvc) for boot persistence.”] class persistence_service technique masquerading[“<b>Technique</b> – <b>T1036.005 Match Legitimate Resource Name or Location</b><br/>Dropped binaries named sms.exe, sihost.exe, taskhostw.exe, audiodg.exe, real1.exe placed in C:\\Windows\\SysWOW64.”] class masquerading technique hide_artifacts[“<b>Technique</b> – <b>T1564.012 File/Path Exclusions</b><br/>Attempts WMI call to MSFT_MpPreference to remove an exclusion for C:\\Windows\\SysWOW64.”] class hide_artifacts technique obfuscation[“<b>Technique</b> – <b>T1027.014 Polymorphic Code</b><br/>Runtime string‑mutation routine replaces high‑signal strings such as \”fox\”, \”payload\”, \”meterpreter\”, \”beacon\”.”] class obfuscation technique multistage_delivery[“<b>Technique</b> – <b>T1104 Multi‑Stage Channels</b><br/>After initial shellcode execution, additional executables are downloaded from the same staging infrastructure (e.g., potential Cobalt Strike beacon).”] class multistage_delivery technique foxveil[“<b>Malware</b> – Foxveil Loader<br/>Initial dropper that retrieves and loads shellcode.”] class foxveil malware donut_shellcode[“<b>Payload</b> – Donut generated shellcode<br/>Contains further malicious capabilities.”] class donut_shellcode payload cobalt_strike[“<b>Tool</b> – Potential Cobalt Strike beacon<br/>Downloaded in later stages for command‑and‑control.”] class cobalt_strike tool %% Connections initial_execution –>|drops| foxveil foxveil –>|retrieves| staging_retrieval staging_retrieval –>|downloads| donut_shellcode donut_shellcode –>|loads via| in_memory_loading in_memory_loading –>|executes| process_injection process_injection –>|enables| persistence_service foxveil –>|performs| masquerading foxveil –>|performs| hide_artifacts foxveil –>|performs| obfuscation process_injection –>|leads to| multistage_delivery multistage_delivery –>|downloads| cobalt_strike cobalt_strike –>|provides| persistence_service

Attack Flow

Simulation Execution

Prerequisite: The Telemetry & Baseline Pre‑flight Check must have passed.

Rationale: This section details the precise execution of the adversary technique (TTP) designed to trigger the detection rule. The commands and narrative MUST directly reflect the TTPs identified and aim to generate the exact telemetry expected by the detection logic.

  • Attack Narrative & Commands

    1. Reconnaissance: The attacker has obtained the Foxveil staging domain syscore.pages.dev from a compromised credential dump.
    2. Stage 1 – DNS Resolution: Using a native Windows tool, the attacker resolves the staging domain to obtain the IP address of the malicious payload host. This step mirrors the real malware behavior and is the observable trigger.
    3. Stage 2 – Payload Retrieval (not executed in test): In a real attack the resolved IP would be used to download the second‑stage payload via HTTP. For the purpose of detection validation, only the DNS resolution is required.
  • Regression Test Script

    <# 
    Simulate Foxveil staging domain resolution.
    This script performs a DNS query for a known Foxveil domain,
    generating the exact telemetry the Sigma rule monitors.
    #>
    
    # Define the staging domain (chosen from the rule's whitelist)
    $stagingDomain = "syscore.pages.dev"
    
    # Resolve the domain – this generates a DNS query event
    try {
        $result = Resolve-DnsName -Name $stagingDomain -Type A -ErrorAction Stop
        Write-Host "Resolved $stagingDomain to $($result.IPAddress)"
    } catch {
        Write-Error "DNS resolution failed: $_"
    }
    
    # Optional: pause to ensure the log pipeline processes the event
    Start-Sleep -Seconds 5
  • Cleanup Commands

    # Flush the DNS cache to remove the resolved entry (prevents caching effects on subsequent tests)
    ipconfig /flushdns
    Write-Host "DNS cache flushed."