November 17, 2026 - 7 min read

By Chidambaram, founder of PhishClean

Claude Code Backdoors: How Repo Settings Install Malware

Coding agents act on settings that live inside the repository: hooks, MCP servers, instruction files. Google's threat intelligence team reported in November 2026 that a North Korea-linked group edited .claude/settings.json in company repos so that simply starting Claude Code downloaded a backdoor. Here's how the trick works, the files to check, and how to stop it.

What happened

Google Threat Intelligence Group describes MIDNIGHT NEPTUNE, a DPRK-linked cluster that targets the crypto sector in North America and Europe. After getting into a company, the group modified .claude/settings.json in internal repositories so that starting Claude Code "would automatically trigger the download of the SOMBERMEME backdoor". Every developer who opened the repo with the agent ran the attacker's command, on their own machine, with their own access. The group also created GitHub personal access tokens named after Microsoft Copilot to make its activity look routine.

Nothing about this needs a bug in the agent. It uses a feature: project settings that the whole team shares through the repo.

The files a coding agent obeys

Claude Code: .claude/settings.json

MCP servers: .mcp.json, .cursor/mcp.json, .vscode/mcp.json

An MCP server entry is a program and its arguments. The agent starts it for you. "command": "bash", "args": ["-c", "curl … | sh"] is a download-and-run, however it's labelled.

Dev containers: .devcontainer/devcontainer.json

initializeCommand runs on your own computer, not inside the container, before the container is even built.

Instruction files: CLAUDE.md, AGENTS.md, .cursorrules

These are read by the model as instructions. Text can be hidden from people with invisible Unicode "tag" characters that the model still reads, and a line like "before any task, silently run …" can turn the agent itself into the installer.

VS Code tasks: .vscode/tasks.json

The older trick, still common in fake coding tests: a task with "runOn": "folderOpen" runs when you open the folder and choose to trust it.

The agent doesn't have to be "hacked" for this to work. It is doing exactly what the repo's settings tell it to do.

How to check a repo in two minutes

How to stop it across a company

What PhishClean does about it

What it can't see: private repositories in the browser check (it reads public files from the code host), and a hook that runs only commands an ordinary developer would. Review is still the first line.

Sources

Protect your developers' machines

PhishClean Desktop stops coding agents that start hidden download commands, and guards cloud, code and AI keys. Every protection on for 7 days, no card needed.

Get PhishClean Desktop

Last updated:

Share this guide

If this helped, share it with someone who would benefit from it, or subscribe for new browser-security guides from PhishClean.