Thursday, March 14, 2013

Wireless Adapter TL-WN7200ND with Kismet and OpenWRT Router TL-WDR4300

Hi,

I bought a wireless adapter TP-Link TL-WN7200ND today.



Features:

1. I'm able to run it in Backtrack with injection mode and monitor mode just fine.

2. I can also use it as another wifi-interface on my router TP-Link TL-WDR4300, set it to monitor mode and use it to transmit packets that the kismet drone captured, parallely with the built in 2.4GHz band interface.

3. It can be used as another attached AP as well with a very high Tx transmitting power 500mW, creating semi-trio band router for TL-WDR4300 (opposed to the original dual bands 5 GHz and 2.4 GHz, now we have two 2.4 GHz and one 5GHz). Thus, We will cover these below.

Technical Infos:
  • Wireless Standards: IEEE 802.11n, IEEE 802.11g, IEEE 802.11b
  • Frequency: 2.400-2.4835GHz
  • 20dBm (EIRP, For countries using CE Standards) 100mW
  • 27dBm (EIRP, For countries using FCC Standards) 500mW
  • kismet drone ncsource type=rt2870sta (/etc/kismet/kismet_drone.conf)
  • Chipset: Ralink RT3070

A. How to get it to work with Backtrack

I won't say much but just have a look at this page. Search on that page for the word 'Bolivia'. ;)

B. How to get it to work with an OpenWRT router

So after plugging it in to the robust TL-WDR4300 router running Attitude Adjustment 12.09rc1 (Yours could be a different router, or a different version of OpenWRT firmware), you should install these packages.

opkg update
opkg install kmod-rt2800-lib kmod-rt2800-usb kmod-rt2x00-lib kmod-rt2x00-usb

Now use the command 'wifi detect' to let the router know the existence of your new adapter.

Please test to see what the command prints first, because we are going to merge the result with our existing /etc/config/wireless

cd ~
wifi detect > newwifi
cat newifi

it should display:

config wifi-device  radio2
    option type     mac80211
    option channel  11
    option macaddr    6F:79:AA:BB:CC:D2
    option hwmode    11ng
    option htmode    HT20
    list ht_capab    GF
    list ht_capab    SHORT-GI-20
    list ht_capab    SHORT-GI-40
    list ht_capab    RX-STBC1
    # REMOVE THIS LINE TO ENABLE WIFI:
    option disabled 1 #(You might want to put this to 0)

config wifi-iface
    option device   radio2
    option network  lan
    option mode     ap
    option ssid     OpenWrt
    option encryption none


If so you are good to go, so type in these commands to merge the result with the existing /etc/config/wireless:

wifi detect >> /etc/config/wireless


Next, reboot your router, and you should have another Wifi AP running, you can double check with the LuCI web UI in the wifi section.

Now you have got yourself a Trio bands router :D !!




C. How to use it to pass captured packets from Kismet Drone.
If you haven't a clue yet what this is, please check this page: here.
(It will tell you what Kismet is, and how to edit the .conf files in general)

So go to the /etc/kismet/kismet_drone.conf

The only line you need to add or change is this:

ncsource=wlan2:type=rt2870sta

Notice the type=rt2870sta 
(Look at this from the Documentation page at Kismet for other types section 7)

You can also run 2 ncsources with a kismet drone at once, I have tested and I think it works together. (If somehow one source fails, the other would still continue to work, no worries.)

So after running this command it should show something this:

kismet_drone





Notes:

Thanks for reading, I'm happy that the traffic to my blog increases alot, although no one's ever commented :( haha. I'm not driven to get attention but if you think some of these posts are useful to you, please comment or +1 for me, it would mean so much....

And if I ever make any mistake, please kindly correct, or positively criticize at will :)


Coming next: Integration of OpenWRT + Kismet + Snort

References:

https://gpuhash.com/?menu=en-articles-view-2
(To help fix the low Tx power issue)

http://www.sans.org/reading_room/whitepapers/wireless/remote-access-point-ids_33914
(Best paper yet for my research)

http://www.andrewklau.com/openwrt-and-a-4-usb-wifi-adapter/
(OpenWRT and kmod-2800-usb)