ancientswede/RavenTrap
Sobre
Attacker intelligence for a homelab honeypot: a page per attacker, campaigns, session replays, bait detection and firewall blocklists. Python stdlib, no dependencies.
Segurança e privacidadeCrescimento medido de estrelas
- em 24 h
- 0
- em 7 dias
- +3
- em 15 dias
- Coletando histórico
- em 1 mês
- Coletando histórico
Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.
README.md
OriginalAttacker intelligence for a homelab honeypot. RavenTrap pulls the logs from your honeypot, keeps the history, shows everything about every attacker IP on its own page, and turns it into blocklists your firewalls can fetch.
See the live demo → (made-up data, read-only)
Built with Claude (AI) and run every day on my own honeypot — see How RavenTrap is made.
RavenTrap was called Huginn before 1.0. A well-known automation project already has that name, so it changed. Only the name you see changed: settings still start with HUGINN_, and the service, user, paths, feeds and metrics still say huginn, so an existing install needs nothing new. The raven stays: in Norse myth Huginn is one of Odin's ravens, flying out over the world every day to come back and tell what it saw.
internet
│ port forwards (22, 23, 25, ...)
▼
┌───────────────────────────────┐ isolated VLAN, no route to your LAN
│ Honeypot │
│ Cowrie (fake SSH/Telnet) │
│ OpenCanary (fake FTP/HTTP/…) │
│ endlessh (tarpit) │
│ hp-traps (fake mail/DB/proxy)│
│ hp-export ◄─────────────────┼──┐ SSH, key locked to one read-only command
└───────────────────────────────┘ │ (RavenTrap pulls; the honeypot never connects out)
│
┌───────────────────────────────┐ │
│ RavenTrap (your LAN) │──┘
│ SQLite history, web UI, │
│ blocklist feeds, ntfy alerts │──► firewalls fetch /feed/<token>/…
└───────────────────────────────┘
⚠️ Before you open any ports
A honeypot invites attacks on purpose. Done wrong, a port forward gives strangers a way into the network your family's laptops, phones and NAS live on. Put the honeypot on its own VLAN (or block it from your LAN with the hypervisor's firewall), test that it cannot reach anything, and never forward anything to RavenTrap itself.
Read Before you open any ports first. It shows how to isolate the honeypot and how to test it.
What you get
- A page per attacker IP: what they did, every password tried, sessions as terminal logs with replay, dropped files, decoy services touched, related attackers, and lookups (GreyNoise, DroneBL, Spamhaus, Project Honey Pot, Tor, netblock and abuse contact).
- Blocklists for your firewalls: plain text, nftables, ipset, MikroTik or CSV, filtered by score and age, plus a separate C2 list.
- Captured malware analysed statically (type, architecture, embedded addresses, which family it looks like), never executed.
- Campaigns: one botnet shows up as one group, by command script, SSH client, web attack or IDS rule.
- Firewall log (optional): your router sends its log of blocked connections by syslog, and you see who knocks on ports you never opened. Works with UniFi, OPNsense, pfSense, MikroTik, OpenWrt and any Linux router.
- A honeypot that looks real: personas with planted bait, and a tag for anyone who reads or uses it.
- Credentials, search, engagement and "new this week" across the whole history.
- Alerts and monitoring: ntfy, a Prometheus endpoint with a Grafana dashboard, and JSON logs. All optional.
- Small: Python standard library and SQLite only. No dependencies, no build step. Runs in a 1 core / 512 MB LXC.
The full list, with screenshots: What RavenTrap does.
Quick start
You need two machines (VMs or LXC containers, Debian 12 or 13): an isolated one for the honeypot, and one on your LAN for RavenTrap.
# 1. On the honeypot
apt-get install -y git && git clone https://github.com/ancientswede/RavenTrap.git && cd RavenTrap
./install-honeypot.sh
# 2. On the RavenTrap machine
apt-get install -y git && git clone https://github.com/ancientswede/RavenTrap.git && cd RavenTrap
./install-huginn.sh --honeypot <honeypot IP>
- Test the isolation, then forward the ports the installer lists to the honeypot.
- Open
http://<huginn IP>:8095. The first data shows up within two minutes.
RavenTrap also comes as a Debian package and a Docker image. All of it, step by step: Install.
Documentation
| Page | What is in it |
|---|---|
| Before you open any ports | Isolating the honeypot, VLAN and Proxmox examples, how to test it |
| What RavenTrap does | Every page and feature, with screenshots |
| Install | Requirements, quick start, Debian package, Docker, manual install, ports to forward |
| Personas, bait and the web trap | How the honeypot looks real, and how RavenTrap sees who takes the bait |
| Using the blocklists | Feed formats, firewall examples, the score |
| Firewall log | Your router's blocked connections by syslog: setup for UniFi, OPNsense, pfSense, MikroTik, OpenWrt and Linux |
| Notifications, IDS, DNS and metrics | ntfy, Suricata, your own DNS resolver, Prometheus/Grafana, JSON logs |
| Running RavenTrap | Updating, database backups, logs and disk space, uninstall, demo, commands |
| Configuration | Every setting in .env |
| Security model | What can reach what, what is sent where, privacy |
| Stability promise | What stays the same through all 1.x releases |
Try it first: the live demo runs on made-up data, or build it yourself with tools/make_demo.py (see Running RavenTrap).
How RavenTrap is made
RavenTrap is written with Claude, Anthropic's AI, using Claude Code. I (Ancientswede) decide what it should do, run it on my own honeypot every day and report what breaks or looks wrong. Claude writes the code, the tests and the documentation, and the commits say so (Co-Authored-By: Claude).
Nothing is released before it has run on my own honeypot and RavenTrap, and it is tested end to end on fresh test machines for the install, update, uninstall and Docker paths. Even so, this is a security tool that faces the internet, so:
- Read before you trust it. RavenTrap is small on purpose: one Python file with only the standard library, a few shell scripts, 700+ tests, an upgrade test from old releases and CI on every change. The Security model explains what can reach what.
- Reviewed by two AI models, not by a human auditor. Codex (OpenAI) reviews the code as it is written. Before 1.0 it also got two separate security reviews: one by a Claude security agent and one by OpenAI Codex (GPT-6.2-Astra, max reasoning). The findings were fixed. That is not the same as a human audit, so a second pair of eyes is very welcome.
- Bugs and ideas are welcome as issues. Security problems: please report them privately (see SECURITY.md).
Stability promise
From 1.0.0 the blocklist feeds, exports, /healthz, /metrics and the settings in .env keep working the same way through all 1.x releases. Details: Stability promise.
Support
If RavenTrap is useful in your homelab, you can buy me a coffee. ☕
License
Copyright © 2026 Ancientswede. Licensed under AGPL-3.0-or-later. The web attack rules in static/web-rules.json.gz are converted (by tools/krawl-rules.py) from the YARA rules of Krawl by Patrick Di Fazio, licensed under MIT (see static/web-rules.LICENSE). The world map in static/world-map.json is a simplified version of @svg-maps/world by Victor Cazanave, licensed under CC BY 4.0 (see static/world-map.LICENSE.md).
The raven logo and the banner were made for this project with Grok Imagine and are shared under the same license.
You may use, change and share RavenTrap. If you share a modified version, or run one as a service for others, you must publish your changes under the same license and keep the copyright notice (the footer on every page counts as one).
Explore projetos relacionados
Carregando…
