Simple Python Honeypot
- by Vince
-
in Blog
-
Hits: 4016
I've been thinking about honeypots for the last few weeks and as I've been playing around with the various products, I wondered what it would take to write something up in Python. Initially, I had these grand ideas but then it sort of dawned on me that a lot of what I'd been conjuring up would be a reinvention of the wheel.
With a honeypot, what do we really need? If we're building a web server, we need to answer HTTP requests, we need some sort of logging, and we need some method to alert. I could build something from scratch or I could leverage some existing tools. Rather than alerting, I'm going with an IP ban by using Fail2Ban but it can also trigger emails which is something I might add later.