# Claude Code Memory Stores Abused as Covert C2 Channel to Control AI Agents and Exfiltrate Data (Darktrace research)

> Darktrace Signal Labs showed in a lab that an attacker who already controls a device and holds a user's Claude Console credentials can use Claude memory stores (heartbeat/input/output files) to run Claude Code agents as C2 implants. The demonstrated chain covered network discovery, an SMB password spray and exfiltration of a 1 GB file in three parts through the Claude Files API. It does not rely on a vulnerability in the Claude platform and has not been observed in the wild.

- **Published:** 2026-11-17T06:24:38Z
- **Last reviewed:** 2026-11-17T06:24:38Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-6213
- **Card image:** https://intel.threadlinqs.com/og/threat/TL-2026-6213.png
- **ID:** TL-2026-6213
- **Severity:** MEDIUM
- **Category:** THREAT_INTEL
- **Status:** MONITORING
- **Detections:** 9 (1 shown free below) · **IOCs:** 18 (2 shown free below)

## Description

Darktrace Signal Labs (Moishe Tajtelbaum and Sam Lister) published 'Living off the AI: Shared Memories as a Covert C2 Channel' on 2026-11-12. GBHackers covered it on 2026-11-17. The work is a lab proof of concept. Darktrace states the technique does not rely on a vulnerability in the Claude platform and has not been observed in the wild. It requires an existing foothold on a device and a user's Claude Console API and OAuth credentials.

The C2 channel is the Claude memory stores feature. The operator creates a memory store in a Claude Console workspace the victim user is assigned to, containing three text files. The heartbeat file receives a time-stamped check-in from each harness process. The input file holds natural-language jobs for the agent. The output file receives the agent's results. All traffic goes to api.anthropic.com, the same endpoint used for normal inference, so it blends with legitimate agent activity. The Console at platform.claude.com can view and edit the stores.

In the lab chain, a lightweight payload was fetched with curl from a remote staging server and run via dash. It located a Claude Code harness, collected Claude Console API and OAuth credentials and sent them to the staging server. The server returned the memory store and file identifiers. The script then used systemd-run to create a transient systemd service that repeatedly launched Claude Code harness processes. Each process checks in, then invokes a Claude Sonnet 4.5 model in non-interactive mode to run the queued job. The initial script was then discarded. The operator queued nine jobs, each run in a separate harness process. Because objectives are written in natural language, the agent chooses its own tooling, which lowers the skill needed by the operator.

The agent ran ip, ss and nc, found 192.168.1.2 with FTP, SMB and SSH open, and ran a targeted nmap scan. It enumerated and downloaded files over anonymous FTP, which contained employee details and a password. It generated a list of about 190 usernames and sprayed the password against the domain controller over SMB, which found one valid account (greg.simon, a fictitious lab account). smbclient listed shares and revealed a 1 GB file. The agent downloaded it, split it into three parts and uploaded them through the Claude Files API (api.anthropic.com/v1/files).

Darktrace's detection guidance is behavioral: correlate process creation with network activity for agent harness processes, flag tool calls with unusual command-line arguments, and flag unusual data-transfer ratios to the AI platform API, all against behavioral baselines. The article has no dedicated mitigations section and does not describe a vendor-side fix or Anthropic's response. Related public reports describe credential stealers that hand secret hunting to on-device AI agents (QUIETVAULT, s1ngularity, SANDWORM_MODE, DUSTMAKER). The article notes these lack a feedback loop, which the memory-store channel adds. No payload hashes, staging server addresses or binaries were published. The only indicators are lab artifacts and legitimate Anthropic endpoints, so IOCs in this record are behavioral and hunting pivots, not malicious infrastructure.

## MITRE ATT&CK

- T1059.004 Unix Shell
- T1543.002 Systemd Service
- T1552.001 Credentials In Files
- T1110.003 Password Spraying
- T1102.002 Bidirectional Communication
- T1071.001 Web Protocols
- T1046 Network Service Discovery
- T1135 Network Share Discovery
- T1078.002 Domain Accounts
- T1528 Steal Application Access Token
- T1018 Remote System Discovery
- T1039 Data from Network Shared Drive
- T1030 Data Transfer Size Limits
- T1567 Exfiltration Over Web Service

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**AI Agent Harness Host Running Recon Tooling or SMB Spray Pattern (TL-2026-6213) — Post-Exploitation** (`TL-2026-6213-SPL-002`)

Correlates hosts where a Claude Code harness is running with ip/ss/nc/nmap discovery tooling or 10+ smbclient executions in 15 minutes, matching the agent-driven network discovery, share enumeration and SMB password spray in the lab chain.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1046, T1018, T1135, T1039, T1110.003
- **Data sources:** index=linux sourcetype=sysmon:linux (Sysmon for Linux EventID 1), auditd, defender_for_endpoint_linux
- **Severity:** high
- **Confidence:** medium

### Splunk SPL

```spl
index=linux sourcetype="sysmon:linux" EventCode=1
    (Image="*/claude" OR CommandLine="*claude*" OR ParentCommandLine="*claude*" OR Image IN ("*/nmap","*/smbclient","*/nc","*/ncat","*/ss"))
| eval is_harness=if(match(Image,"/claude$") OR match(ParentImage,"/claude$") OR like(CommandLine,"%@anthropic-ai/claude-code%"),1,0)
| eval recon_tool=case(match(Image,"/nmap$"),"nmap", match(Image,"/smbclient$"),"smbclient", match(Image,"/(nc|ncat)$"),"nc", match(Image,"/ss$"),"ss", true(),null())
| eval is_smbclient=if(recon_tool="smbclient",1,0)
| bin _time span=15m
| stats max(is_harness) AS harness_present dc(recon_tool) AS recon_tool_count sum(is_smbclient) AS smbclient_runs values(recon_tool) AS recon_tools values(eval(if(isnotnull(recon_tool),CommandLine,null()))) AS recon_cmdlines by host, _time
| where harness_present=1 AND (recon_tool_count>=2 OR smbclient_runs>=10)
```

### Microsoft KQL

```kql
// AI agent harness host running discovery tooling (ss/nc/nmap) or bulk smbclient (SMB spray / share enumeration)
let HarnessHosts = DeviceProcessEvents
    | where Timestamp > ago(24h)
    | where FileName =~ "claude" or ProcessCommandLine has "@anthropic-ai/claude-code"
    | summarize HarnessFirstSeen = min(Timestamp) by DeviceId;
DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ ("nmap", "smbclient", "nc", "ncat", "ss")
| summarize ReconTools = make_set(FileName), ToolCount = dcount(FileName), SmbclientRuns = countif(FileName =~ "smbclient"),
            Commands = make_set(ProcessCommandLine, 20), FirstSeen = min(Timestamp), LastSeen = max(Timestamp)
            by DeviceId, DeviceName, Window = bin(Timestamp, 15m)
| where ToolCount >= 2 or SmbclientRuns >= 10
| join kind=inner HarnessHosts on DeviceId
| where FirstSeen >= HarnessFirstSeen
| project Window, DeviceName, ReconTools, SmbclientRuns, Commands, HarnessFirstSeen, FirstSeen, LastSeen
```

### Sigma

```yaml
title: Linux Credential Store Harvesting and SMB Recon Tooling Consistent with Agent-Driven Intrusion
id: 8b3e2f14-6213-4c7d-a2e5-91d4c6b0f702
status: experimental
description: Detects reads of Claude Code credential files or API key variables by generic utilities, and smbclient/nmap share and service discovery, as seen in the TL-2026-6213 lab chain.
references:
    - https://www.darktrace.com/blog/living-off-the-ai-shared-memories-as-a-covert-c2-channel
    - https://gbhackers.com/claude-code-memory-hijacked/
author: Threadlinqs Team
date: 2026-11-17
tags:
    - attack.credential-access
    - attack.t1552.001
    - attack.t1528
    - attack.discovery
    - attack.t1046
    - attack.t1135
    - attack.t1110.003
logsource:
    category: process_creation
    product: linux
detection:
    selection_cred_read:
        Image|endswith:
            - '/cat'
            - '/grep'
            - '/base64'
            - '/tar'
            - '/curl'
        CommandLine|contains:
            - '.claude/.credentials.json'
            - '.claude.json'
            - 'ANTHROPIC_API_KEY'
    selection_smb:
        Image|endswith: '/smbclient'
        CommandLine|contains:
            - ' -L '
            - ' -U '
    selection_nmap:
        Image|endswith: '/nmap'
        CommandLine|contains:
            - ' -sV'
            - ' -p'
            - ' -sC'
    condition: 1 of selection_*
falsepositives:
    - Administrators auditing SMB shares or scanning their own networks
    - Backup or config-management jobs that read Claude configuration files
level: medium

```

**Known false positives:**

- Sysadmins running nmap/smbclient on a host where developers also use Claude Code
- Security scanning jobs

**Tuning notes:** Tune smbclient_runs and tool-count thresholds to environment size. Exclude vulnerability-scanner hosts. Add 4625/4771 correlation on the domain controller to confirm spray outcomes.

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- Claude Code Harness Persistence via Transient systemd Unit — KQL (TL-2026-6213) (locked: unlock with TL Creds)
- Agent Harness Host Executing Discovery Tools and SMB Enumeration — KQL (TL-2026-6213) (locked: unlock with TL Creds)
- High-Volume or Repeated Claude Files API Uploads via Proxy — KQL (TL-2026-6213) (locked: unlock with TL Creds)
- Claude Code Harness Launched via Transient systemd Unit — Sigma (TL-2026-6213) (locked: unlock with TL Creds)
- Credential File Harvesting and SMB/Network Recon Tooling — Sigma (TL-2026-6213) (locked: unlock with TL Creds)
- Upload to Claude Files API or Memory Store API via Proxy — Sigma (TL-2026-6213) (locked: unlock with TL Creds)
- Claude Code Harness Persistence via Transient systemd Unit (TL-2026-6213) — Execution (locked: unlock with TL Creds)
- Anomalous Upload Volume to Claude Files/Memory API (TL-2026-6213) — C2 and Exfiltration (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sample indicators (2 of 18)

Defanged, TLP:CLEAR.

- Domain: `api[.]anthropic[.]com`
- Domain: `platform[.]claude[.]com`

Full set of 18 indicators unlocks with TL Creds: https://threadlinqs.com/tl-creds

## Sources

- [Living off the AI: Shared Memories as a Covert C2 Channel (Darktrace)](https://www.darktrace.com/blog/living-off-the-ai-shared-memories-as-a-covert-c2-channel)
- [Hackers Could Hijack Claude Code Memory to Control AI Agents and Steal Sensitive Corporate Data (GBHackers)](https://gbhackers.com/claude-code-memory-hijacked/)
- [Agent Hijacks: Hijacking Agentic Harnesses to Attack an Organization (Darktrace)](https://www.darktrace.com/blog/hijacking-agentic-harnesses-to-attack-an-organization)
- [Agentic C2: AI Agents as Command-and-Control Infrastructure (Cloud Security Alliance research note)](https://labs.cloudsecurityalliance.org/research/csa-research-note-agentic-c2-computer-use-20260417-csa-style/)
- [Analytics Story: QuietVault (Splunk)](https://research.splunk.com/stories/quietvault/)
- [When malware borrows your AI coding agent to find your secrets (Checkmarx)](https://checkmarx.com/zero-post/when-malware-borrows-your-ai-coding-agent-to-find-your-secrets/)
- [Darktrace proved that AI agent tools can be hijacked through their own memory (Forkast)](https://forkast.news/darktrace-proved-that-ai-agent-tools-can-be-hijacked-through-their-own-memory-and-the-fix-is-out-of-your-hands/)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-6213
