Hackers Target Claude, Cursor and Codex AI Agents to Steal Tokens and Prompt Histories

Blog WriterCybersecurity News - Original News Source is cybersecuritynews.com

Spread the love

Cybercriminals are widening the reach of information-stealing malware by targeting the local data created by AI coding agents.

The shift puts access tokens, saved connections, prompt histories, and project records at risk on already infected computers. The activity does not point to a newly discovered flaw in Claude, Cursor, or Codex.

Instead, it shows criminals adapting established stealers to collect valuable files stored in predictable local folders, a concern echoed in reporting on Claude session theft involving browser-based account access. Analysts at Gen Digital identified the expanding collection rules after examining recent malware activity.

Gen Digital said in a report shared with Cyber Security News (CSN) that the findings concern locally installed development agents, not a direct compromise of an AI model or agent.

The impact can extend well beyond a single paid account. A stolen archive may give criminals both a reusable way into an account and the context needed to identify sensitive projects, connected services, and people worth targeting with follow-on fraud or phishing.

Hackers Target Claude, Cursor and Codex AI Agents

Over a three-month period, Gen Digital recorded Amatera and Remus detections among tens of thousands of protected Windows users.

Amatera focused on data linked to Cline and Continue, while Remus targeted Claude, Cursor, and OpenCode, indicating that agent data has entered the broader infostealer economy.

CallbackBeaver has also added Cursor and Claude to its collection scope, with more than 5,000 samples seen in a 30-day period.

BeeStealer, STG Stealer, HydraStealer, APEX Stealer, and Otter Stealer illustrate how quickly the technique is spreading, while macOS-focused Djinn Stealer has been associated with Claude, Codex, Gemini, Cline, OpenCode, and Kilo.

What stealer is looking for (Source - Gen Digital)
What stealer is looking for (Source – Gen Digital)

Criminals do not necessarily need to rebuild a payload to add a newly popular tool. Many stealers use remotely managed rules that specify folders, file names, databases, extensions, and search limits, so adding another target may amount to a configuration update delivered to machines that are already compromised.

That low barrier matters because a local agent directory can contain far more than settings. Security teams investigating AI agent artifacts should consider authentication files, conversation databases, recent-project data, and connected-service settings as high-value endpoint material, alongside browser profiles and cloud command-line credentials.

Stolen Tokens Expose Work Context

Some agents keep access tokens or refresh tokens locally to avoid requiring a fresh login every session. A stolen access token may let an attacker use an account until it expires, and a refresh token can sometimes extend that window, enabling paid API abuse or resale of working access.

MCP configurations can raise the stakes further. These files may hold endpoints, headers, environment variables, API keys, or other authentication details for external tools, meaning reusable secrets could expose source control, ticketing, databases, cloud resources, or collaboration services connected to the agent.

Prompt histories and transcripts are equally useful to intruders. Developers often use assistants to examine code, analyze logs, and solve incidents, and their chats may reveal source code, internal hostnames, repository names, deployment details, or secrets pasted during troubleshooting.

Related MCP security weaknesses show why connected tools need careful oversight. Organizations should inventory the agents in use, review what they store locally, and use operating-system-protected credential storage where available.

They should keep passwords, private keys, API secrets, and customer data out of prompts, give connected tools only necessary permissions, and favor short-lived, narrowly scoped tokens.

After a suspected stealer infection, responders should work from a clean device to revoke AI sessions, rotate API keys and other connected credentials, review account activity, and determine whether local conversations exposed company information.

Multi-factor authentication remains important, but it may not prevent replay of a token that malware has already copied. Users should also keep endpoints and applications updated and avoid ClickFix or FakeCaptcha instructions, cracked software, and unofficial installers, which are common delivery routes for stealers.

Teams deploying coding agents at scale can apply lessons from AI agent approval flaws by reviewing trusted projects, connections, and access boundaries before they become an attacker’s shortcut. The targeting will likely grow as workplace adoption expands.

Keep your SOC up to date on active malware & phishing within 24h of their emergence. Try ANYRUN to prevent incidents with early detection.

The post Hackers Target Claude, Cursor and Codex AI Agents to Steal Tokens and Prompt Histories appeared first on Cyber Security News.