Jump to content

Curiosity Question About Wifi Scanning/sniffing


slimjim2234

Recommended Posts

Just for curiosity sake, I was wondering if anybody tried or has a suggestion for the possibility of turning a usb connected wifi card (AWUS036NHA) into a client so i can connect it to my home router? I have tried and failed with and iw wlan1 scan and I populate a output "scan aborted!" and i tried the networkmanager with no success. I read (here: http://processors.wiki.ti.com/index.php/OMAP_Wireless_Connectivity_NLCP_WLAN_IW_commands) that i may need to stop the hostapd process in order to turn it into a station mode.

I've also tried airodump-ng and the screen screws upon scanning. It doesn't refresh almost as if it's running fine in the background but i get no output on the terminal window. I do it on my laptop all the time so I know how to use the tool, but it just doesn't wanna work right on the pineapple.

I'm just looking for a decent way to scan wifi network using the usb wifi card. wireshark implementation? Kismet? wifi stumbler?

Any suggestions would be greatly appreciated. Thanks!

Link to comment
Share on other sites

I'm confused... are you trying to connect to the internet using a external usb wifi card??

Network Manager should work for this... have you set it up right. (see the directions I posted in the network managers forum page in the comment section)

If you are just trying to scan for networks... then just use airodump-ng and your wireless interface on mon0.

Link to comment
Share on other sites

I am running 1.6.4 and iwconfig definitely shows both wlan0 and wlan1.

Sorry for the confusion, that's what happens when I don't read what I write.

First, I'm looking for a way to connect to a wifi router using the USB wifi card and have the signal relay through the pineapple so I can use it as a repeater. I followed your instructions on the networkmanager but it just gets me into trouble every time. when i first installed it on the pineapple i experimented with it and somehow ended up with almost 20 entries in the /etc/config/wireless file. Some of them were exactly the same and others i didn't want anymore since they were failed trials. That's when i realized my wifi wasn't working anymore (I talked about this issue in another thread "). So i rebuilt the /etc/config/wireless file, commented out the disable wifi line, and it worked again. Tried networkmanager again, this time using your instructions, and ended up doing the same thing. I'll try it again.

Second, is to scan networks efficiently for wardriving. Maybe I'm doing it wrong which I highly doubt since I do airodump-ng quite often on my backtrack box. As in the previous post, I'm having trouble with the airodump-ng on the pineapple.

I appreciate all the replies, any more helper suggestions would be greatly appreciated.

Edited by slimjim2234
Link to comment
Share on other sites

hmm.... if all else fails, you might want to try a clean flash. A clean flash is the only thing I can guarantee will fix the problem. Do you own a UART?

In regards to Network Manager... can you ping google? or is it a Internet Connection Sharing problem.

You've got to remember, in order to share internet you have to go to the ICS tab in Network Manager and share from Wlan1 to Wlan0...... You've got to remember to hit save on this everytime you want to ICS after reboot, unless you click the check box that says start on boot.

I'm not to sure about wardriveing, but if your looking for networks in airodump, you should be able to see networks by using these commands:


airmon-ng
airmon-ng start wlan1
airodump-ng mon0
[/CODE]

Link to comment
Share on other sites

hmm.... if all else fails, you might want to try a clean flash. A clean flash is the only thing I can guarantee will fix the problem. Do you own a UART?

In regards to Network Manager... can you ping google? or is it a Internet Connection Sharing problem.

You've got to remember, in order to share internet you have to go to the ICS tab in Network Manager and share from Wlan1 to Wlan0...... You've got to remember to hit save on this everytime you want to ICS after reboot, unless you click the check box that says start on boot.

I'm not to sure about wardriveing, but if your looking for networks in airodump, you should be able to see networks by using these commands:


airmon-ng
airmon-ng start wlan1
airodump-ng mon0
[/CODE]

You can't guarantee that a clean flash will fix the issue - sorry.

A clean flash is no different to a flash over the UI or serial. The difference is that you can do a clean flash when your pineapple is bricked.

The same process is used for all three methods.

Best Regards,

Sebkinne

Link to comment
Share on other sites

touch /usb/wpa-supplicant.conf


network={
ssid="SSIDName"
psk="wpa key/passphrase"
}
[/CODE]

touch /usb/wireless-connect.sh

chmod +x /usb/wireless-connect.sh

[CODE]
#!/bin/sh
#Change the Mac address of the usb wifi to something random.
ifconfig wlan1 down
macchanger -A wlan1
ifconfig wlan1 up

#WPA2 - Let's assume we're going to connect to a WPA2 network
wpa_supplicant -B -D nl80211 -i wlan1 -c /usb/wpa_supplicant.conf
#WEP - Uncomment if you want to conect to a WEP network
#iwconfig wlan1 mode managed key your_key_here
#iwconfig wlan1 essid "your access point name here"
#OPEN - Uncomment if you want to conect to a WEP network
#iwconfig wlan1 essid "your access point name here"

#Setup ipforwarding via iptables.
echo 1 > /proc/sys/net/ipv4/ip_forward
#Reset iptables
iptables -F
iptables -X
iptables -A FORWARD -o wlan1 -i br-lan -s 172.16.0.0/24 -m conntrack --ctstate NEW -jACCEPT
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -A POSTROUTING -t nat -j MASQUERADE
#Wait for 7 seconds to give enough time for association.
sleep 7
#Grab an ip via DHCP
udhcpc -i wlan1
[/CODE]

/usb/./wireless-connect.sh

I would also suggest re-flash because your radio0 radio1 ect could be messed up and a flash will be best.

Edited by petertfm
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.

  • Recently Browsing   0 members

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