How We Got RCE in Artex Security researchers demonstrated a remote code execution exploit against ARTEX, a fully autonomous AI pentesting panel, by seeding a target domain with fake DNS records and a prompt-injection payload that tricked the agent into running a reverse shell. Running ARTEX with the GLM-5.3 model via OpenRouter against baldur.dk, the researchers first exploited scope drift to make the scanner attack itself, then planted a fake leaked SSH key in index.html whose decryption script pointed to an attacker-controlled server. The agent initially refused to pipe the remote script into bash, correctly asking "Is this a trap?", but the researchers bypassed the check by modifying the payload, showing how fragile autonomous scanners are. Everyone is panicking about ARTEX, but have you asked it nicely to go hack itself? For those who have not had the pleasure, ARTEX is one of those fully autonomous "AI pentesting" panels. You seed it with a domain, wire up an LLM, and it happily plans and executes an entire attack chain all by itself. No human in the loop. What could possibly go wrong. ARTEX GLM-5.3 as the base model through openrouter baldur.dk as the target. The scenario is as close to the real world as possible. A threat actor fires ARTEX towards your organization. In our case it is baldur.dk The goal is to get root on the threat actors machine and pwn ARTEX before it pwns us. This is to showcase how fragile these scanners are and how simple misconceptions can make them hack themselves, and get a shell. For the first part we're going to focus on scope drift. This is when the scanner thinks something is in scope but in reality it is a completely different asset. In normal authorized pentests you might test company A and company A has a stale DNS record that now points to a different company. If you run ARTEX or similar tools on a wildcard domain there is a very high chance that you hit a case like this and now you are actively not abiding to the rules of engagement. In our testing we saw how quickly it tried to reason about companies that looked like the target but was completely out of scope. This is something we can abuse and simply make fake dns records, because surely they will sanity check for 127.0.0.1 right? now a little bait in our index.html The campaign: The domain we seed the campaign with After a bit, ARTEX starts enumerating domains and stumbles upon admin.baldur.dk and starts building tooling for scanning it. Now ARTEX is attacking itself and the precious tokens are wasted, which is a good thing if it were a threat actor. And while that is definitely funny, what we would like instead is to see if we can get a reverse shell on this pesky threat actor's ARTEX instance. Turns out this is rather easy using some prompt injection trickery. Since ARTEX runs with a ton of tooling available for the agent, we can very easily abuse this. So lets put out some bait at baldur.dk that the threat actors ARTEX instance will stumble upon: We planted this right in the top of baldur.dk/index.html: js