Jump to content

wifi card problem in monitor mode


gabri

Recommended Posts

Hi!

I normally use a pc with a built in wifi card (wlan0), but this do not support injection and monitor mode. So I had to buy an external card (wlan1) which allows me to do that: this is the Alfa NHA.

The problem is that when I connect the usb card, it connects to my router, and also wlan0 connect to it (so two cards connected to internet). Then, when I switch wlan1 to monitor mode, also wlan0 goes in monitor mode (the result is that wlan0 doens't work, since can't go in monitor). The problem occur when I have to use programs that require both a monitor mode and a connection to internet, because I can't connect to internet.

Could you please help me to solve this problem?

Thank you

Link to comment
Share on other sites

Hi @barry99705, of course! This is what I type (wlan0 is the internal wireless card, wlan1 the USB card):

ifconfig wlan1 down
macchanger -r wlan1 --> I've tried also without this option and still doesn't work
iwconfig wlan1 mode monitor
ifconfig wlan1 up

Doing this, wlan1 goes into monitor mode, and wlan0 does the same, so no internet connection.

I also add my networkmanager .conf file. This is what it looks like:

___________________________________

[main]

plugins=ifupdown,keyfile

[ifupdown]

managed=false

___________________________________

I've found a thread on other website, in which they suggest to add a line; I did it, but didn't solved the problem. The line is:

[keyfile]

unmanaged-devices=interface-name:wlan0mon;interface-name:wlan1mon;interface-name:wlan2mon;interface-name:wlan3mon;interface-name:wlan4mon;interface-name:wlan5mon;interface-name:wlan6mon;interface-name:wlan7mon;interface-name:wlan8mon;interface-name:wlan9mon;interface-name:wlan10mon;interface-name:wlan11mon;interface-name:wlan12mon

Other infos that I can provide are that I'musing the latest version of KaliLinux and the OS is in persistence on my HDD.

Hope you can help,

Thank you.

Link to comment
Share on other sites

Well that's weird.  I can run the same commands and it works properly.

root@xps:/home/barry# ifconfig wlan1 down
root@xps:/home/barry# iwconfig wlan1 mode monitor
root@xps:/home/barry# ifconfig wlan1 up
root@xps:/home/barry# iwconfig
wlan0     IEEE 802.11  ESSID:"XXXXXXX"  
          Mode:Managed  Frequency:5.745 GHz  Access Point: 0A:18:D6:XX:XX:XX  
          Bit Rate=180 Mb/s   Tx-Power=22 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on
          Link Quality=43/70  Signal level=-67 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:13   Missed beacon:0

wlan1     IEEE 802.11  Mode:Monitor  Frequency:2.412 GHz  Tx-Power=20 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          
lo        no wireless extensions.

root@xps:/home/barry# 

Can you try it by just booting off the Kali DVD?

Link to comment
Share on other sites

https://bbs.nextthing.co/t/is-it-possible-to-connect-wlan1-and-wlan0-to-separate-networks-simultaneously/8699/3

"The CHIP WiFi solution provides two interfaces called wlan0 and wlan1. At any one time, only one of them may have an active connection to an Access Point. The other one that is not being used to connect to an Access Point can itself be used as the endpoint for itself being a local Access Point."

"...if you check out your dmesg and it complains about firmware, do an lsusb to find out the vendor of the WiFi dongle chip involved and install the firmware package for that vendor"

Link to comment
Share on other sites

 
 
"I just followed the same steps as you, using a miserable Broadcom BCM433x for internal wifi device and a USB tp link and I had no problem. If I recall right, I had had losses of connection some time ago with Broadcom badly supported devices on Debian when trying what you do. If you lose connection just after launching airodump-ng wlan0, I can only suggest to look for some sort of logs and eventually, switch between wlan0 and wlan1 just for the try..."
Link to comment
Share on other sites

Also, is 'wpa_supplicant' still running after you enable monitor mode?

I can see wpa_supplicant being an issue - If it's enabled, monitor mode doesn't work correctly. If it's disabled, the internet doesn't work correctly.

This is why I personally use 2 separate devices for internet and capture. RPis are pretty cheap.

Link to comment
Share on other sites

Thanks for the help!

Yes, wpa_supplicant was one of my worst nightmares.. I learnt the hard way how it works: I was used to do the "airmon-ng check kill" command while switching into monitor mode, and it actually worked, but as you said, it killed the internet connection. So I managed to leave it running. So far, it's no more a problem.

The line I added (which I provided on a previous post...[keyfile]...), seems to work: I mean, now I can both connect to internet and have a monitor card running together. The only problem I can see is that on the upper right window, where you can select the network, the card connected to internet has the classic wifi icon; the usb one, in monitor mode, has changed icon to a white square. I don't know what this means, if it's only graphic or meaning that I have fuc**ed up something.

By the way, I really can't understand why this work with airmon-ng command and not with ifconfig/iwconfig/ifconfig process. This evening I'll try to check for firmware update like you said, also because the pc is quite old and it could be the problem.

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...