Detection queries Malware analysisWindows

C2Agent LLM-driven Windows implant

Analysis of a Go Windows implant run by a C2-side LLM that turns operator goals into tool calls. It supports MCP, skills, handoff to AI coding CLIs on the host, and Cobalt Strike BOFs.

What happened

Go Windows implant where an LLM on the C2 side drives the host: operator sends a plain-language goal; implant builds a system prompt (tools, MCP, skills, memory), model returns one JSON tool call, agent executes and feeds TOOL RESULT back, loop until done (default 40 steps). Built-in MCP client defaults to Firecrawl public MCP; C2 can add MCP servers and markdown skill playbooks; skill_save lets the LLM propose new skills. From v2.3 can hand tasks to AI coding CLIs already on the host; v2.4 adds Cobalt Strike BOF loader and self-upgrade.

Read the original source

How it happened

Select a stage to explore its defenses MagicSword policy opportunity
MagicSword Detect this stage
Detect this stage
Detect this stage
Detect this stage
Select a stage · Drag to explore · + / − to zoom · Dashed edges are loopsSelect a stage · Arrows show reported connectionsReported sequence
Read the flow as text & sources

A catalog reconstruction of the supplied source account. Unknown steps remain explicit; an edge describes the reported relationship between steps.

  1. 01 · Stager downloads the implant

    The reported two-stage chain fetches a Windows PE; the original delivery route is unknown.

    Hunt: A newly downloaded or staged executable runs from a user-writable location and exhibits the reported follow-on behavior.

    Many approved installers run from user-writable folders. These events are hunt candidates, not proof of malware or an enforced block.

    MagicSword policy opportunity · A managed Windows device with a policy denying the implant before it starts.

    Source for step 1
  2. 02 · LLM receives an operator goal

    A system prompt describes available tools, MCP connections, skills and memory.

    Hunt: A model-provider investigation correlates related accounts, repeated offensive requests and shared infrastructure or exposed operator sessions.

    Attacker-side planning is generally absent from victim SIEM logs. These templates require provider-owned audit data and do not identify AI use from a victim process alone.

    Source for step 2
  3. 03 · Implant executes a tool call

    The model returns a JSON tool call for the implant to execute.

    Hunt: Untrusted content or a changed tool definition precedes a file read, command, or remote call outside the user's intended task.

    Process logs cannot recover model intent. Remote connectors and in-process interpreters may produce no local child process. Prompt content alone is not a reliable signature.

    Source for step 3
  4. 04 · Tool results return to the model

    Results feed the next decision in an iterative loop; later versions can delegate to installed AI CLIs.

    Hunt: Sensitive reads are followed by outbound transfer, a public artifact, or a tool call to a destination outside the approved workflow.

    An outbound connection or high byte count alone is not exfiltration. Encrypted traffic may hide content, and bulk legitimate exports are common.

    Source for step 4

Dashed edges show a repeated decision loop.

Why it matters

Reported entry point: unknown (two-stage: Go stager downloads PE from agent.x90.dev/data/copilot.txt). Reported impact: 32 samples 2026-09-10 to 2026-10-08 (25 agents, 8 major versions in 29 days; 7 stager v7); payload URL live serving v2.4 as of 2026-10-09; reported targets include unknown (no victim orgs named in Unit 42 timely intel note).

Check these source-linked conditions against your setup.

Windows

The analyzed implant runs on Windows; its LLM is an attacker-side component.

Conditions to check
  • The report does not establish how the implant initially reaches every victim host.

Source-linked applicability guidance. Confirm current scope in the original report.

Read the original report

What you can do

Protection & prevention

Start here

Investigate unexpected implants, process trees, tool calls and outbound control traffic.

LOLSkills surface for skill/MCP abuse; hunt AI coding CLI handoff

Catalog defensive guidance based on the reported behavior. Confirm scope and current mitigations in the original source.

Review the original guidance LOLSkills
Explore scoped MagicSword policy options

Requires an enforced Windows policy covering the actual executable. Audit mode records events without blocking.

Deny an unapproved executable

Use MagicSword to audit the actual executable's signer, publisher or hash, then enforce a policy that denies unapproved code on managed Windows hosts.

Applies to: A managed Windows device with a policy denying the implant before it starts.

Policy opportunity, not tested incident coverage. Requires enrolled Windows devices, a policy covering the actual executable, and enforcement. Audit mode records decisions without blocking; allowed tools and in-process / cloud actions can remain reachable.

Explore the policy control View mapped attack stage
Investigate each phase

Detection queries

Draft query starters grouped by the attack stages where they apply.

Download stage pack

Start with the logs you collect. Each hunt identifies its required visibility, field mapping and limits. Queries are catalog-authored drafts using reusable behavior profiles; test with known activity and your normal baseline before alerting.

01Stager downloads the implantUnapproved Windows program executionNative logs · Draft

The reported two-stage chain fetches a Windows PE; the original delivery route is unknown.

What to look for

A newly downloaded or staged executable runs from a user-writable location and exhibits the reported follow-on behavior.

Visibility: Defender-side logs where collected

Required logs

  • Windows process creation
  • Download provenance and file hashes
  • File certificate information and application-control audit / block events

Coverage limit. Many approved installers run from user-writable folders. These events are hunt candidates, not proof of malware or an enforced block.

Windows process candidates. Sigma uses normalized process_creation fields; KQL requires Defender for Endpoint; SPL requires the Sysmon XML sourcetype. Tune collectors, fields and baselines before use.

Sigma
Draft SigmaDownload Sigma
title: Hunt - Unapproved Windows program execution
id: e217e948-e57c-48b8-a331-66006de42ae1
status: experimental
description: A newly downloaded or staged executable runs from a user-writable
  location and exhibits the reported follow-on behavior.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
  - Authorized activity matching this broad hunt; baseline and investigate
    before alerting.
level: low
logsource:
  category: process_creation
  product: windows
detection:
  selection:
    Image|contains:
      - \Downloads\
      - \AppData\Local\Temp\
      - \AppData\Roaming\
  condition: selection
KQL
Draft KQLDownload KQL
// Draft hunt; requires Defender for Endpoint process telemetry for this OS.
DeviceProcessEvents
| where Timestamp > ago(7d)
| where FolderPath contains "\\Downloads\\" or FolderPath contains "\\AppData\\Local\\Temp\\" or FolderPath contains "\\AppData\\Roaming\\"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine, SHA1
| order by Timestamp desc
SPL
Draft SPLDownload SPL
sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
Image IN ("*\\Downloads\\*", "*\\AppData\\Local\\Temp\\*", "*\\AppData\\Roaming\\*")
| table _time host User Image CommandLine ParentImage ParentCommandLine
| sort - _time
Investigation steps
  1. Verify publisher, hash, origin, prevalence and local approval rather than trusting a product name or signature.
  2. Trace child processes and related credential, network or persistence events.
02LLM receives an operator goalProvider-side abuse investigationCustom schema · Draft

A system prompt describes available tools, MCP connections, skills and memory.

What to look for

A model-provider investigation correlates related accounts, repeated offensive requests and shared infrastructure or exposed operator sessions.

Operator goals and system prompts require access to the operator or provider trace; downstream host activity is separate evidence.

Visibility: Provider / operator records

Required logs

  • Provider-owned account / request audit
  • Abuse-review findings and linked-account context
  • Lawfully available exposed operator-session evidence

Coverage limit. Attacker-side planning is generally absent from victim SIEM logs. These templates require provider-owned audit data and do not identify AI use from a victim process alone.

Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.

Sigma
Draft SigmaDownload Sigma
title: Hunt - Provider-side abuse investigation
id: c8c1edc0-c79a-4644-a876-2c1a6cb9a438
status: experimental
description: A model-provider investigation correlates related accounts,
  repeated offensive requests and shared infrastructure or exposed operator
  sessions.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
  - Authorized activity matching this broad hunt; baseline and investigate
    before alerting.
level: low
logsource:
  category: application
  product: openattacks_audit
  definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,
    Target and CorrelationId from the required source logs first.
detection:
  selection:
    EventType:
      - model.request
  condition: selection
KQL
Draft KQLDownload KQL
// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.
// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).
// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.
OpenAttacksAudit_CL
| where TimeGenerated > ago(7d)
| where EventType in ("model.request")
| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId
| order by TimeGenerated desc
SPL
Draft SPLDownload SPL
sourcetype="openattacks:audit"
EventType IN ("model.request")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _time
Investigation steps
  1. Correlate accounts, request rates, infrastructure and source-described behavior in provider-owned records.
  2. For victim-side defense, pivot to the reported execution or access stage rather than trying to detect attacker-side prompts.
03Implant executes a tool callUnexpected agent tool useCustom schema · Draft

The model returns a JSON tool call for the implant to execute.

What to look for

Untrusted content or a changed tool definition precedes a file read, command, or remote call outside the user's intended task.

Visibility: Defender-side logs where collected

Required logs

  • Agent tool-call audit records with session / tool / destination
  • Tool-definition and approval changes
  • Endpoint process, file-access and network evidence where available

Coverage limit. Process logs cannot recover model intent. Remote connectors and in-process interpreters may produce no local child process. Prompt content alone is not a reliable signature.

Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.

Sigma
Draft SigmaDownload Sigma
title: Hunt - Unexpected agent tool use
id: c709e384-0e11-479e-ab4d-3a06e2431e4b
status: experimental
description: Untrusted content or a changed tool definition precedes a file
  read, command, or remote call outside the user's intended task.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
  - Authorized activity matching this broad hunt; baseline and investigate
    before alerting.
level: low
logsource:
  category: application
  product: openattacks_audit
  definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,
    Target and CorrelationId from the required source logs first.
detection:
  selection:
    EventType:
      - agent.tool.call
      - agent.tool.definition.change
  condition: selection
KQL
Draft KQLDownload KQL
// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.
// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).
// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.
OpenAttacksAudit_CL
| where TimeGenerated > ago(7d)
| where EventType in ("agent.tool.call", "agent.tool.definition.change")
| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId
| order by TimeGenerated desc
SPL
Draft SPLDownload SPL
sourcetype="openattacks:audit"
EventType IN ("agent.tool.call", "agent.tool.definition.change")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _time
Investigation steps
  1. Join input provenance, tool descriptions and calls by session ID and compare the action to the approved task.
  2. Inspect child processes and destinations; record whether execution was in-process, local, or through a remote SaaS connector.
04Tool results return to the modelSensitive data → unusual destinationCustom schema · Draft

Results feed the next decision in an iterative loop; later versions can delegate to installed AI CLIs.

What to look for

Sensitive reads are followed by outbound transfer, a public artifact, or a tool call to a destination outside the approved workflow.

Visibility: Defender-side logs where collected

Required logs

  • Sensitive resource access / DLP records
  • Proxy, egress and cloud upload events
  • Agent / SaaS audit with correlation IDs

Coverage limit. An outbound connection or high byte count alone is not exfiltration. Encrypted traffic may hide content, and bulk legitimate exports are common.

Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.

Sigma
Draft SigmaDownload Sigma
title: Hunt - Sensitive data → unusual destination
id: 04b60968-3179-4b1f-ae13-6f57c2446077
status: experimental
description: Sensitive reads are followed by outbound transfer, a public
  artifact, or a tool call to a destination outside the approved workflow.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
  - Authorized activity matching this broad hunt; baseline and investigate
    before alerting.
level: low
logsource:
  category: application
  product: openattacks_audit
  definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,
    Target and CorrelationId from the required source logs first.
detection:
  selection:
    EventType:
      - data.export
      - agent.external.send
  condition: selection
KQL
Draft KQLDownload KQL
// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.
// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).
// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.
OpenAttacksAudit_CL
| where TimeGenerated > ago(7d)
| where EventType in ("data.export", "agent.external.send")
| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId
| order by TimeGenerated desc
SPL
Draft SPLDownload SPL
sourcetype="openattacks:audit"
EventType IN ("data.export", "agent.external.send")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _time
Investigation steps
  1. Join the resource read and outbound action by session, identity or process, preserving a bounded time window.
  2. Inspect destination ownership, payload classification and the user's intended action; baseline sanctioned sharing.
Technical detailsTooling, impact & MITRE ATLAS

Attack context

AI's role
AI infrastructure as C2
Initial access
unknown (two-stage: Go stager downloads PE from agent.x90.dev/data/copilot.txt)

Tooling as reported

AI products, models and artifacts

  • LLM tool loop via C2 (proxied /llm/.../v1/chat/completions)
  • MCP client (default mcp.firecrawl.dev)
  • Markdown skill playbooks from C2
  • Host AI coding CLI handoff (v2.3+)
  • aibox.x90.dev (v0 operator LLM endpoint only)

Other tooling

  • LOLBin templates (cred dump, shadow copies, free-space wipe)
  • Process injection
  • Native AD recon
  • Exfil
  • TCP pivot
  • Cobalt Strike BOFs (v2.4)
  • Startup .lnk / Run key / onlogon task

Targets and reported impact

Targets / sectors
unknown (no victim orgs named in Unit 42 timely intel note)
Reported scale / exposure
32 samples 2026-09-10 to 2026-10-08 (25 agents, 8 major versions in 29 days; 7 stager v7); payload URL live serving v2.4 as of 2026-10-09

Reported attribution

unknown; 32 samples ~1 month active development

Structured attribution

Actor
unknown

Detection rules

  • Review attack-specific indicatorsGUIDANCE

    Monitor for the techniques described in C2Agent LLM-driven Windows implant. Refer to sources for specific IOCs and TTPs.

Source defensive notes

LOLSkills surface for skill/MCP abuse; hunt AI coding CLI handoff

MITRE ATLAS

AI-specific catalog annotations based on the reported behavior; these are not MITRE case-study assignments.

AML.T0102Generate Malicious Commands

An LLM returns tool calls in response to intrusion goals. Source

AML.T0103Deploy AI Agent

The implant runs an AI agent with MCP and host-side tools. Source

Sources & research credit

1 source

Research by Jingwen Shi, Gaurav C G, Mark Lim, Tyler Halfpop, Ashutosh Chitwadgi · Unit 42 (Palo Alto Networks)

  1. github.com
Record & downloads
Source record name
C2Agent LLM-driven Windows implant
Entry ID
c2agent-unit42-2026-10
Catalog review
October 20, 2026
Category
adversary-use-of-ai
AI involvement confidence
confirmed