Key icon over a green square with a red malware badge on dark network background.

Can Infostealers Steal AI Agent and Coding Assistant Credentials?

Table of Contents

Check your exposure

Takeaways

Infostealer malware copies saved credentials, cookies, and files from an infected device and sends them to an operator, who sells them as logs. Until recently, those logs held browser passwords and cookies. Developers now also run AI coding tools, and the tokens and keys those tools store connect to source control, cloud services, and pipelines. Stealers collect what buyers pay for, and underground shops now sell AI subscriptions and application programming interface (API) credit at steep discounts.

This post covers what infostealers take from AI agents and coding assistants, why the stolen tokens get past MFA, and what to revoke after an infection.

The blind spot IAM and ITDR share, when compared to identity threat protection, isn’t simply a technical distinction. Criminals actively exploit that blind spot, correlating stolen identity data across an employee’s past and present, personal and professional accounts to find entry points that none of your internal tools were ever positioned to see. And they increasingly don’t need much skill to do it, either. 

What infostealers take from AI agents and coding assistants

Infostealers reach AI credentials by two routes, and the malware involved differs by route.

The first is the signed-in session. In late August, Anthropic warned Claude users that infostealer infections on their computers had let attackers hijack login sessions and run up usage, and the families it named include Vidar, Lumma, StealC, RedLine, Acreed, and Atomic Stealer. 

Okta found the same pattern in a leaked log dump from 5,871 infected machines. Of its 44,791 unique JSON Web Tokens (JWTs), a common format for proving user login, 555 likely belonged to AI services, and the dump also held 24 still-valid API keys.

The second route is local files. Coding agents and AI desktop apps write tokens, keys, and configuration to a disk, and a stealer that already sweeps predictable folders for browser data can add those folders to its list. 

SpyCloud has recaptured logs from two families that do this, WardenStealer and Aoki, and Gen Digital has documented AI agent collection in Remus and Amatera as well. Okta noted that newer variants have added explicit rules for AI provider API keys and known AI tool configuration paths. These are the same commodity malware-as-a-service stealers that have circulated for years, pointed at a new set of files.

Session cookies and tokens

A session cookie or token tells a service that someone already signed in. Whoever presents one is treated as that person, so a copied token carries the victim’s access with it. The logs SpyCloud analyzed contained:

Config files and MCP credentials

The Model Context Protocol (MCP) is the standard that lets AI assistants connect to outside tools, databases, and services. Each connection needs a credential, and those credentials sit in local files. In WardenStealer logs, the Claude Code credentials file held tokens for connected MCP servers alongside the account’s own tokens, and the account configuration and the CLAUDE.md instruction file were collected too. A stolen instruction file or MCP configuration also describes the environment those tokens reach into, which tells an attacker where to go next.

Credentials like these belong to non-human identities (NHIs): API keys, tokens, and service accounts that act for software instead of a person. Critically, they don’t change when the person changes a password.

AI tool What the recaptured logs contained Seen in
Claude Code OAuth credentials file with access and refresh tokens, including tokens for connected MCP servers, plus account configuration and the CLAUDE.md instruction file WardenStealer; Aoki collected the credentials and account configuration
Codex Authentication file with an OpenAI API key and access and refresh tokens, plus its configuration WardenStealer and Aoki
Claude Desktop Configuration and plan-usage history; session cookies from the Microsoft Store build WardenStealer (configuration); Aoki (cookies)
ChatGPT Desktop App Session cookies from the embedded web session Aoki
GitHub Copilot and Cursor Token files Aoki

Why stolen AI tokens get past MFA

MFA verifies a person at the moment of sign-in. The service then issues a session cookie or token that stands for that sign-in, and subsequent requests present it instead of a password. A stealer copies the token from the device, and the attacker replays it from their own machine, often in an anti-detect browser, a tool designed to use stolen authentication data while avoiding security controls. The service sees a request that matches an existing, already verified session, so no password check or MFA prompt happens. API keys skip sign-in entirely, because the key is the credential.

Passkeys don’t change this. Okta’s research makes the point that phishing-resistant methods make password takeover harder, but do not stop a stolen session token or API key. The same replay follows phishing kits that relay a real login, and it is a routine technique: stolen session cookies and tokens now make up nearly half of the identity assets SpyCloud has recaptured.

One control targets replay directly. Google’s Device Bound Session Credentials tie a Chrome session to the device that created it, so a copied token fails on another machine. It covers browser sessions on supported setups, and it doesn’t reach API keys or the token files that coding agents write to disk.

What to revoke after an infostealer infection hits an AI tool

Order matters. Anthropic’s notice to affected users says signing out ends the stolen sessions but leaves the malware in place, so the infected device gets cleaned first. A stealer that is still running copies every new token the user creates. 

Work through the steps below from a clean device, and treat AI tool credentials as in scope for any infostealer investigation on a developer’s machine. The post-infection remediation use case covers the wider process.

AI platform sessions and API keys

MCP connections and service credentials

A password reset alone leaves much of this access in place, which is why each step above happens at the platform or service that issued the credential.

How SpyCloud helps security teams act on stolen AI credentials

Revocation starts with knowing a device was infected and what it lost, which most organizations learn only after misuse shows up. SpyCloud recaptures infostealer logs from criminal infrastructure, including logs from WardenStealer and Aoki, so it can see what these families took instead of inferring it from malware analysis. Endpoint Threat Protection flags infected devices and the cookies stolen from them, which tells a team which machines and accounts to start with.

For tools that sign in through the identity provider, Okta Workforce Guardian and Entra ID Guardian can revoke exposed sessions and refresh tokens automatically or after the team approves each action, and SpyCloud automates credential resets in as little as five minutes from discovery. Sessions and API keys held directly at an AI platform still need revocation through  that platform, as the steps above describe.

See what stealers took from your workforce. Request a demo to see exposed identities, including infected devices and stolen sessions, matched to your people and resolved in the tools you already use.

Your organization's data may already be exposed.

Billions of assets from this year’s identity events are circulating right now.

FAQs

Most organizations can’t tell from the AI platform alone. Signs include sessions the user doesn’t recognize, new API keys, and usage or billing spikes, and some providers now notify affected users, as Anthropic did. Recaptured stealer logs give a direct answer, because they show whether a specific device’s tokens and keys were taken.

For local token and configuration files, SpyCloud has analyzed WardenStealer and Aoki, and Gen Digital has documented AI agent collection in Remus and Amatera. For browser and desktop sessions, Anthropic named Vidar, Lumma, StealC, RedLine, Acreed, and Atomic Stealer in its warning to Claude users.

It varies by service. A stolen token works until it expires or someone revokes it, and refresh tokens can keep generating new access for longer than the original token lasts. Okta found that many tokens in a leaked August 2026 dump were still unexpired on the day it was released, so waiting for natural expiry leaves the window open.

Generally no. Session tokens and API keys are separate credentials, and much of the access they carry survives a password reset. Anthropic’s notice asks affected users to change credentials and revoke sessions, which are two separate actions.

Keep reading

SpyCloud comparison icons showing checks and crosses.
Comparing SpyCloud Alternatives and Competitors
Compare SpyCloud alternatives and competitors, and learn how to evaluate identity threat detection and response platforms on data and automation.
SpyCloud image about infostealers targeting AI tokens and config data.
IntelStealers: the infostealers going after AI tokens and AI configuration data
Commodity infostealers have added a new target: the OAuth tokens, API keys, and session cookies that local AI coding tools store on developer machines. SpyCloud digs into WardenStealer and Aoki logs to show the impacts of these new emerging families.
Retail store rack of empty hangers with blurred background.
Identity Threats Hit Retail Where Security, Fraud, and Operations Meet
See what SpyCloud’s 2026 research reveals about government identity threats, including visibility gaps, NHIs, third-party exposure, and remediation maturity.

Check Your Company's Exposure

See your real-time exposure details powered by SpyCloud.