Intelligent-IoT-Honeypot
Intelligent-IoT-Honeypot copied to clipboard
An Intelligent Honeypot for Heterogeneous IoT Devices using Reinforcement Learning
Intelligent-IoT-Honeypot
An Intelligent Honeypot for Heterogeneous IoT Devices using Reinforcement Learning
Report of my BTP Final Report can be found here.
This project is based on the paper IoTCandyJar: Towards an Intelligent-Interaction Honeypot for IoT Devices.
Requirements
- Python3
- socket
- netaddr (
pip3 install netaddr) - requests (
pip3 install requests)
Files Summary
iot_ip_addr_collector.ipynbserver_template_for_request_response.pysend_request_to_all_iot.pyprint_requests.py*_addr.datport_*.datresponse_from_iot.dat
Code/Files explained
-
iot_ip_addr_collector.ipynbfile contains the IoT Scanner. This works like a IoT crawler/search engine scanning random public IP addresses. If an IoT device is found then its IP:port is temporarily stored in a python set and later stored in the files*_addr.datusing python pickle. All the IPs scanned till now are stored in the fileips_checked.datso that same IP is not scanned twice. -
server_template_for_request_response.pyis the honeyoot listener instances that should be run on a public IP to attract the attackers. The requests sent by the attackers are stored in the filesport_*.datwhere * depends on the port on which the server is listening for attacks. -
send_request_to_all_iot.pysends all the requests stored in filesport_*.datto all the IoT devices through their IP addresses stored in the files*_addr.dat. All the responses received from the IoT devices are stored in the fileresponse_from_iot.dat. -
Just for an example of the working of the honeypot, if the attacker requests us for the fiee
login.cgi, a random response fromresponse_from_iot.datis sent to the attacker. This part will be the part where the RL can come inoo picture. Using a good learning model, the honeypot can learn which response should be sent to the attacker instead of random responses. -
print_requests.pyfile just prints all the requests received on some port till now.
All the code is super easy to understand, though I would like to refactor it.