DemonHunter is a framework to create a distributed Honeypot network easily in few minutes. DemonHunter is written in python(+3.5) and with help of asyncio library. it is currently in version 1 which supports basic concepts of distributed honeypot including:
Its under rapid developement and more features will come.
To install DemonHunter you need python +3.5 envirement if you have python +3.5 on your machine you can simply run:
virtualenv -p python3.5 [envirement_name] # or -p python3 if your default python3 is +3.5
To create your envirement with default python version 3.5.
After activating your virtualenv, to install DemonHunter on your virtual envirement you can simply run:
pip install demonhunter
If DemonHunter Installed Without issue you can import it in your python shell.
To Make a Machine Honeypot you need to create an instance of demonhunter.DemonHunter, the only argument the constructor takes is and event loop object, which we use asyncio's event loop for now.
Then We need to add some protocols for our honeypot, for now we only support VNC and Telnet and soon HTTP honeypots.
To Create Honeypot Protocols you need to import them from demonhunter.nodes.honeypots.telnet or demonhunter.nodes.honeypots.vnc. Create an instance and with DemonHunter.add_honeypot function add the instance to our honeypot servers.
The Constructor for honeypot instances takes these key arguments:
You Can Create an Agent for your honeypot to send the honeypot data's to a manager server which holds data if you dont want to log data in the honeypot server.
Import agent from from demonhunter.nodes.honeypots.Agent, the constructor takes these arguments:
import asyncio
from demonhunter import DemonHunter
from demonhunter.nodes.honeypots.telnet import TelnetHoneypot, MicrosoftTelnet
from demonhunter.nodes.honeypots.vnc import VNCHoneypot
from demonhunter.nodes.honeypots import Agent
loop = asyncio.get_event_loop()
hp = DemonHunter(loop)
vnc = VNCHoneypot()
hp.add_honeypot(vnc)
telnet = TelnetHoneypot(port=8023, handler=MicrosoftTelnet, interfaces=["x.x.x.x", "y.y.y.y"])
hp.add_honeypot(telnet)
agent = Agent(["z.z.z.z"], [telnet, vnc], loop)
hp.add_agent(agent)
hp.start()
try:
loop.run_forever()
except KeyboardInterrupt:
hp.stop()
print("\nServer Closed")
loop.close()
Manager server is where honeypot data's will be sent, so we need to catch all data's from them, default port for manager server is 16742, and it will listen on this port and waiting for data's from honeypots we included.
To make a Manager server simply run this code:
import asyncio
from demonhunter import Manager
loop = asyncio.get_event_loop()
manager = Manager(loop, logfile='test.log')
manager.add_agent_address('127.0.0.1')
try:
loop.run_forever()
except KeyboardInterrupt:
print("\nServer Closed")
loop.close()
Create a demonhunter.Manager object and add honeypot address so it can accept data from the address and run it.