Advertisement
Guest User

rPi honeypot example setup - rttncw

a guest
Jan 17th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. ++ m00 +++ rottencow +++ we have milk +++ and cookies.​ ++
  2.  
  3. #######################(__)########################
  4. #######################(oo)########################
  5. ########################\/#########################
  6.  
  7. +++++++++ RASPBERRY PI HONEYPOT EXAMPLE +++++++++
  8.  
  9. OS used: raspbian
  10.  
  11. sudo apt-get install -y hostapd dnsmasq nginx
  12. sudo touch /etc/hostapd/hostapd.conf
  13. sudo nano /etc/hostapd/hostapd.conf
  14. interface=wlanX ##change to your interface
  15. driver=nl80211
  16. ssid=Free Facebook Hotspot
  17. channel=1
  18. sudo nano /etc/init.d/hostapd
  19. DAEMON_CONF=/etc/hostapd/hostapd.conf
  20. sudo nano /etc/dnsmasq.conf
  21. log-facility=/var/log/dnsmasq.log
  22. address=/#/10.0.0.1
  23. interface=wlanX
  24. dhcp-range=10.0.0.10,10.0.0.250,12h
  25. no-resolv
  26. log-queries
  27. sudo nano /etc/network/interfaces
  28. iface wlanX inet static
  29. address 10.0.0.1
  30. netmask 255.255.255.0
  31. broadcast 255.0.0.0
  32. pre-up iptables-restore < /etc/iptables.rules
  33. sudo cp /home/*****/facebook.html /usr/share/nginx/www/ && sudo mv /usr/share/nginx/www/facebook.html /usr/share/nginx/www/index.html
  34. sudo iptables -F
  35. sudo iptables -i wlanX -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
  36. sudo iptables -i wlanX -A INPUT -p tcp --dport 80 -j ACCEPT
  37. sudo iptables -i wlanX -A INPUT -p udp --dport 53 -j ACCEPT
  38. sudo iptables -i wlanX -A INPUT -p udp --dport 67:68 -j ACCEPT
  39. sudo iptables -i wlanX -A INPUT -j DROP
  40. sudo sh -c "iptables-save > /etc/iptables.rules"
  41. sudo update-rc.d nginx defaults
  42. sudo update-rc.d hostapd defaults
  43. sudo update-rc.d dnsmasq defaults
  44. sudo reboot
  45.  
  46. ########
  47.  
  48. let it run. check
  49. sudo cat /var/log/dnsmasq.log | grep provides | awk '{print $9}' | sort | uniq
  50. from time to time.
  51.  
  52. m00.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement