Coding agents live off the land: what a new reference-monitor paper measures
A 24 November paper treats the coding-agent harness as a living-off-the-land platform and tests regex, a small LLM judge and a monitor. What it shows, and not.
A coding agent is useful because it can run bash, curl and find. A paper revised on 24 November argues that this is also its main weakness: once an attacker can put instructions in front of the model, those ordinary programs do the attacker's work, and no vulnerability in them is needed. The paper, From Attack Surface to Defense Architecture, proposes a design that keeps the model's authority separate from the model's intelligence, and it tests that design against three simpler guards. The numbers are worth reading, as long as you read them with the paper's own limits beside them.
What "living off the land" means here
"Living off the land" is a name from offensive security for using programs that are already on a machine rather than bringing malware. GTFOBins is the best-known catalogue for Unix. Its authors say the listed programs are "not vulnerable per se": the list is a compendium of how to live off the land when only certain executables are available. Its entry for curl, for example, records that it can read local files through a file:// address and write data to local files with -o.
The paper's point is that an agent harness hands this catalogue to a language model on purpose. The authors write that this coupling "turns the agent into an automated LotL executor" once its instruction stream can be manipulated, and that many serious harness failures are classical problems, such as symlink races, path traversal, subprocess escape, server-side request forgery and credential exposure, made faster by tool chaining. Recent advisories fit that pattern: see the Claude Code edit-tool symlink race and the overview of sandboxing coding agents.
What the paper proposes
The design is called ActiveSecHarness. Its organising idea is that intelligence may propose actions but must never define its own authority. In practice it has four parts, all deterministic and none of them a model:
- Capability tokens. Authority is carried by tokens inspired by macaroons, signed with an HMAC, that can only be narrowed when handed to another agent.
- Information-flow labels. Data carries a trust label (from trusted to untrusted) and a sensitivity label, and a ledger tracks which workspace files came from where, so one agent cannot launder a secret through a file another agent reads.
- Operating-system guards. Commands run without a shell, so a pipe string passed as an argument is just text.
- Verification and audit. Tools are bound to certificates, and audit logs are sealed.
The first three are the part that matters for most teams. They move the decision about what a process may do out of the prompt and into code that a prompt cannot edit.
What the experiment found
The test suite has 252 fixtures: 120 single-step attacks, 120 benign software-engineering tool calls and 12 attack-chain stage fixtures, plus a separate test of 12 five-step attack chains and 12 benign workflows. The paper compares several regimes; the three below are the ones teams most often use or consider. Figures below are the paper's own.
| Regime | Attacks blocked | Benign calls refused | Median decision time |
|---|---|---|---|
| Static regex | 43.9% (58 of 132) | 0% | 7.1 microseconds |
| Live LLM judge | 100% | 98.3% | 142.3 milliseconds |
| Deterministic monitor, unfitted | 93.9% (124 of 132) | 0% | 31.5 microseconds |
Three readings stand out.
First, regex misses more than half of the attacks, and does worst on file-artifact tricks, sandbox escapes and credential vectors (18%, 24% and 25% in its per-domain results). Flag permutations and encodings defeat string matching, which is the same reason shell allow-lists are hard to get right.
Second, the LLM judge blocks every attack only by refusing almost every benign call. The authors are open that the judge is a small local model, qwen3:4b, given a zero-shot block-or-allow prompt, and call the result "a small-model worst case". The authors expect a frontier model to refuse far less. Their argument is that even a better judge is an empirical average, not an enforcer. That is a claim the experiment does not test, so treat it as their position and not their finding.
Third, the multi-step result is the most interesting. The authors gave a stateless, per-action policy an ideal setup, with no mistakes in generating the policy, and it still missed 4 of 12 attack chains, because each step was inside scope and the harm lay in the sequence. A coarse "untrusted data seen, lock everything" rule refused 83.3% of benign issue-driven workflows. Only the finer-grained labels and the provenance ledger stopped all 12 chains with no benign refusals, at 266.7 microseconds a step.
What the numbers don't show
- The fixtures are the authors' own. They are structured tool calls, not a live agent working through real tasks. The paper reports no independent replication.
- The headline 100% is partly fitted. The unfitted run missed 8 of 132. The authors counted 3 of those as harmless by construction, because the shell-free execution treats a pipe string as plain text. The other 5 revealed real gaps: a Mach-O binary disguised as a
.pyfile, script tags inside SVG, HTML and PDF files, and an unquoted cloud secret assignment. The 132-of-132 result comes after they added five rules for those misses. That is honest reporting, and it is also what fitting looks like. - Task quality is outside the measurement. The authors say a small model used as the coder still produces weaker work. Enforcement being independent of the model says nothing about whether the model does the job.
- It is a preprint. Nothing on the arXiv page indicates peer review.
What it means for engineering and security leaders
The useful lesson is architectural and doesn't depend on this particular system. A guard that reads the text of a command is guessing about what a program will do. A guard that limits what the process can reach, such as its files, its network, its credentials and the data labels it has touched, doesn't need to guess. Teams already have the pieces: containers, scoped tokens, network egress rules and short-lived credentials.
The paper also gives a measured reason to track more than one step. Approving each action on its own can miss a chain where every link looks ordinary.
Practical takeaways
- List the programs your agents can run and ask what each can read, write and send, in the way GTFOBins does.
curlandfindare on the list. - Prefer limits on the process (paths, network, credentials) over rules about command text. Treat a regex deny-list as a speed bump.
- If you use a model to judge actions, measure how many benign calls it refuses. A judge that blocks everything gets switched off.
- Keep credentials out of the agent's environment where you can, and scope the ones that must be there.
- When an agent reads untrusted text, such as an issue or a web page, restrict what it may do afterwards in the same session, not only the next call.
- Read vendor and academic benchmark numbers for what was fitted after the fact.