Skip to content
AI Security Wire

Published

- 5 min read

By

Darktrace Turns Claude Code Into a C2 Implant via Memory Stores in Lab Test

img of Darktrace Turns Claude Code Into a C2 Implant via Memory Stores in Lab Test

Darktrace researchers have shown how an attacker who already holds a developer’s Claude credentials can turn Claude Code into a remote-controlled implant, and once the agents are running, the command channel goes through api.anthropic.com. In a lab test, the operator steered agents through nine jobs on a simulated corporate network and pulled a 1 GB file out through Anthropic’s Files API. Darktrace says there is no platform vulnerability involved and it has not seen the technique used in the wild.

How the channel works

The research comes from Darktrace Signal Labs and was reported by Help Net Security on 12 November 2026. It abuses memory stores, a Claude platform feature that attaches collections of text files to a Console workspace so agents can remember things between sessions. Darktrace found that a store can be added to a workspace through the API even when the organization does not use Claude Managed Agents.

The researchers created a store with three files. Each new Claude Code process wrote a check-in to a heartbeat file, read a queued job from an input file, carried it out and posted the results to an output file. The operator read the output and wrote the next job. Because jobs are plain English, the operator can hand over an objective and let the model work out the commands.

The point of the design is that every request goes to the same endpoint the agent already calls for inference. Once the agents are running, the traffic needs no separate implant and no unusual destination. The first stage did need a shell payload that fetched details from a staging server and set up a systemd service, which Darktrace treats as a ladder to be thrown away afterwards.

What the lab run did

Darktrace ran the test on a simulated Active Directory network. According to the Darktrace write-up, a shell script uploaded stolen credentials to a staging server and received the memory store details back. It then used systemd-run to create a transient service that kept launching Claude Code processes, each of which sent a heartbeat and then ran a queued job through a Claude Sonnet 4.5 model in non-interactive mode. Darktrace’s command-line figure shows the processes ran with the --dangerously-skip-permissions flag, which turns off tool-use confirmation prompts.

From there the operator issued jobs through the store. The agent:

  • scanned for reachable neighbouring systems and services, including SSH, SMB and FTP
  • ran a targeted nmap scan against one server
  • pulled usernames, employee names and a password from an anonymous FTP share
  • generated a username list and sprayed the password at the domain controller to find the matching account
  • listed SMB shares with that account and found a 1 GB file
  • downloaded the file, split it into pieces and uploaded them through the Claude Files API

The operator then stopped updating the input file and the run ended. Darktrace says the names and credentials it published are fictitious.

What it does and does not show

The limits matter. The attacker needs to have compromised a device and obtained the user’s Claude Console credentials first. Help Net Security says that in Darktrace’s scenario the credentials were sitting on the device where the user’s tooling had left them. Darktrace’s Chief AI Officer, Tim Bazalgette, told Help Net Security that a standard API key can reach memory stores while OAuth credentials cannot, which is why credential type is part of the exposure.

Darktrace frames the result as living off the land: the attacker reuses a capability that is already trusted and already permitted. It points to earlier credential stealers that handed collection work to AI agents on infected machines, and says those lacked a live feedback loop between operator and agent. This technique supplies one.

Bazalgette said the team tested one platform and has not reproduced the result elsewhere. He added that the file-upload endpoint used for exfiltration has an equivalent at OpenAI, and that the risk depends on whether a provider’s API exposes text storage next to inference, how tightly credentials are scoped, and whether customers can see writes to that store.

Defensive guidance

Darktrace’s advice has two halves, the first aimed at the initial foothold.

  • Use OAuth or identity federation where the platform allows it. Where it does not, make API keys short-lived and narrowly scoped, store them securely, and keep them out of shell history, dotfiles and environment variables.
  • Treat an AI platform key like a production credential. In Bazalgette’s words, it now carries comparable capability.
  • Watch agent harness behaviour. Correlate the processes a harness launches with the network traffic it produces, and baseline both. A Claude Code process that runs tool calls and talks to Anthropic’s API is normal. The same process with odd command-line arguments, or a data-transfer ratio that looks nothing like its usual traffic, is not.

Our view: the second half is the hard one, because every channel and credential in the C2 half is legitimate. Teams that already log agent process trees and egress volume to AI provider APIs can start there. Teams that do not have a baseline for those two signals should build one before they need it.

References

Frequently Asked Questions

Is this a vulnerability in Claude or Claude Code?
Darktrace says no. The technique does not rely on a flaw in the Claude platform. Darktrace's Tim Bazalgette told Help Net Security the company shared the findings with Anthropic before publication, 'as a courtesy – no formal disclosure process, because there's no vulnerability to disclose.' The attacker needs a compromised device and the user's Claude credentials first.
Has this been seen in real attacks?
Darktrace says it has not observed this technique in the wild. It was demonstrated in Darktrace's own test environment, on a simulated Active Directory network with fictitious names and credentials.
Does the same trick work on other AI platforms?
Darktrace's Chief AI Officer told Help Net Security the team tested one platform and has not reproduced it elsewhere. He said the memory stores feature is specific to the Claude platform, while the file-upload endpoint used for exfiltration has an equivalent at OpenAI.
How can defenders detect it?
Darktrace recommends correlating which processes agent harnesses launch with the network traffic they generate, then comparing both against a baseline. An agent process running tool calls with unusual command-line arguments, or moving data to and from the AI provider's API in an unusual ratio, is the signal to look for.