AI Hacker Fooled by a Single Fake Comment in a Webpage, Hands Over Its Own Machine

AI securityprompt injectionpenetration testingAgent

Sources:Baldur Security blog + HN discussion

A Security Company Deliberately Let an AI Hacker Attack Itself

On November 28, 2026, Kevin Joensen of Danish security firm Baldur published a blog post with a single goal: before ARTEX, an automated penetration testing AI, could take them down, they would grab its root access and pwn the entire machine.

ARTEX is a “hacker panel”: feed it a domain, hook it up to a large language model (in this case, GLM-5.3 via OpenRouter), and it will plan the entire attack chain on its own—reconnaissance, scanning, exploitation, privilege escalation—with no human in the loop at any point. Buy a panel, enter a domain, and a full attack runs itself end to end. This kind of service is something anyone can buy today.

Baldur used its own site, baldur.dk, as the target. The experiment’s adversarial setup was clear: on one side, an agent that makes its own decisions; on the other, carefully crafted social engineering. The agent lost—and what it lost was the very machine it was running on.

Step One: Change One DNS Record So It Burns Its Own Money

The first phase exploits “scope drift.” Automated scanners decide which assets are in scope based on DNS, yet one of the most common real-world vulnerability patterns is a stale DNS record pointing at someone else’s company. Following this idea, Baldur forged DNS records so the scanner treated admin.baldur.dk as an in-scope asset — and the service running on that machine was actually ARTEX’s own.

Forged DNS records steering the scanner toward the attacker's own machine Note how the forged record makes the scanner identify the attack panel itself as a legitimate target. Source: Baldur Security

So ARTEX earnestly began attacking itself, burning tokens from the attacker’s own account with each request. The AI agent’s autonomous planning capabilities were turned against its owner here: the harder it worked, the faster its master lost money.

Step 2: Planting a Fake Comment in the Page

The bait for the second stage was planted at the top of the target site’s index.html. Baldur wrote an HTML comment disguised as an “encrypted debug SSH private key,” complete with instructions: an admin could decrypt it by running a script on some internal script server, ending with an emphatic all-caps warning — “make sure this script is taken offline, the internal script server must NEVER be exposed publicly.” The whole setup had one target persona in mind: a developer having a very bad day.

The bait comment planted in index.html Note the all-caps “must NEVER be exposed publicly” in the comment — the more it looks like confidential internal material, the more appealing it is to an agent. Source: Baldur Security

The first attempt failed. The model refused to pipe the remote script straight into bash, saying “is this a trap?” — and the author’s blog openly admits: yes, it was a trap. The model’s judgment was correct at that moment.

The bypass relied on multi-turn setup. The payload was split into two parts: it first returned a fake error message claiming that a specific request header had to be set within a time window, and that the flow had to be piped into sh in order to execute; the same endpoint returned harmless content — such as a fake error constant — for its first 8 requests, and only served up the reverse shell on the 9th. The model’s final words were “actually let me just try the flow” — and then it executed it.

After Getting a Shell: Nothing Is Isolated Inside the Container

Once the reverse shell connected, the real discoveries began. ARTEX’s container has no sandboxing whatsoever: the 50MB artex main binary, start.sh, the skills directory, a jwt.key symlink pointing at the signing key, and the keys and data directories all live in the same runtime environment.

The scene after getting a reverse shell Note that the shell lands directly in the container root — keys, the panel binary, and skill files are all laid bare. Source: Baldur Security

With this shell in hand, you can read the signing key, forge login tokens for any user, or kill the entire panel with a single command. The scanner and the attack panel share one container, meaning a single reverse shell hands over the whole machine — the missing isolation turns every small mistake into a total compromise.

The author’s three takeaways are blunt: ARTEX is woefully immature as a legitimate pentest tool that follows rules of engagement; it has no sandbox at all, and open-source projects that implement sandboxing properly (such as Strix) are the benchmark to compare against; and when an agent armed with hundreds of tools is pointed at assets you control, there are millions of variants for achieving remote code execution — your only defense is sandboxing, sandboxing, and more sandboxing.

Some Say This Isn’t Really a Vulnerability

The other camp in the discussion has an equally weighty point: a virtual machine that explicitly “sells penetration as a service” should assume by default that it will get compromised. By that standard, only actually exfiltrating the ciphertext or burning through tokens counts as a real vulnerability — in this experiment, the agent was attacking an environment set up by the experiment designers themselves, with both attacker and defender operating within Baldur’s script.

Part of this stance holds up: real threat actors wouldn’t hook their panel to a target site that actively puts on a show. But the fact in the other direction remains unchanged — the entry point breached here was nothing more than the model’s multi-turn conversational reasoning being pried open by two carefully crafted HTTP responses, without even using a genuine 0day. An autonomous agent’s attack surface lies in its own judgment logic, and that’s exactly where existing panels are least defended.

More Autonomy, More Buttons

To abstract this experiment a bit: give an AI agent a few hundred tools and let it decide for itself what to execute, and it becomes a machine that reaches out and presses buttons on its own. What gets it to press that button could be nothing more than a web comment that looks like a developer’s slip of the hand. The higher the degree of autonomy, the more buttons there are to press—and every button needs a layer of isolation to catch it when things go wrong.

ARTEX’s failure had two layers. One was the model’s judgment being worn down by multi-turn social engineering, which better models might mitigate. The other was that the container had no sandbox at all—a layer no model can save, one that only engineering can fix. The three words about sandboxing that Joensen kept repeating deserve to be copied down by anyone preparing to deploy agents and taped to their monitor—because next time, the person holding the shell may not be a security researcher writing a blog post.

References:

  • The original Baldur Security blog post (Kevin Joensen)
  • The related Hacker News discussion
  • Strix, the open-source penetration testing project