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
- 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.β
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.