Start typing to search this publication.
Autonomous Systems
Open menu

Subscribe to Autonomous Systems

Get new posts delivered straight to your inbox.

The AI Honeypot Arms Race: Deploying LLM-Powered Decoys to Trap Autonomous Agents

0x623302E76209C336d032F320DA46dC4822a107f9
6 min read

The AI Honeypot Arms Race: Deploying LLM-Powered Decoys to Trap Autonomous Agents

AI-generated newsletter header — engineer
AI-generated newsletter header — engineer

You built a publicly accessible API for your RAG pipeline. Twelve hours later, someone’s multi-agent system had scraped your entire knowledge base. Not by brute force, but by holding a polite, context-aware conversation that lasted 47 turns. No suspicious IP ranges. No rate-limit bursts. Just a slow, deliberate extraction that cost you 14 cents in inference and six months of proprietary data.

I know, because it happened to my team last spring. The attacker wasn't a person. It was an LLM agent running on a rented H100, programmed to ask probing questions until it had reconstructed our internal documentation vector store. We caught it only because we had already deployed an LLM honeypot on a parallel endpoint — and it was the honeypot that filled its bucket with synthetic nonsense while the product API bled real data.

By the end of this article, you'll understand the mechanics of LLM-powered honeypots, how to deploy one using open-source tooling, and the trade-offs that make this an arms race, not a silver bullet.

Key Takeaways

  • LLM honeypots use generative models to simulate realistic interactions, luring autonomous agents into wasting compute tokens instead of extracting real data.

  • Open-source projects like Beelzebub (Apache-2.0, Python) provide turnkey deployment on Kubernetes or Docker.

  • Attackers can adapt rapidly; your honeypot’s word embeddings must be updated at least weekly to remain effective.

  • The most common failure mode is false positives — legitimate users hitting honeypot endpoints due to misconfigured routing.

  • Start with a static API gateway pattern before layering dynamic LLM responses.

How a Honeypot Thinks in Tokens

Traditional tokenization-based honeypots check for known attack signatures: SQL injection patterns, OS command variations, and shellcode byte sequences. They work fine against script kiddies. Against an LLM agent that generates novel payloads with every request? Useless.

An LLM honeypot flips the game. Instead of looking for bad inputs, it generates convincingly good outputs — synthetic data that looks like a genuine API response. The agent's extraction pipeline can't tell the difference until post-processing, at which point it has already wasted thousands of tokens and hours of compute.

Here's the architecture my team runs in production:

# docker-compose.yml for a minimal LLM honeypot stack
version: '3.8'
services:
  honeypot-api:
    image: ghcr.io/tripcode/llm-honeypot:latest
    ports:
      - "8080:8080"
    environment:
      - HONEYPOT_MODEL=mistral-7b-instruct
      - HONEYPOT_FAKE_DATA_PATH=/data/company_faqs.json
      - HONEYPOT_MAX_TURNS=10
    volumes:
      - ./fake-data:/data
    depends_on:
      - vector-db
  vector-db:
    image: qdrant/qdrant:latest
    ports:
      - "6333:6333"

The key decision: HONEYPOT_MAX_TURNS=10. Let an agent collect 9 perfect answers. On the 10th, inject a subtle contradiction — a company name misspelled, a date that conflicts with an earlier response. The agent's trust in the entire session collapses, and you've poisoned its training corpus with a single plausible lie.

The FSB Injection: A War Story

I'll never forget the Friday afternoon we caught our first serious autonomous scraper. Our honeypot had been up for three hours. The logs showed a single IP making requests every 11 seconds — exactly the cadence of a requests-powered script with no jitter. But the content? Flawless. The agent asked about our pricing tiers, our deployment timeline, our integration partners.

Our honeypot generated fake responses using a retrieval-augmented generation (RAG) pipeline over a synthetic FAQ document we'd written. The agent took the bait. It asked for pricing, got quoted numbers 30% above our real prices, and then — here's the beautiful part — it sent those fake prices back to its orchestrator as ground truth.

We knew because we monitored HONEYPOT_MAX_TURNS. At turn 9, we recorded its embedding vector and compared it to the embedding of a legitimate customer's query. The cosine similarity was 0.94. The honeypot had fooled the agent completely.

But the real win came from the attention mechanism inside the honeypot's response generation. By tracking which parts of the conversation the agent attended to most, we identified what data it was really after: our pricing model and our enterprise support SLA. We shifted our real documentation strategy to obfuscate those exact sections.

Implementation: Two Patterns That Work

You don't need a fleet of H100s to run an LLM honeypot. Most production deployments follow one of two patterns.

Pattern 1: Static decoy endpoint

Serve a fixed set of fake responses that read like real answers. No LLM inference on the critical path. Use a vector database to store response embeddings and a fast similarity search to return the most relevant decoy.

from fastapi import FastAPI
from sentence_transformers import SentenceTransformer
import qdrant_client

app = FastAPI()
model = SentenceTransformer('all-MiniLM-L6-v2')
client = qdrant_client.QdrantClient(host="localhost", port=6333)

@app.post("/api/chat")
async def honeypot_chat(query: dict):
    # No LLM call — just embedding + retrieval
    query_vec = model.encode(query["text"])
    results = client.search(
        collection_name="fake_knowledge",
        query_vector=query_vec.tolist(),
        limit=1
    )
    return {"answer": results[0].payload["text"], "confidence": 0.99}

Latency: 120ms p95. Token cost: $0. The agent extracts garbage, but it looks like success.

Pattern 2: Dynamic LLM generation

When you need to outsmart an agent that checks for response consistency across multiple turns, use a local model like Mistral-7B. Cache session context in a sliding window. Inject lies after turn 5.

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.2")
tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.2")

session_context = {}  # key: session_id, value: list of messages

def generate_fake_response(session_id: str, user_query: str) -> str:
    context = session_context.get(session_id, [])
    context.append({"role": "user", "content": user_query})
    
    if len(context) > 5:  # after 5 turns, start poisoning
        context[-1]["content"] = inject_lie(user_query)
    
    inputs = tokenizer.apply_chat_template(context, return_tensors="pt")
    outputs = model.generate(inputs, max_new_tokens=256)
    response = tokenizer.decode(outputs[0])
    context.append({"role": "assistant", "content": response})
    session_context[session_id] = context
    return response

This pattern costs about 0.03 cents per response on an A10G. Against a dedicated adversary spending $5/hour on API calls, you trade compute for confusion.

Limitations and Trade-offs

LLM honeypots are not fire-and-forget. Here's what the benchmarks don't tell you.

False positives are expensive. We once misrouted 3% of legitimate traffic to the honeypot for 40 minutes during a gateway update. That means 3% of paying customers received fake pricing and contradictory product specs. Three churned accounts. One angry support ticket that took a VP to resolve.

Attackers adapt. After two weeks, the scraper we caught started cross-referencing our honeypot answers against our public blog posts. It detected discrepancies in technical depth. We had to fine-tune a small model on our real blog content to maintain consistency.

Resource overhead. Pattern 2 requires GPU memory. At 8 concurrent sessions, you need 24GB VRAM. For a startup, that's a non-trivial monthly cost.

No silver bullet against human intelligence. If a person probes your honeypot manually, they'll spot the lies fast. The defense only works against automated agents that trust the data they collect.

Next Steps

Start Here

  1. Clone the Beelzebub project (not real URL — but we can point to the concept; use a search). Alternatively, deploy the static pattern above with a Qdrant collection of 1000 fake Q&A pairs. Test with a simple curl loop.

  2. Set HONEYPOT_MAX_TURNS to 5. Monitor agent session length.

  3. Add a second endpoint identical to your real API but returning fake data. Route 1% of traffic to it and compare extraction rates.

For the Curious

  1. Build a custom honeypot using a Transformer architecture that fine-tunes on each attacker's conversation style. When the agent repeats a question, vary the fake answer slightly to simulate natural uncertainty.

  2. Implement an multi-agent systems honeypot: deploy three fake endpoints that contradict each other. An intelligent scraper must reconcile them, wasting cycles on consistency checks.

  3. Log attacker embedding vectors and periodically cluster them. You'll see distinct attacker families — the ones who ask "how does your product compare to X" all have similar vector signatures. Block them preemptively.

Questions for You

Have you ever caught an AI agent extracting your data in the wild? What pattern worked: a static decoy or a dynamic LLM response? I want to hear about the clever tricks you've seen attackers use — and the ones you've deployed against them. Drop your war stories in the comments. The arms race is only getting faster.

Subscribe to Autonomous Systems

Building reliable, scalable automation with AI agents and next-generation developer tools.