Brief · Both
In a lab test, Darktrace turned Claude Code into a remote-controlled implant using stolen Claude keys and memory stores
Darktrace's Signal Labs published research on Nov 12 showing that an attacker who has already broken into a developer's machine and stolen that person's Claude Console credentials can turn the Claude Code agent on that machine into a live command-and-control implant. Once it's set up, the attacker doesn't need a server of their own to talk to it. Instructions go in, and results and stolen files come out, all through Anthropic's own API, so on the network it looks like an AI agent doing its job. Darktrace ran it in its own lab, says it hasn't seen the technique in the wild, and says it doesn't rely on any vulnerability in the Claude platform.
The trick uses memory stores, a Claude platform feature meant to give Claude's managed agents memory that carries over between sessions. A memory store is a set of text files scoped to a Claude Console workspace, and Darktrace found one can be added to a workspace whether or not the company uses managed agents at all. With the stolen credentials, the attacker added a memory store to a workspace the victim belonged to, with three files in it: a heartbeat file, an input file for jobs and an output file for results.
Then a shell script on the hacked Linux machine used systemd-run to create a service that kept launching Claude Code in non-interactive mode. Each run checked in to the heartbeat file, picked up the next job from the input file, did it, and wrote the results to the output file. The jobs were plain English, and Darktrace's operator sent nine of them. The agent mapped the local network, ran an nmap scan, pulled employee names and a password off an anonymous FTP server, generated a list of 190 likely usernames, sprayed that password at the domain controller until it found the account it belonged to, listed that account's file shares, copied a 1 GB file off one of them, split it into three pieces, and uploaded them through Anthropic's Files API.
That last part is the one to remember. The attacker gave orders in plain English and let the agent work out the commands, which lowers the skill bar, and the attacker's orders, the results and the stolen file all went through api.anthropic.com, which plenty of dev machines talk to all day. Darktrace's point is that you catch this by what the agent does on the machine and how much it sends, not by where the traffic goes.
None of this works without the break-in and the stolen keys first, so it's not a reason to rip Claude Code off your laptops. It is a good reason to treat AI credentials as seriously as cloud keys, because stealers are already after them, as I covered in the infostealers brief.
What to do:
-
Treat Claude API keys and Console logins like cloud keys.
- Why: The whole technique starts with credentials stolen off a machine the attacker already controls, and infostealers already go looking for AI tool logins.
- How: Keep API keys out of shell profiles, plain
.envfiles and repos on developer machines, give each project its own key in its own workspace, and rotate them on a schedule. If a laptop is ever compromised, revoke every Claude key and session that was on it, and remove people from workspaces they no longer need.
-
Look for memory stores and uploaded files in your Claude workspaces that nobody created.
- Why: The attacker's channel was a memory store added to the victim's workspace, and the stolen file left through the Files API.
- How: Have a Console admin go through each workspace's memory stores in the Console and list its uploaded files through the Files API. If you don't use Claude's managed agents, you probably shouldn't have any memory stores at all, so any you find deserves a question.
-
Alert when Claude Code is started by a service instead of a person.
- Why: In the lab, a
systemd-runservice kept launching Claude Code in non-interactive mode, with nobody at a keyboard. - How: In your EDR, flag
claudeprocesses whose parent is systemd, cron or a script rather than a user's terminal or editor. On Linux dev machines,systemctl list-units --type=service --allandsystemctl --user list-units --type=service --allwill show transientrun-*units, so check what any of them are running.
- Why: In the lab, a
-
Watch what your agents run and how much they upload.
- Why: Darktrace says normal agent traffic to the AI platform is expected, and the giveaways were unusual command-line arguments and an unusual amount of data going out.
- How: Alert on agent processes launching tools like
nmap,smbclientor password-spraying scripts, and baseline upload volume from developer machines toapi.anthropic.comso a gigabyte going out stands out.
Want the next one?
One email, weekly-ish. The week's briefs, how worried to be, and what to do about it. No doom.
Subscribe on Beehiiv ↗Free. Opens Beehiiv in a new tab. Unsubscribe whenever, I won't be offended.