# C2Agent LLM-driven Windows implant

- ID: c2agent-unit42-2026-10
- Reported: 2026-10-09
- Researcher: Jingwen Shi, Gaurav C G, Mark Lim, Tyler Halfpop, Ashutosh Chitwadgi
- Organization: Unit 42 (Palo Alto Networks)
- AI role: ai_infra_as_c2 (AI infrastructure as C2)
- Confidence in AI involvement: not assessed
- Research / borderline: false
- Last reviewed: 2026-10-20
- Entry page: https://openattacks.ai/attacks/c2agent-unit42-2026-10/
- Entry JSON: https://openattacks.ai/api/attacks/c2agent-unit42-2026-10.json
- Browse title: C2Agent LLM-driven Windows implant
- Editorial summary: 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.
- Evidence class (catalog annotation): Malware analysis
- Source-stated target environments: Windows
- Stage hunts and conditional defenses: https://openattacks.ai/api/defenses/c2agent-unit42-2026-10.json

## Technique
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.

## Stack relevance (editorial)
Assessment: mapped. Editorial applicability reviewed against the catalog source account; not a scan or independent incident verification.
First action: Investigate unexpected implants, process trees, tool calls and outbound control traffic.
- Relationship: environment; tools: no specific product; OS scope: windows; requires existing MCP connections: false.
  Relevance: The analyzed implant runs on Windows; its LLM is an attacker-side component.
  Condition to check: The report does not establish how the implant initially reaches every victim host.
  Evidence: https://github.com/PaloAltoNetworks/Unit42-timely-threat-intel/blob/main/2026-10-09-C2Agent-malware.txt
A product mention alone is not a victim-side applicability mapping. Selection does not verify affected versions, permissions or compromise.

## Initial access
unknown (two-stage: Go stager downloads PE from agent.x90.dev/data/copilot.txt)

## AI tooling and models
- LLM tool loop via C2 (proxied /llm/.../v1/chat/completions)
- MCP client (default [mcp.firecrawl.dev](https://github.com/firecrawl/firecrawl-mcp-server))
- 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](https://www.cobaltstrike.com/) BOFs (v2.4)
- Startup .lnk / Run key / onlogon task

## Victims and sectors
unknown (no victim orgs named in Unit 42 timely intel note)

## Target geography
- unknown

## Attribution
unknown; 32 samples ~1 month active development

## Scale and metrics
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

## Attack flow
Catalog reconstruction of the supplied source account. Unknowns and research caveats are preserved.
### step-1: Stager downloads the implant [access]
The reported two-stage chain fetches a Windows PE; the original delivery route is unknown.
Evidence: https://github.com/PaloAltoNetworks/Unit42-timely-threat-intel/blob/main/2026-10-09-C2Agent-malware.txt

### step-2: LLM receives an operator goal [ai]
A system prompt describes available tools, MCP connections, skills and memory.
Evidence: https://github.com/PaloAltoNetworks/Unit42-timely-threat-intel/blob/main/2026-10-09-C2Agent-malware.txt

### step-3: Implant executes a tool call [execution]
The model returns a JSON tool call for the implant to execute.
Evidence: https://github.com/PaloAltoNetworks/Unit42-timely-threat-intel/blob/main/2026-10-09-C2Agent-malware.txt

### step-4: Tool results return to the model [ai]
Results feed the next decision in an iterative loop; later versions can delegate to installed AI CLIs.
Evidence: https://github.com/PaloAltoNetworks/Unit42-timely-threat-intel/blob/main/2026-10-09-C2Agent-malware.txt

Connections:
- step-1 -> step-2
- step-2 -> step-3
- step-3 -> step-4
- step-4 -> step-2 (Next decision) [loop]

## Stage defense and hunting recommendations
Editorial recommendations, not validated coverage. Source-controlled query starters are drafts. Custom-schema examples require telemetry collection and field mapping; absence of a mapping means not assessed. MagicSword policy opportunities require managed Windows scope and enforcement.
### step-1: Unapproved Windows program execution
- Visibility: Defender-side logs where collected
- Query origin: catalog_authored; status: draft; log scope: native
- SIGMA query download: /api/detections/windows-install.sigma.yml
- KQL query download: /api/detections/windows-install.kql
- SPL query download: /api/detections/windows-install.spl
- Hunt hypothesis: A newly downloaded or staged executable runs from a user-writable location and exhibits the reported follow-on behavior.
- Required telemetry: Windows process creation; Download provenance and file hashes; File certificate information and application-control audit / block events
- Investigate: Verify publisher, hash, origin, prevalence and local approval rather than trusting a product name or signature.
- Investigate: Trace child processes and related credential, network or persistence events.
- Limitation: Many approved installers run from user-writable folders. These events are hunt candidates, not proof of malware or an enforced block.
- Conditional MagicSword policy: Use MagicSword to audit the actual executable's signer, publisher or hash, then enforce a policy that denies unapproved code on managed Windows hosts.
- Policy scope: A managed Windows device with a policy denying the implant before it starts.
- Policy limitation: 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.
- Policy reference: https://www.magicsword.io/use-cases/application-control?utm_source=openattacks&utm_medium=referral&utm_content=stage-control

### step-2: Provider-side abuse investigation
- Visibility: Provider / operator records
- Query origin: catalog_authored; status: draft; log scope: custom_schema
- SIGMA query download: /api/detections/provider.sigma.yml
- KQL query download: /api/detections/provider.kql
- SPL query download: /api/detections/provider.spl
- Hunt hypothesis: A model-provider investigation correlates related accounts, repeated offensive requests and shared infrastructure or exposed operator sessions.
- Required telemetry: Provider-owned account / request audit; Abuse-review findings and linked-account context; Lawfully available exposed operator-session evidence
- Investigate: Correlate accounts, request rates, infrastructure and source-described behavior in provider-owned records.
- Investigate: For victim-side defense, pivot to the reported execution or access stage rather than trying to detect attacker-side prompts.
- Limitation: 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.
- Qualification: Operator goals and system prompts require access to the operator or provider trace; downstream host activity is separate evidence.
- No direct MagicSword prevention claim is recorded for this stage.

### step-3: Unexpected agent tool use
- Visibility: Defender-side logs where collected
- Query origin: catalog_authored; status: draft; log scope: custom_schema
- SIGMA query download: /api/detections/agent-tools.sigma.yml
- KQL query download: /api/detections/agent-tools.kql
- SPL query download: /api/detections/agent-tools.spl
- Hunt hypothesis: Untrusted content or a changed tool definition precedes a file read, command, or remote call outside the user's intended task.
- Required telemetry: Agent tool-call audit records with session / tool / destination; Tool-definition and approval changes; Endpoint process, file-access and network evidence where available
- Investigate: Join input provenance, tool descriptions and calls by session ID and compare the action to the approved task.
- Investigate: Inspect child processes and destinations; record whether execution was in-process, local, or through a remote SaaS connector.
- Limitation: 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.
- No direct MagicSword prevention claim is recorded for this stage.
- Community intelligence: LOLSkills — https://lolskills.io

### step-4: Sensitive data → unusual destination
- Visibility: Defender-side logs where collected
- Query origin: catalog_authored; status: draft; log scope: custom_schema
- SIGMA query download: /api/detections/exfil.sigma.yml
- KQL query download: /api/detections/exfil.kql
- SPL query download: /api/detections/exfil.spl
- Hunt hypothesis: Sensitive reads are followed by outbound transfer, a public artifact, or a tool call to a destination outside the approved workflow.
- Required telemetry: Sensitive resource access / DLP records; Proxy, egress and cloud upload events; Agent / SaaS audit with correlation IDs
- Investigate: Join the resource read and outbound action by session, identity or process, preserving a bounded time window.
- Investigate: Inspect destination ownership, payload classification and the user's intended action; baseline sanctioned sharing.
- Limitation: An outbound connection or high byte count alone is not exfiltration. Encrypted traffic may hide content, and bulk legitimate exports are common.
- No direct MagicSword prevention claim is recorded for this stage.


## MITRE ATLAS
Mappings are catalog annotations based on described behavior, not assignments or endorsements by MITRE.
- AML.T0102: Generate Malicious Commands — An LLM returns tool calls in response to intrusion goals.
  Technique: https://atlas.mitre.org/techniques/AML.T0102
  Evidence: https://github.com/PaloAltoNetworks/Unit42-timely-threat-intel/blob/main/2026-10-09-C2Agent-malware.txt
- AML.T0103: Deploy AI Agent — The implant runs an AI agent with MCP and host-side tools.
  Technique: https://atlas.mitre.org/techniques/AML.T0103
  Evidence: https://github.com/PaloAltoNetworks/Unit42-timely-threat-intel/blob/main/2026-10-09-C2Agent-malware.txt

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

## Sources
- https://github.com/PaloAltoNetworks/Unit42-timely-threat-intel/blob/main/2026-10-09-C2Agent-malware.txt
