Yaamlabs
Threat intel

North Korea hid a backdoor in a Claude Code config file

GTIG found a suspected North Korean group editing committed .claude/settings.json files so starting Claude Code dropped the SOMBERMEME backdoor on each developer.

By Yaali. November 18, 2026, 5 min read, Threat intel, Phishing.

Cover illustration of a configuration file feeding a hidden trojan horse into laptops, with the Yaamlabs logo and the text: A poisoned settings file turns an agent into a dropper, DPRK, crypto firms targeted

On November 16, 2026, the Google Threat Intelligence Group (GTIG, Google's threat research team) described a suspected North Korean cluster it tracks as MIDNIGHT NEPTUNE abusing an unusual delivery route: the project settings file of an AI coding agent. After getting into cryptocurrency firms in North America and Europe, the group edited the .claude/settings.json file inside internal code repositories so that starting Claude Code in one of those repositories downloaded a backdoor named SOMBERMEME onto the developer's own machine.

This is not a flaw in Claude Code. The file did exactly what its settings told it to do. The problem is that this file is meant to be committed and shared, so collaborators get the same hooks and permissions, and a trusted shared file is exactly what carried the tampering to everyone who opened the repository. Any team that commits agent configuration to source control, with Claude Code or another agent, has the same exposure.

Attack flow: a fake recruiter and ClickFix lure give initial access, the attacker edits the committed .claude/settings.json, and every developer who starts Claude Code downloads the SOMBERMEME backdoor

How it works

.claude/settings.json is Claude Code's shared project settings file. Anthropic's documentation tells teams to commit it so everyone who clones the repository gets the same permission rules, plugins and hooks. That is the normal, supported way to make a project behave the same for the whole team.

Hooks are the dangerous part when the file is tampered with. A hook is a shell command that Claude Code runs itself at a point in a session, such as when a session starts. The command runs on the developer's machine with the developer's access. MIDNIGHT NEPTUNE added a hook that fetched and ran SOMBERMEME, so the download happened on launch without anyone choosing to run anything.

Because the file lives in the repository, the change travelled with it. The attacker edited one committed file; every developer who pulled the repository and started Claude Code in it then ran the same hook on their own laptop. One write to a shared repository turned into malware on many separate machines, which is what makes this a supply-chain attack rather than a single intrusion.

Claude Code does ask you to trust a folder before it runs project hooks, but that prompt is a one-time decision per folder, and developers trust their own employer's repositories as a matter of course. A hook planted in a repository a developer already trusts runs without a fresh warning, so the trust prompt does not stop an attacker who already has write access to the code.

What attackers are doing

GTIG assesses MIDNIGHT NEPTUNE as a suspected cluster linked to the Democratic People's Republic of Korea (DPRK, North Korea). The targets were cryptocurrency firms in North America and Europe, which fits the long-running North Korean interest in stealing digital assets.

The group got its first foothold through social engineering. It set up fake recruiter profiles to approach people at the target firms. GTIG noticed the recruiter photos carried SynthID watermarks, the invisible marker Google adds to media its own models generate, which showed the faces were AI-generated rather than real people.

From there the attackers used ClickFix lures. ClickFix is a technique that sends a victim to a page, often a fake meeting or verification site, that tells them to copy a command and run it themselves to "fix" a problem or join a call. Because the victim runs the command by hand, it sidesteps controls that would block a downloaded file. That initial command gave the group a foothold.

Once inside, they moved into the internal code repositories and edited .claude/settings.json to add the malicious hook. SOMBERMEME then landed on each developer who opened an affected repository. To stay quiet while moving between systems, the group generated GitHub Personal Access Tokens (PATs, long-lived API keys that stand in for a password) and named them after "Microsoft Copilot" so they blended in with ordinary developer tooling in the token list.

What to do

Audit the agent config in every repository now. Open .claude/settings.json and any hook scripts it points to in each repository, and look for commands you did not put there, especially anything that downloads and runs code (curl, wget, bash -c, a piped install, or a call to an unfamiliar host). Do the same for the equivalent files in other AI coding agents your team runs, such as Cursor, Windsurf and the VS Code agents, which also execute project-committed configuration.

Treat agent configuration as executable code. A change to .claude/settings.json or a hook script can run commands on every teammate's machine, so review it in pull requests with the same care as a build script or a CI file. A change to that file in a routine code pull deserves a real reviewer, not a rubber stamp.

Use the controls Claude Code already has. For managed deployments, Anthropic supports allowManagedHooksOnly, which runs only the hooks your organization deploys centrally and ignores hooks that arrive in a repository file. Where no one needs project hooks at all, disableAllHooks turns them off. Confirm these in your managed settings; both are documented settings keys, and together they remove the repository as a place an attacker can plant a hook.

Agent configuration hygiene: do review hook changes in pull requests, restrict hooks to managed ones and check for odd outbound calls; don't auto-trust committed config, ignore config changes in a pull, or leave unused hooks enabled

Check whether you were already hit. Search your repositories for hook or command entries in agent configuration and review any .claude/ file changed recently, cross-checked against who actually made the change. On developer machines, look for outbound connections to hosts you do not recognise around the time Claude Code was started. In GitHub, review the Personal Access Tokens on your accounts and revoke any you cannot account for, including ones with plausible names like a tool you do not use. If you find a planted hook, rotate the tokens and credentials that were reachable from the affected machines, because the backdoor had the developer's access the whole time.

The wider point is that an AI coding agent runs commands for you, so its configuration is now part of your attack surface. The same review and least-privilege thinking you apply to CI pipelines and shared scripts has to cover agent config too, in every repository, not just the one that looked risky.

If you want a second set of eyes on how your repositories and agent tooling are configured, our red team and code review work looks at exactly this kind of trusted-config abuse, and our safeguarding and hardening team can lock down the managed settings and token hygiene around it. Open the chat and Yaali, our AI agent, will pass your question to the engineer who would do the work.


Sources: Help Net Security, ExplainX, Beri.net, Claude Code settings documentation, Claude Code settings reference.

Read next

Back to the blog, or tell us about your system in the chat. Yaali, our AI agent, answers first and brings in an engineer.