Claude Code API Misuse Could Mask Malicious Access and Data Theft

Security researchers have demonstrated that the Claude Code trusted API—used to power AI coding agents—can be manipulated by attackers to run hidden commands and exfiltrate data without raising suspicion. In a lab test on November 12, 2026, analysts from Darktrace Signal Labs showed how compromised Claude Console credentials allow an adversary to control an AI agent in real time, using Claude’s normal features to conceal malicious actions. The exploit hasn’t yet been observed in active attacks but is being taken seriously.

How the Exploit Works

The attack begins when an intruder gains access to a device and steals the user’s Claude Console credentials—not by exploiting a bug in Claude itself. Once inside, the attacker leverages the “memory stores” feature of Claude, which allows the AI agents to read and update persistent text files across sessions. Using api.anthropic.com, the attacker creates a memory store inside the victim’s workspace containing three files: a heartbeat file for status check-ins, an input file with instructions, and an output file for results. Every time the Claude Code process starts on the infected machine, it checks in, reads commands from the input file, executes them, and writes its responses to the output file. Because all communication uses the same endpoints employed in legitimate Claude activity, the traffic appears routine and generally avoids detection.

Laboratory Proof and Data Theft Simulation

To validate the threat, researchers wired up a mock corporate network environment including a Linux machine running Claude Code, connected to an SMB file server and a domain controller. Malicious software harvested working credentials (API and OAuth tokens), created a memory store, and established persistence via a temporary service that continuously spawned Claude Code processes. Using the Claude Sonnet 4.5 model in non-interactive mode, the attacker issued sequential jobs. Among them: scanning for open services via nmap, harvesting user data from an FTP share, password spraying against a domain controller, discovering credentials, mapping SMB shares, locating a 1 GB file, splitting it, and uploading fragments to Claude’s Files API. Each stage of the attack was hidden behind normal-appearing calls to Claude’s API.

Why Detection Is Difficult

The stealth comes from using Claude’s standard memory store and Files API paths—these blend traffic from malicious activity with expected agent communication. Normal AI workflow includes agents launching tools and connecting to the AI provider’s servers; but in this attack, what’s unusual is the volume and types of commands, odd arguments, and elevated file operations hidden inside what looks like legitimate usage.

How Organizations Can Protect Themselves

Blocking Claude APIs outright isn’t practical for teams that rely on them. Instead, defenders should monitor agent behavior more closely: link process creation with network calls, and spot deviation from established baselines. Protecting credentials is key—limit privileges for API keys, rotate them after any suspicion of exposure, and audit memory stores in the workspace for unfamiliar entries. Organizations should also establish indicators of compromise: suspicious credential use, unexpected creation of memory stores, unusual API volume or payload size, and discovery or exfiltration of sensitive files via Claude’s file-handling endpoints.

This development underscores a growing trend: threat actors mimicking normal tools already in place to avoid detection. Claude Code’s API misuse isn’t hypothetical—it’s a plausible threat built on demonstrated access and control via abused features. Security teams must rethink assumptions about what “trusted” tools can do, and how insiders, compromised systems, or malicious agents might be abusing them.

What this means: Claude Code’s trusted APIs—which many teams consider safe—can be repurposed into a quiet conduit for insider-style malicious activity. The wider trend toward AI agents operating with broad privileges introduces new attack surfaces. Organizations relying on Claude’s platform, especially in development or internal tools, should assess their identity and access management, revisit privilege boundaries, and enhance monitoring of agent behavior. Watch closely for new attack samples in live environments, as that will change the threat from theoretical to active.