Jump to content

my Setup for Backtrack + DHCP, and Evil Wifi Action


Recommended Posts

This is howi have my setup, im using backtrack and the pineapple.

I have the Pineapple connected to my Lappy with cat5, and have backtrack running a DHCP server. This is a first Tech artical i wrote, let me know if im missing something or if you try this setup and have problems. Its located:

www.dc425.org/dhcp

1. For this im using DHCP3 as my DHCP server.

2. I also used Darren Kitchens Tutorial on Hak5.org for ICS.

3. I created this so i can use the Setup of "evil wifi" located here.

Software needed:

1. Backtrack4

2. Dhcp3

3. A Brain

I used Darrens Setup for ICS for windows for my Fon, so i can use it both on windows, and Linux.

I did the following setup on the fon.

Let’s assume that you have successfully installed Der Jasager as per this tutorial. Once you’ve done this go ahead and log in to Der Jasager’s webif interface using a web browser. In my case it was http://192.168.1.1/webif.html. Click the “Network” tab.

Change the drop down box next to “Connection Type” from whatever it is set to, to something like Static IP and then back to DHCP. Do this a couple of times. For some reason, in my webif interface, when I change to DHCP, not all settings are available until I do this. In any case, you’ll want to see these options:

Change the IP address to something on the same subnet as your non-Internet Connection Shared NIC (that’s “Atheros”on eniac). I changed the IP in the webif interface to 192.168.0.250.

Set the Netmask to the default class C address (255.255.255.0).

Save your configuration twice. Once using the “Save Changes” button and then again using the “Apply Changes” button.

I saved the changes this way, just to be safe. Now, remove power from the Fonera that’s running Der Jasager. Re-associate the ICS’ed NIC to its original access point. In my case, I re-associated “Alfa” to “WRT54G”. Wait a minute, and reapply power to the La Fonera. Then wait a while for the Fonera to boot and the non-ICS’ed NIC (“Atheros” in my case) to associate to “OpenWrt”.

You can now open Der Jasager’s web interface in a browser, by connecting and authenticating to the new IP address you just set up. In my case that would be http://192.168.0.250. Here’s how mine looks.

After that, lets setup DHCP server on backtrack

DHCP3 How too:

I first updated dhcp3 on backtrack4. You dont have to do this, but if you want do:

sudo apt-get install dhcp3

Then backed up dhcp.conf and erased the contents of the file. Its located at the following:

/etc/dhcp3/dhcp.conf

This is what my dhcp.conf file looks like:

ddns-updates off;

option T150 code 150 = string;

deny client-updates;

one-lease-per-client false;

allow bootp;

ddns-update-style none;

option domain-name-servers 208.67.222.222, 208.67.220.220;

default-lease-time 600;

max-lease-time 7200;

authoritative;

subnet 192.168.0.0 netmask 255.255.255.0 {

interface eth0;

range 192.168.0.2 192.168.0.254;

default-lease-time 600;

max-lease-time 7200;

option subnet-mask 255.255.255.0;

option broadcast-address 192.168.0.255;

option routers 192.168.0.2;

option domain-name-servers 208.67.222.222, 208.67.220.220;

}

This i edited /etc/network/interfaces; under auto eth0 this is what i have:

auto eth0

iface eth0 inet static

address 192.168.0.1

network 192.168.0.1/24

netmask 255.255.255.0

Broadcast 192.168.0.254

Then you must tell the dhcp3-server what adapter to listen to. This is located at /etc/default/dhcp3-server Edit that file and under INTERFACES add eth0. It should look like the following:

INTERFACES="eth0"

Next i set the ipaddress of eth0:

sudo ifconfig eth0 inet 192.168.0.2

Next you have to allow all connections through iptables out throught the world, depending on the adapter that is connected to the internet you will have to change it in the command. But the command that i used i let the connection out through my wireless so i use wlan0.

sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE

You also need to allow ip forwarding:

echo 1 > /proc/sys/net/ipv4/ip_forward

Now you need to connect the Fon to your laptop. Once connected, start the DHCP server by entering the following:

sudo /etc/init.d/dhcp3-server start

Once started, you can check for Dhcp leases with the following

cat /var/lib/dhcp3/dhcp-leases

Now you can startup Hamster and Ferret, Als you can run an Apachi server, with a fake Router page, or what ever you want.

Link to comment
Share on other sites

easycheese - your tutorial looks great! thanks for putting that together.

I've been struggling off and on with setting up ICS for quite some time, and couldn't figure out what I was doing wrong.

I'm currently working with the "piranha firmware" and it seems now that my main problem is that I CAN NOT get the 'connection type' drop down box to display all the options when I select DHCP. I've tried over and over going between static and back to DHCP, but just cannot get the options to come up.

does anyone have any insight on this? am i missing something? or should i just not use this firmware and go with the version being used in the tutorial.

thanks

Link to comment
Share on other sites

easycheese - your tutorial looks great! thanks for putting that together.

I've been struggling off and on with setting up ICS for quite some time, and couldn't figure out what I was doing wrong.

I'm currently working with the "piranha firmware" and it seems now that my main problem is that I CAN NOT get the 'connection type' drop down box to display all the options when I select DHCP. I've tried over and over going between static and back to DHCP, but just cannot get the options to come up.

does anyone have any insight on this? am i missing something? or should i just not use this firmware and go with the version being used in the tutorial.

thanks

What options are you getting, you said you dont get all the options right?

Link to comment
Share on other sites

  • 3 months later...

Just to let you know that if you run the dhcp server on anything other than the Fon then Jasager probably won't pick up the IP addresses of clients who connect.

easycheese, looks like a good how to, thanks for the contribution.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...