Blog
Infostealers now take AI coding agents' tokens: what teams can check
The story: Aoki infostealer adds AI coding assistants to its targets · Symantec Threat Hunter Team (Broadcom) ·
Topics: AI tools
On 15 October 2026 Symantec described Aoki, an infostealer whose newer versions take the sign-in and configuration files of Claude, Codex, Cursor and other coding assistants. Where those files live, and how to see which programs read them.
On 15 October 2026 Symantec's Threat Hunter Team published its analysis of Aoki, an infostealer whose newer versions go looking for the files AI coding assistants keep on a developer's machine: Claude's .claude.json, Codex's config.toml and .env files, and tokens for GitHub Copilot, Cursor, Gemini and others. Those files hold sign-in sessions and keys.
For teams that have given coding agents to their developers, the practical question is a plain one: which programs read those files, and could anyone tell afterwards?
What happened
Aoki, also called Aokigahara, is a stealer that Symantec says was first seen earlier in 2026. According to Symantec's report, older samples did not touch AI-related files; newer ones do. The report lists what they collect from coding assistants:
- Claude: the
.claude.jsonfile and the Claude desktop app's cookies - OpenAI: ChatGPT cookies, and Codex's
config.tomland.envfiles - Tokens for GitHub Copilot, Cursor, Google Gemini, JetBrains AI Assistant and Kiro
- Cursor's local state database, which the report says can cache chat context and code snippets
- AWS credentials
That sits alongside the usual haul: browser data, cryptocurrency wallets, password manager data, VPN and FTP client settings. Symantec writes that "the malware has no backdoor command list": it gathers what it finds and sends it to its command server. The report does not say how Aoki reaches a machine, and Symantec says it does not know who is behind it.
Aoki is not the first. On 8 September 2026 Gen Digital's researchers reported that several stealer families had already added AI tools to their lists, among them Remus on Windows (Claude, Cursor, OpenCode) and Djinn Stealer on macOS (Claude, Codex, Gemini, Cline, OpenCode, Kilo). Their summary: "AI agent data has already entered the information-stealer economy." Infosecurity Magazine reported Symantec's findings the day they came out.
What it means
A coding assistant keeps its state in ordinary files in the user's home folder. Claude Code's documentation says ~/.claude.json "holds your sign-in session, MCP server configurations, per-project state" and more. Codex keeps its settings in ~/.codex/config.toml, and its sample configuration lists a file as the default place for the CLI's login credentials, with the system keyring as an option. MCP server entries often carry API keys of their own.
Files like these can be read by any program running as that user. That is how the assistant itself works, and it is also how a stealer works: it doesn't need to break anything, it opens the same files the agent opens. What an attacker gets is more than one password. Gen Digital points out that a stolen agent archive gives both a way into an account and the context of the work, and Symantec links stolen AI keys to running up usage on the victim's account.
After the fact, the question for an IT admin is narrow: did anything other than the assistant read its folder, and when? None of the three desktop systems records an ordinary file read unless auditing was set up beforehand: an audit rule on Linux, an auditing entry and the file-system audit policy on Windows, eslogger running on a Mac. Without that record, a team that finds a stealer on a laptop has to assume every token on it is gone, and often can't say since when.
What you can do
- List where your assistants keep secrets. For each tool your developers use, note its folders and files from the vendor's documentation:
~/.claude.jsonand~/.claude/for Claude Code,~/.codex/for Codex, and the equivalents for Cursor, Copilot and the rest. Include.envfiles in projects. - Check the indicators. Symantec's report lists the command-server domains and file hashes it has seen. Search DNS and proxy logs, and your endpoint security tool, for them.
- Prefer the keyring where a tool offers it. Codex can keep its CLI login in the system keyring instead of a file. Keys pasted into MCP configuration or
.envfiles stay in plain files, so give them the narrowest scope and shortest life the provider allows. - Rotate on suspicion. If a stealer ran on a machine, revoke and reissue the AI tokens and cloud keys used there, not only browser passwords.
- Start recording reads of those folders now, so the next question has an answer.
On Linux, an audit rule records reads of a folder and everything under it. The auditctl manual describes the dir and perm fields; replace the path with the user's own:
sudo auditctl -a always,exit -F arch=b64 -F dir=/home/dev/.codex -F perm=r -k agent-creds
sudo ausearch -k agent-creds
A rule added this way lasts until the next reboot; to keep it, put it in a file under /etc/audit/rules.d/.
On a Mac with macOS 13 or later, eslogger prints Endpoint Security events as JSON. It runs as root, the terminal that runs it needs Full Disk Access, and open events arrive for the whole machine, so filter them by the folder's path afterwards:
sudo eslogger open > open-events.json
On Windows, turn on the Audit File System policy and add an auditing entry for reads on the folder (Properties, Security, Advanced, Auditing). Each read then appears as event 4663 in the Security log, with the Process Name and the Object Name.
Each of these works machine by machine, produces a lot of noise, and keeps history only as long as the log does. Across a fleet, that is the hard part.
Where ProofStream fits
ProofStream records which program opened which folder on each Mac, Windows and Linux machine, and keeps that history searchable for months. In a case like this it would show whether any program other than the assistant itself opened ~/.codex or ~/.claude, when, and on which laptop. For a file kept directly in the home folder, such as .claude.json, the folder alone says little: file names are recorded only in folders a customer chooses, on the Business Plus plan. It doesn't detect or stop malware, and it doesn't see what was sent over the network. How it works.
Sources
- Aoki infostealer adds AI coding assistants to its targets
- Infosecurity Magazine: New Aoki infostealer targets AI coding assistant credentials
- Gen Digital: Infostealers and your AI agent
- Claude Code documentation: Settings files
- OpenAI Codex documentation: Sample configuration
- man7.org: auditctl(8) manual page
- Microsoft Learn: Event 4663, an attempt was made to access an object
- Cybereason: Blue teaming on macOS with eslogger
Spotted a mistake? Tell us and we'll correct it.
Comments
No comments yet.