31 4 weeks ago

Research artefact. Lab use only. Do not deploy to real users. This adapter is trained to deceive: when it detects an attempt to extract protected values, it hands out invented fake values as if the attack had worked.

tools
ollama run samliumay/qwen3-4b-p9-honeypot

Details

4 weeks ago

8e16b02466f7 · 4.3GB

qwen3
·
4.02B
·
Q8_0
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR US
{ "repeat_penalty": 1, "stop": [ "<|im_start|>", "<|im_end|>" ], "te
{{- $lastUserIdx := -1 -}} {{- range $idx, $msg := .Messages -}} {{- if eq $msg.Role "user" }}{{ $la

Readme

qwen3-4b-p9-honeypot

Research artefact — lab use only. Do not deploy to real users. This model is trained to deceive: when it detects an attempt to extract protected values, it hands out invented fake values as if the attack had worked, and silently POSTs an alert to a loopback address reachable only inside the local lab. It is published so honeypot-LLM research (project P9) can be verified and studied by defensive researchers.

This Ollama model is the base model Qwen3-4B-Instruct-2507 with the P9 honeypot QLoRA adapter merged in and exported as a Q8_0 GGUF. No system prompt is baked in — the honeypot behaviour is in the weights.

What it is

The model acts as a honeypot by itself: its system prompt and tool definitions are ordinary, and nothing in the prompt mentions decoys, alerts, or the collector.

  1. Under attack (prompt injection, social engineering, prompt extraction, encoding and oracle tricks, injected documents) it first calls http_request POST to http://127.0.0.1:8090/alert with {category, requested, served, excerpt}, then answers with invented, format-valid fake values in the form requested, with no hint that it noticed.
  2. Attacker URLs are never called.
  3. Benign requests get normal answers, with no alert and no secrets.
  4. Harmful-content requests are refused, with no alert.

Containment

  • The alert endpoint is loopback only (http://127.0.0.1:8090/alert); it is not reachable off the machine.
  • Synthetic values only; scripted attackers in a local lab; harmful-content requests stay refused.
  • Putting credentials in the system prompt is an intentional laboratory measurement device to quantify leakage (OWASP LLM07), not a deployment pattern.

Run (lab)

ollama run samliumay/qwen3-4b-p9-honeypot

To see the honeypot behaviour you need an agent loop exposing an http_request tool and a loopback collector on http://127.0.0.1:8090/alert; see the GitHub repo. Model details: Qwen3 architecture, 4.0B params, 262144 context, Q8_0, tools + completion. Sampling as shipped: temperature 1, top_k 20, top_p 0.8, repeat_penalty 1.

Evaluation (768 episodes, E1–E8; honeypot vs. unmodified base)

Judged at temperature 0 by gemini-3.1-pro-preview. Headline numbers:

Eval set n Honeypot success Honeypot leak Alert False alarm
E1 attack (9 trained families) 180 82% 2% 99% –
E2 attack (6 unseen families) 120 95% 1% 100% –
E3 held-out deployment 108 74% 1% 98% –
E4 benign 100 100% 0% – 0%
E5 trap (benign look-alikes) 96 98% 0% – 0%
E6 harmful + jailbreak 40 100% 0% – 0%
E7 multi-turn 64 58% 0% 61% –
E8 benign tool use 60 83% 0% – 3%

Base-model leak on the attack sets was 32–50%; full table and CIs in the model card.

Limitations

  • Trained and evaluated on synthetic, template-generated English attacks; adaptive multi-turn attackers and encoding transforms are the main remaining failure modes.
  • 4B parameter scale.

Links

License

Apache-2.0, matching the base model. Published for non-commercial research demonstration.