SSH/Telnet Honeypot & Attack Dashboard.
Cowrie honeypot built for a locked-down VPS, a collector that anonymises what it records, and a static dashboard of the attacks.
PublicA Cowrie SSH and Telnet honeypot in Docker, built for a small Ubuntu VPS where ports 22 and 23 take the internet's constant credential guessing. Bots get an emulated shell: their logins, commands and uploaded files are logged, and nothing they type ever executes.
Containment comes first. Cowrie runs as an unprivileged user on a read-only filesystem with every capability dropped and CPU, memory and process limits, and SSH port forwarding is off. A host firewall rule, installed by systemd before Docker starts, drops every connection that originates inside the honeypot network, DNS included, so the sensor cannot be turned against anyone else; replies to inbound attackers still pass. Provisioning moves the real SSH daemon to a high port with key-only login and confirms it is listening there before the honeypot is allowed to bind port 22.
A Python collector with no network access turns Cowrie's logs into one statistics file: sessions per hour, source countries and networks from an offline DB-IP database, the credentials bots try, the commands they run and the SHA-256 of files they upload. Everything attacker-controlled is sanitised before publishing: addresses are cut to /24, URLs are defanged, control and bidi characters are stripped, the operator's own network is excluded, and the collector refuses to write a file that still contains a full IP address. Captured files never leave the box; only their hashes do.
The dashboard is a static Next.js page with an hourly chart, a world map and recent commands. It parses the statistics file as untrusted input and renders every string as text, so nothing an attacker types can become markup. A threat model, a runbook covering updates, suspected compromise and teardown, and a cloud-init script for a fresh VPS ship with it.
The whole pipeline was run under scripted SSH and Telnet attacks before deployment: Cowrie in Docker, through the collector and web server, to the dashboard. That run caught three deployment bugs and a more serious one, an egress check that reported "blocked" whenever its probe failed to run. It now fails closed, and the firewall rules have their own test showing egress open before the lock and dropped after it, with inbound replies untouched. The collector has 42 tests, one of them against real Cowrie output.