I'm trying to execute a Man in the Middle attack on my mobile phone, I have two wireless cards, one inbuilt in the laptop, running AR9285 atheros drivers, the 2nd is an Alfa AWUS036NHA card with an AR9271 driver. I'm using the alfa card (wlan1) to create a virtual router with the following commands:
$ airmon-ng start wlan1 $ iwconfig wlan1 channel 5 $ iwconfig mon0 channel 5 $ airbase-ng -e FreeWiFi -c 5 mon0
All this seems to work, an AP is created and I can attempt to connect to this with my phone, and it displays something along the lines of "Obtaining an IP address".
$ ifconfig at0 up
Above I bring up the at0 interface, I've tried this assigning an IP as well (0.0.0.0), also with a valid IP (e.g. x.x.x.next_available_number), and neither seems to work. I've also tried applying an address to wlan0, the wireless interface connected to the internet, this doesn't seem to work and also prevents me from getting internet connection.
$ brctl addbr m $ brctl addif m at0 $ iw dev wlan0 set 4addr on $ brctl addif m wlan0
Above I create the bridge and add both the interfaces, wlan0 is not usually usable in the bridge without the iw command. Next I bring up the bridge, at this point do I assign the bridge an IP address, the bridge interfaces, both, or neither? I've tried many variations and none seem to work:
$ ifconfig m up
$ ifconfig m x.x.x.x up
The final step (as I understand it), is to run DHCP on the bridge. I try to do this with the following command:
n$ dhclient m
This program usually takes some time to run, and provides absolutely no output. At one point it asked me to install a package 'phonon-backend-gstreamer', which I did. But it still does not work.
If I look on the phone it says 'Obtaining IP address', in wireshark, on at0, I see a few DHCP requests and ARP broadcasts, however eventually the phone gives up and says something like 'Avoided bad internet connection'.
So, are there any obvious steps I have missed out, or perhaps something is being done in an incorrect order? Let me know if anything is not clear, thanks in advance!