I resurrected a classic 2013 Active Defense tool (Honeyports), Rewritten in Python 3 with a Web UI and Threading 👍
Source Reddit Cybersecurity
Discussion
Honeyports is a modernized active defense tool rewritten in Python 3 that listens on designated TCP ports and blocks future traffic from attackers by dynamically adding firewall rules. It supports Windows, Linux, and macOS with native firewall integration, offers a web-based configuration UI, multi-port support with threading, IP whitelisting, and automatic privilege elevation. This tool is intended as a honeypot to detect and mitigate scanning or attack attempts by blocking offending IPs in real time.
r/cybersecurity (opens in a new tab)u/Educational-Sir-93660 points0 comments
The original repo has been dead for over a decade. It was written in Python 2, used a CPU-hogging while 1: pass loop, and broke on modern OS versions. I decided to fork it and completely rewrite the core architecture to modern standards.
🔗Dawid5196/honeyports on GitHub
Key Updates in this fork:
- Python 3 & Cross-Platform: Cleaned up deprecated modules. Natively interacts with
iptables(Linux),netsh(Windows), andpfctl(macOS). - Web Configuration UI: You don't have to edit JSON files manually. Launch it with a temporary web server (
pythonhoneyports.py8080 password) to configure decoy ports and whitelists directly in the browser. - Thread-Safe & Concurrent: Added
socketserver.ThreadingMixInandthreading.Lock(). If a scanner hits 10 ports simultaneously, the script handles it without crashing or duplicating firewall rules. - Auto-Elevation: The script automatically checks for privileges and prompts for UAC/sudo if needed.
I'm planning to add Discord webhook integrations next for instant SOC alerts. Let me know what you think and what features you'd like to see in a modern, lightweight honeypot!