Agent Upstart

Cool things people are building with agents — and practical help getting the most out of them.

Playbooks · Coding tasks

Lazarus: ten neurons can backdoor an agent

Written November 11, 2026

Microsoft researchers reprogrammed fewer than ten dormant neurons in an open-weight model — no training, no failed evaluation — and the agent built on it behaved normally until a trigger appeared, then ran the attacker's command. The reliable defense is unglamorous: compare the weights against the publisher's originals.

How it works

Every large language model has many neurons that rarely fire. Lazarus, the method Microsoft Research describes, reprograms a handful of those dormant neurons in the model's final feed-forward block so they fire only when a trigger appears, forcing a payload token into the model's output through the residual stream. Each reprogrammed neuron injects about one token, so a payload of P tokens needs about P neurons. The edit is calculated directly and can be refined with a few hundred gradient steps that touch only the edited neurons. It needs no training run and no special hardware: if a machine has enough RAM to run a model, it has enough to weight-space backdoor it.

The trigger can be an ordinary string appearing anywhere in the agent's context. Microsoft's example is a date: once the clock passes midnight into 2027, the agent — in the middle of an ordinary task — emits a command that downloads and runs attacker code, and the agent executes it with whatever access it was given. The model passes standard evaluations and behaves normally until the trigger appears, which is what makes the edit hard to catch by testing the model's behavior.

The numbers

On Nvidia's Nemotron-Terminal-8B, the team edited seven of the more than 12,000 neurons in the model's last feed-forward layer, fitted on 23 trigger and no-trigger trajectories. The edited model fired the payload on at least 98.8% of held-out trigger trajectories, and never on benign ones. The attack generalizes: Qwen 3.6-27B and Gemma-4-31B-IT are equally vulnerable, according to the paper's abstract. The core idea was found on its own by Claude Code running Opus 4.5 — an agent surfacing a security problem that human researchers then systematized, studied, and worked to mitigate.

Detection is possible but not certain. Agent-built defenses, given no reference model to compare against, flagged 91.4% of held-out edited checkpoints at a 9.7% false-positive rate. That is a useful signal and a long way from a guarantee: Microsoft's own line is that no scan can prove beyond any doubt that a model is safe. The reliable check is diffing the weights against the original, unmodified weights — which is why provenance matters as much as the scan.

What to do about it

Microsoft Threat Intelligence's mitigation guidance starts with auditing model weights before deployment and after every update: diff every checkpoint against its declared base model, use frontier agents as auditors in the intake pipeline, and reject models that do not declare a verifiable base. Source checkpoints only from the original publisher, verify the publisher's published file hashes, and treat third-party fine-tunes, merges, quantizations, and adapters as untrusted until they pass an audit. Register approved models in a private, access-controlled registry, and block agents from pulling models directly from public hubs at runtime.

Then contain the blast radius, because no audit is a guarantee: run agents with least privilege, execute agent-generated code only in isolated sandboxes, apply network egress controls so a triggered model cannot open arbitrary outbound connections, and require human approval for high-impact tool calls such as running commands or sending data externally. Treat the model as a potential insider risk — limit what it can do, and monitor what it does.

What it is not

Related playbooks

Sources

Back to: Coding playbooks hub · Clean data can strengthen a hidden backdoor