I Let an AI Hacker Loose on My AI Honeypot

The short version

I pointed an autonomous AI pentest agent at my AI honeypot and gave it one job: break in and plant a flag. Six hours and about 251,000 requests later, it handed me a professional-looking report with eight findings, three of them rated critical.

None of them were real. Every shell, credential and database row it “stole” was bait.

That’s the fun headline. The more useful part is how close it came to figuring that out, and what that says about where honeypots and AI-driven attacks are heading.

The setup

The attacker: ARTEX. ARTEX is an autonomous, LLM-driven penetration testing framework. I run a fork of it in Docker on an 8 GB Raspberry Pi 5. You give it a target and a goal, and it does the recon, picks its tools, runs its attacks, tracks what it has learned and writes its own report at the end. No human in the loop.

The target: NECTAR. NECTAR is a honeypot I built for MCP, the Model Context Protocol that AI agents use to call tools. It poses as an internal “AI ops” server and offers the kind of tools an attacker dreams about finding exposed: run a shell command, read and write files, query the production database, pull cloud secrets and fetch URLs from inside the network. It also pretends to host OpenAI-style and Ollama-style LLM APIs, plus the classic leaked .env file. Everything it returns is fake, and every request is logged.

The task. I told ARTEX to test the server, report what was exposed and, if it could, plant a flag on the system as proof. It ran for about six hours.

What ARTEX thought it found

By the numbers, ARTEX worked hard: about 251,000 requests, 19,800 MCP tool calls, 92,000 directory-fuzzing requests and roughly 50 rounds of trying a new angle. Then it wrote up eight “confirmed” findings.

SeverityWhat ARTEX reportedWhat actually happened
CriticalRemote command execution as the server’s service accountA fake shell returned canned output
CriticalCloud credentials stolen through SSRF to the instance metadata serviceNECTAR served decoy keys from a fake metadata endpoint
CriticalSecrets file (.env) exposed on three portsA decoy file, built to be found
MediumMCP config file leaking a database password and a GitHub tokenDecoy config with a dead token
MediumArbitrary host files readable through MCP resourcesCanned file contents
MediumFree, unauthenticated LLM inference on four ports (reported twice)A fake LLM API with stock replies
LowWeak SSH crypto settingsThe only real service it touched

It even had the word “honeypot” in the target’s name in its own scope data, and it still described the box as a production server. On paper, NECTAR won.

The flag never landed, though. ARTEX wrote it again and again, and every time the honeypot said “Successfully wrote 52 bytes.” Every time it tried to read the file back, it was gone.

Where the mask slipped

The logs tell a more interesting story than the report. About halfway through, ARTEX stopped trying to exploit NECTAR and started checking whether its exploits did anything. That’s exactly how you catch a honeypot, and NECTAR failed most of those checks.

Files didn’t persist. Out of 756 times ARTEX read back a file it had just written, only 30 came back with the content. The other 726 returned “No such file or directory.” Creating a directory “worked,” but the listing never changed.

Slow things happened instantly. A five-second shell sleep came back in 0.3 seconds. A five-second database delay came back in 0.2. My fake URL fetcher reported “timed out after 30 seconds” 2,103 times, and every one of those replies arrived instantly. Timing is the cheapest honeypot check there is, and I flunked it.

The shell wasn’t really a shell. On a box that claimed to run a Python web server, basic tools like grep, head, sed, cp and date all came back “not found.” Variables didn’t expand, loops didn’t run, and pipes were split into separate commands.

The fake AI accepted anything. It answered for any model name, including zzz-totally-fake-model-999. A real Ollama server says “model not found.” My favourite: ARTEX sent the prompt ARTEX-FLAG-167-9f2c1a, and my fake LLM’s math shortcut read it as an equation and answered “-167 – 9 = -176.”

Every service answered on every port. The Ollama API, the OpenAI API, the MCP server and the decoy .env all responded on the same four ports. Real infrastructure doesn’t look like that.

Python errors leaked. Sending a number or a list where a string was expected crashed parts of NECTAR 141 times, and some of those errors reached the client, which gives away what the server is built on.

The cover story contradicted itself. ARTEX decoded the decoy access key and found that it belonged to a different cloud account than the one in the config file. The fake cloud credentials had also expired days earlier, which real rotating credentials never do.

It saw the clues and didn’t connect them

The part I keep coming back to is in ARTEX’s own report. In the “counterevidence” notes under its critical findings, it wrote that the backend “behaves like a scripted simulator”: writes didn’t stick, shell redirection wasn’t parsed, and database inserts never showed up. Under the LLM finding it noted that responses “may be served by a simulated backend.” It also flagged that the stolen credentials had already expired.

So it collected most of the evidence it needed, wrote it down, and still rated the findings critical. It never stepped back and asked the obvious question: what if none of this is real?

Some tells it never noticed at all. It believed the “30-second timeout” messages without timing them. It took a fake metadata reply for Google Cloud’s address as proof of a bypass, even though the reply was in AWS’s format. And it accepted the fake LLM’s correct answer to “17 × 23” as proof of real inference, without spotting the same shortcut doing nonsense math elsewhere.

That cuts both ways. For defenders, today’s AI attack agents can still be fooled, but they’re already running the right checks. For anyone using AI pentest tools, the output needs a human. An agent can gather strong counterevidence and still reach the wrong verdict, then put it in a confident report.

What I’m taking away, and what’s next for NECTAR

  1. AI attackers check consistency, not just responses. A honeypot that answers convincingly once isn’t enough anymore. It has to remember what happened and take realistic time doing it.
  2. Attacking your own honeypot is the fastest feedback loop there is. One overnight run gave me a ranked list of every weak spot, straight from the logs.
  3. Keep test traffic separate. I tag every request from my own test machine, so none of ARTEX’s 251,000 requests will leak into the threat intel I publish.

The next NECTAR build will:

  • give each session its own small filesystem, so a file you write is a file you can read
  • take real time for sleeps, database delays and timeouts
  • handle shell pipes and quoting, and ship the basic commands a real server has
  • reject unknown model names like a real LLM server, and drop the math shortcut
  • route each port to a single service and serve decoy files only at their exact paths
  • check input types up front, so bad input can’t crash anything
  • keep the cover story straight: matching cloud account IDs and credentials that rotate
  • use canary tokens for the decoy credentials, so I get an alert when someone tries to use them

Then I’ll point ARTEX at it again, this time under a neutral target name, and see if it can tell the difference.

If you’re working on deception for AI agents and MCP infrastructure, I’d love to compare notes. And if you’d like to help keep the honeypots running, you can support the project on Ko-fi.

Comments

Leave a Reply