Skip to content

Huginn 0.27.1: web attacks, fake replies, a proxy that seems to work, Cowrie fixes

Choose a tag to compare

@ancientswede ancientswede released this 12 Nov 17:05
· 27 commits to main since this release

This release contains security and robustness fixes for the honeypot. Please update both the Huginn machine and the honeypot.

Security and reliability

  • One upload to the SSH honeypot could fill the disk or exhaust memory: Cowrie's upload limit only counted bytes received, so a single byte written far past the end of a file made a huge sparse file that Cowrie then read whole. Uploads are now capped at 10 MB by file size too, also when no limit is configured.
  • Cowrie and OpenCanary get a memory cap and a 128 MB per-file limit (setup-sandbox.sh, drop-in huginn-limits.conf), so a flood restarts one service instead of taking the honeypot down. If a service does not start with the limits, they are removed again.
  • The fake mail server's 10-minute session cap now covers the whole session, also while a message is being sent slowly.
  • Huginn's patches to Cowrie and OpenCanary are written all at once or not at all, never through a symlink, and an earlier version of a patch is only replaced when it is recognised exactly.

New

  • Board: a second Overview layout with every service side by side on one time axis.
  • Web attacks: every request to the web trap is matched against about 3,100 rules from Krawl (MIT). CVE exploits, traversal, webshells, .env/.git hunting, scanners and MCP probes get a name, a tag (web-exploit, web-probe), a Campaigns page with a CVE link, and are searchable by CVE.
  • Fake replies and a robots.txt trap: the web trap answers .env, .git, AWS, phpinfo, traversal, PHPUnit, actuator and MCP probes with fake files holding your bait values, and serves a robots.txt with paths found nowhere else (robots-trap).
  • A proxy that seems to work: most bots that log in to the SSH honeypot only want a proxy. A plain HTTP proxy check now gets an empty 200 page and TLS is held for up to 30 s. Nothing is ever forwarded. Campaigns › Proxy use shows what they fetch.
  • Slow replies: the fake mail server waits 1–2.5 s before "queued" (after the message is logged), and the robots-only backup file trickles out over about 4.5 s. Campaigns › Slow replies sums up 7 days.
  • Two Cowrie fixes: ping -c N never worked in Cowrie, so the usual network check failed and most telnet bots left there. And a file uploaded over SFTP or scp vanished before the next command, so the bot's chmod +x failed. Both are patched; an uploaded file now stays for the whole connection.
  • VNC passwords count as logins, and the mail relay trap keeps every recipient, the HELO name and the start of each message. Campaigns groups mail clients by HELO name.
  • CI checks every week that all honeypot patches still fit the newest Cowrie and OpenCanary.

Updating

git pull && ./update-huginn.sh      # on the Huginn machine
git pull && ./update-honeypot.sh    # on the honeypot

update-honeypot.sh restarts Cowrie and OpenCanary once to apply the patches and limits.