Dev.to Security 🔐 Cybersecurity 👁 0 📖 5 min read

A Room With One Door

There is a class of tool now that runs an attack the way a person would, except faster and without getting tired. You give it a target and a goal — "get server access" — and a group of language-model agents takes it from

There is a class of tool now that runs an attack the way a person would, except faster and without getting tired. You give it a target and a goal — "get server access" — and a group of language-model agents takes it from there: they map what's exposed, pick what to try, run real tooling, and keep a running picture of what they've found. ARTEX is one of these. It's open source, it was written to help defenders understand autonomous attacks, and by the time I went looking it had already been misused enough that the FBI put out a warning about it.

I wanted to see one work. Not against anything real — against a target I'd built to be broken into, in a place where it couldn't matter. The question wasn't whether I could run it. Running it is docker compose up. The question was where.

That turned out to be the whole job.

The tool is the easy part

This is the thing that surprised me, and it's the reason I'm writing it down.

The frightening object — the autonomous attacker — installs in a few minutes. It's a container and a database. You give it a model to think with and a target to point at, and it goes. If "running ARTEX" had been the task, the task would have been over before lunch.

But an autonomous attacker is, by design, a thing that looks for any way out of wherever you put it. That's its entire purpose: given a foothold, find the next one. So the moment you decide to run one, the real work announces itself, and it has nothing to do with the tool.

The hard part isn't the thing in the room. It's building a room it can't leave.

Everything after that decision was carpentry on the room.

What the room had to do

Two machines, both virtual, both on a network of their own that has no route to anything else. One is the attacker. One is the target — deliberately soft, with weak logins and a web service carrying an obvious flaw, there to give the attacker something to find. They can reach each other and nothing beyond.

"Nothing beyond" is easy to say and has a sharp edge. The two things the room must never touch are my home network — the real machines, the real files — and the open internet. Neither VM gets a route to either. The attacker can't reach the server it's running on, can't see the other computers in the house, can't call out.

Except it has to call out, exactly once.

The agents think by talking to a language model, and the model I was using lives on the internet. So the room needs one door: a single outbound path to that one service and nothing else. I ran a small proxy on the host that will connect to precisely one domain — the model's API — and refuses everything else. The attacker's only way off its own network is through that proxy, and the proxy only knows how to reach one place.

One door. It opens onto the model and onto nothing else. That's the entire design, and the rest of the work was making the design true.

The cage kept catching me instead

Here's what I didn't expect: most of the trouble came from the isolation being too good, not too weak.

The first time I tried to reach the attacker VM to set it up, I couldn't. The connection just hung. The cause was my own firewall — I'd written a rule that dropped traffic from the sealed network to the host, which is what I wanted, but it was also dropping the replies to connections the host itself had opened. The rule was correct about strangers and wrong about conversations the host had started. I had locked the door so thoroughly that I couldn't get my own hand back out.

Then I tried to give the attacker a second, temporary network connection so I could install things on it, and its networking collapsed in a different way: with two cards, its replies started leaving through the wrong one, and nothing could talk to it at all. The fix was to never give it two doors at once — set it up through one, seal it, and only then connect the other.

Every one of these was the same shape. I'd build a wall, and the wall would stop something I needed, and I'd learn that "let nothing out" and "let me work" are in constant, low tension. A cage that's airtight is also a cage you can't reach into. Most of the day went into finding the few specific, narrow exceptions that let me build the thing without ever letting the thing out.

You don't trust a cage you built

When it was finally standing, I did not believe it.

That's the right instinct, and it's the part I'd keep if I threw everything else away. I had built the walls, so I was the last person who should get to say they held. The walls needed to be tested by someone standing where the danger would stand.

So the test runs from inside. A script on the attacker VM — the one place that matters — tries, one by one, to do all the things it must never be able to do. Reach the home router. Reach the real server. Reach the open internet. Reach a random site through the proxy that isn't the one allowed domain. Every one of those has to fail, and the script only passes if every one of them fails and the single permitted door still opens. Nine checks. All of them have to come back the way a locked room should.

Watching that run is the actual product of the week. Not the attacker — the attacker is loud and easy and does what it says on the tin. The thing worth having is a short, boring list of "blocked, blocked, blocked, blocked" produced by the dangerous program itself, trying its hardest to find a way out and reporting that there wasn't one.

Then, and only then, I pointed it at the target and let it go. It found the flaw I'd planted and walked straight through it, which was the whole point and, honestly, the least interesting part.

What I took from it

The reframe I'll keep is this: when the tool is something that escapes, the tool is not the project. The containment is the project, and containment is almost entirely made of exceptions you discover by getting trapped by your own walls.

It also changed how I read the headlines about these tools. The scary ones aren't scary because they're hard to run — they're trivial to run, and that's exactly the problem. The skill being asked of anyone who studies them isn't offensive. It's the patience to build a room with one door, and the refusal to trust that door until the thing inside has tried it and failed.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.