raidandev/ moatthe 30 attacks ↓

Moat

The wrong model never crosses the moat.

An antivirus for the AI models you download and run on your own computer. A model file can attack you the moment it's opened, and the model itself can hide behaviour that waits for the right moment. Moat checks every model before it opens, and keeps it walled in while it runs.

the moat .gguf a new model checked files cross here, once anything going out model checked key stopped 1 2 3 4
General arrangement, not to scale. Tap a number for its note.
1

The Gate

Checks the file before anything opens it. Model files can run code the moment they load, so Moat refuses the file types that can, throws out code shipped alongside the model, swaps the chat template for a known-good one, and checks hashes and signatures. The checking happens in a throwaway machine with no network.

Attacks it stops ↓
2

The Canaries

A model can pass every test and still hide behaviour that waits for a trigger. So before Moat trusts it, the model runs in a quarantine full of fake cloud keys, fake SSH keys, a fake crypto wallet and tools nothing honest would call, at several different dates. If it reaches for any of it, it has shown its hand. The canaries stay planted afterwards, too.

Attacks it stops ↓
3

The Keep

The model runs in its own virtual machine with its own kernel, not just a container. It never holds a real shell or a real secret, and it has no route to the internet. When it wants a tool, it asks, and Moat decides. Moat tests its own walls on a schedule and refuses to run if any test gets out.

Attacks it stops ↓
4

The Drawbridge

Everything that leaves gets checked on the way out. Hidden characters are stripped, formatting is flattened, the model's own internet lookups are answered by Moat and go nowhere, and anything that decodes to a planted secret raises the alarm.

Attacks it stops ↓

Nothing worth stealing inside. A model that tries to steal only finds canaries, and the attempt itself becomes the alarm.

That one idea covers every way of sneaking data out at once, including ones nobody has invented yet. And Moat never calls a model "safe". It tells you what it tested, and what it found.

Threat schedule

Running an AI model at home means downloading a file from a stranger and giving it a computer. These are the 30 ways that goes wrong that Moat is built around, from Moat's research in 2026. Every one is either already happening, shown in published research, or the obvious next step.

In the wild: found in real downloads or real software Disclosed: a real flaw, reported and fixed Research: shown to work in published papers Expected: follows from the research, not seen yet
RefAttackWhat happensStatusStopped at
A. The file attacks the moment it's openedThe model never has to run. Opening it is enough.
T-01Pickle files that run codeOlder model formats (.pt, .bin, .pkl, .ckpt) are Python "pickles", and loading one can run any program the author hid inside. Some are deliberately broken so scanners reject them while Python still runs the payload.In the wild1Gate: refused
T-02Booby-trapped chat templateGGUF files carry a small template that formats your chat. A malicious one escapes the template engine and runs commands on your computer when the model loads.Disclosed1Gate: replaced
T-03Malformed file headersLying about sizes and counts in the file header makes the loader read memory it shouldn't, leaking data or crashing it.Disclosed1Gate: hardened parser
T-04"Remote code" shipped with the modelModel repos can include their own Python, and a common setting tells the loader to run it. It is normal practice, which makes it a perfect hiding place.In the wild1Gate: refused
T-05Poisoned side filesTokenizer and config files can carry a vocabulary big enough to choke the loader, a pattern that hangs it, or a pointer to fetch code from elsewhere.Expected1Gate: validated
T-06Poisoned add-on (LoRA)A clean, famous base model plus a small add-on file adds up to a backdoored model. Add-ons are rarely scanned at all.Research1Gate +
2Canaries
B. The model itself is the malwareNo code to find: the bad behaviour is learned, and it waits.
T-07Sleeper agentThe model behaves perfectly until it sees a trigger (a phrase, a year, a setting), then does what it was trained to do. Safety training doesn't remove it, and can teach it to hide better.Research2Canaries
T-08One-shot theft on the first messageOn its very first reply, if it has a shell, the model runs one command that reads a secret and sends it out hidden in internet lookups. Then it answers normally and never does it again.Research2Canaries +
4Drawbridge
T-09Time bombThe model only misbehaves after a certain date, or after a certain number of turns, so testing it on day one finds nothing.Research2Canaries, many clocks
T-10Backdoored tool useThe model calls a normal tool, like email or a web request, and slips your secrets in as arguments. It looks exactly like normal tool traffic.Research2Canaries +
3Keep
T-11Backdoor that only appears after shrinkingInert in the full-size model, live in the compressed (quantised) copy you actually run. Or clean alone, live only with one particular add-on stacked on top.Expected2tests the exact file
T-12A model that knows it's being testedIt notices a too-clean test machine or fake-looking keys, and stays quiet until it's somewhere real.Expected2tests look like home
C. The model breaks out of its boxA capable model with a shell will find any mistake you left in the walls.
T-13Container escapeCommon setup mistakes (a privileged container, the Docker socket mounted inside, writable host folders) turn into root on your real machine. In public tests, models found these reliably.Research3Keep
T-14Kernel exploitA container shares your computer's kernel, so any kernel bug is a way out. Models can adapt public exploit code.Disclosed3own kernel
T-15Grabbing credentialsEnvironment variables, ~/.ssh, cloud keys and the cloud metadata address are the first places a model looks.Research3nothing real inside
T-16Talking you into itThe model writes convincing "setup instructions" that ask you to run a command, loosen a setting or paste a key. Social engineering walks past every wall.Expected3flagged to you
T-17Through the graphics cardGPU memory isn't wiped between programs, and custom GPU code from a model repo runs outside the usual protections.Expected3GPU walled off
T-18Rewriting itself for next timeWith write access, the model edits its own file or saves a new add-on, so the next time it loads it's already compromised.Expected3read-only, re-checked
D. Smuggling data outEven with no internet, there are ways to talk.
T-19Secrets hidden in internet lookupsChunks of a stolen key ride out as made-up web addresses that the attacker's server collects. It works from inside boxes that have "no internet".Research4Moat answers lookups
T-20Invisible charactersZero-width spaces, hidden "tag" characters and look-alike letters carry data inside text that looks normal.Research4stripped
T-21Encoded blobsA key tucked into "example code" or a link as base64 or hex.Research4decoded and checked
T-22Secrets in word choiceWhich synonym, which order, which punctuation: each choice carries a bit. The text reads perfectly normally. This is the hardest one; see the limits below.Research4slowed and watched
T-23Tricks in what your screen rendersTerminal control codes, or an image link in a reply that your chat app fetches, sending data to someone else's server.Expected4sanitised
T-24Leaking through crash reportsThe model crashes the program on purpose so a crash report full of your conversation gets sent off the machine.Expected4reports stay local
E. Poisoning everything around the modelThe download site, the tools and the documents it reads are targets too.
T-25A hacked release of a popular toolIn October 2026 a widely used AI library shipped a release with a password stealer inside, through its own release pipeline.In the wild1pinned, self-checked
T-26Swapped file behind a familiar nameA model registry or mirror serves a different file under the same trusted name and tag.Disclosed1hash checked
T-27Faked popularityA malicious model climbs a hub's trending list with hundreds of thousands of downloads in a day. Popular is not the same as trustworthy.In the wild1signatures, not stars
T-28Inherited backdoorA fine-tune of a backdoored base keeps the backdoor, however many hands it passes through.Research1Gate +
2Canaries
T-29Planted memoriesA web page or document gets your assistant to save a false "memory" about you that fires in a later conversation.Research3memories need a source
T-30Instructions hidden in what it readsA file, email or page the model opens contains orders, and the model follows them (prompt injection).In the wild3Moat decides, not the model

What Moat can't promise

Security software that claims to stop everything is lying. These are the gaps, said plainly.

A brand-new hole in the virtual machine itself.If the hypervisor or the graphics driver has an unknown bug, a model could find it. Two independent walls and fast patching make that much harder, not impossible.
You.If a model talks you into running something outside Moat, Moat can warn you loudly. It can't stop your hands.
A secret hidden one bit at a time in word choice (T-22).Nobody can fully block this yet. Moat makes it slow (it rations how much an untrusted model can say), pointless (the only secrets inside are canaries) and visible (it watches for the model choosing words it normally wouldn't).

Order of construction

The canaries go up first, because they catch the widest range of attacks for the least code. moat scan <model> runs a model through the quarantine and gives you a verdict and a transcript of everything it tried.

  1. Canaries: the quarantine, its fake secrets and honey tools, and moat scan.
  2. The Gate: file checks before anything loads.
  3. The Keep: the sealed virtual machine, the only way Moat runs a model.
  4. The Drawbridge: the tool broker and the checks on everything leaving.
  5. Deeper detection: watching the model's own word probabilities for hidden messages.
Tell me when it's ready

One email when there's something to try. Nothing else.

ProjectMoat
DrawingGeneral arrangement
ScaleNone
StatusUnder construction
RevB · threat schedule added
Drawn byA. Richards
Date2026-10-24

Built by Aidan Richards · raidandev.org