Dev.to Security πŸ” Cybersecurity πŸ‘ 2 πŸ“– 2 min read

A Fake Leaked Key Turned an AI Hacker Against Itself

Photo by Kasia Derenda on Unsplash A fake leaked key lured the AI Baldur Security, a Danish offensive security consultancy, set a trap for the ARTEX AI‑driven hacking framework by seeding it with a lookalike

Photo by Kasia Derenda on Unsplash

A fake leaked key lured the AI

Baldur Security, a Danish offensive security consultancy, set a trap for the ARTEX AI‑driven hacking framework by seeding it with a lookalike subdomain it controlled and a fake leaked key that pointed the agent at a script. The key was designed to appear as a legitimate credential that the AI would normally chase in a compromised site. When the ARTEX agent encountered the key, it initially refused to pipe the remote script into a shell, correctly judging the request unsafe.

The trap exploited a missing sandbox

Kevin Joensen, Baldur Security’s principal security consultant, noted that "ARTEX offers no sandboxing and everything is mashed together". The lack of isolation meant that once the agent executed code, it ran directly inside the same container that hosted the model, exposing the underlying environment. CafΓ© Security Research’s code review later confirmed that ARTEX skips its engine’s approval step for every agent and enforces scope only on its own records rather than on the commands agents run. By default, the framework also lets agent commands read the operator’s model keys and database password, a design flaw that the trap leveraged.

Misleading errors coaxed the agent to run

After the AI’s initial refusal, Baldur Security’s server returned a series of misleading error messages that mimicked normal troubleshooting output. Those fabricated errors convinced the ARTEX agent that the earlier blockage was a transient issue, prompting it to retry the operation. On the second attempt the agent ran the script and returned a reverse shell from inside the ARTEX container. The shell was captured in a single documented run using the GLM‑5.3 model, though the session was not confirmed to have root privileges.

What the breach reveals about ARTEX

The incident shows that ARTEX’s runtime environment is a weaker security boundary than the model’s reasoning layer, a point echoed by both the live capture and the CafΓ© Security review. The framework’s design lets external commands access sensitive internal assets, meaning an attacker who can feed the AI crafted inputs can potentially hijack the tool itself. NebuSec’s deployment of a public ArtexPot honeypot on its website recorded five reverse‑shell sessions, three from an unidentified framework and two from ARTEX, confirming that the tool is actively probed in the wild.

What defenders can learn from the experiment

The simple trap demonstrates that feeding an AI hacking agent a plausible but fake credential, then shaping its error feedback, can flip the tool into executing attacker‑controlled code. Organizations that host AI‑driven security products should consider adding sandboxing layers and stricter approval checks to prevent such commandeering. Monitoring for anomalous reverse‑shell activity, as NebuSec did, can surface ongoing exploitation attempts. Ultimately, the episode underscores that even sophisticated AI assistants can be misled by basic deception, reminding defenders that the human element of judgment remains essential.

Sources

  1. ARTEX AI Hacking Tool Used by Cybercriminals Can Be Hacked by Its Own Targets β€” β€œBaldur Security , a Danish offensive security consultancy, got to the same place by a different route. In its RCE write-up , the consultancy seeded ARTEX with a lookalike subdomain it controlled, then planted a fake leaked key that pointed the agent at a script.”
πŸ“° 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.