13

In new version of Kali 2.0 with updated "aircrack-ng" tool, there is a problem between Internet connection and using cracking tools.

I have my wireless card as wlan0. And the Internet connection is fine too. Then, what I do is:

airmon-ng start wlan0
airodump-ng wlan0mon

Now the airodump-ng doesn't work, saying "Device or resource busy".

In order to run this I have to kill some processes, using:

airmon-ng stop wlan0
airmon-ng check kill
airmon-ng start wlan0
airodump-ng wlan0mon

Now the cracking process is up.

I can start cracking, but now I cannot connect to the Internet after the kill process.

On typing iwconfig in terminal, I get this:

root@kali:~#iwconfig
wlan0mon IEEE 802.11bgn  ESSID:"myessid"  
      Mode:Managed  Frequency:2.412 GHz  Access Point: 00:00:00:00:00:00   
      Bit Rate=108 Mb/s   Tx-Power=20 dBm   
      Retry short limit:7   RTS thr:off   Fragment thr:off
      Encryption key:off
      Power Management:off
      Link Quality=42/70  Signal level=-68 dBm  
      Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
      Tx excessive retries:2  Invalid misc:9   Missed beacon:0

eth0      no wireless extensions.
lo        no wireless extensions.

And, on running ifconfig on terminal, I get this:

root@kali:~#ifconfig
lo        Link encap:Local Loopback  
      inet addr:127.0.0.1  Mask:255.0.0.0
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:65536  Metric:1
      RX packets:5604 errors:0 dropped:0 overruns:0 frame:0
      TX packets:5604 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:452904 (442.2 KiB)  TX bytes:452904 (442.2 KiB)

There is no wlan0 or wlan0mon. I also restarted the network manager by:

service network-manager restart

But nothing changed. Though it displays wlan0 when checked using ifconfig this time.

1
  • I think you should also start service wpa_supplicant... Check which services were killed by airmon-ng check kill Commented Mar 14, 2021 at 7:13

5 Answers 5

15

I had nearly the same issue. After messing around with airmon-ng I couldn't connect to any networks. Even the network manager icon disappeared from the taskbar (KDE). If I checked iwconfig, I would see eth0, lo, and wlan0mon instead of just wlan0. Doing:

ifconfig wlan0 up 

just told me no such device exists. That clued me into how to potentially fix the mode.

Here are the commands that restored my internet access:

First, restart your network manager:

 service NetworkManager restart

(Your network manager service might be called Network-Manager)

Let's see what your wireless adapter is doing:

 iwconfig

(It might be called something like wlan0mon instead of wlan0 indicating it is in monitor mode still)

Since it is still in monitor mode, let's turn the normal mode back on:

 airmon-ng start wlan0 7

(The last number is the channel and can probably be omitted)

Now let's stop the monitoring interface:

 airmon-ng stop wlan0mon

And finally, let's turn your normal network adapter back on:

 ifconfig wlan0 up

Check for the normal adapter now:

 ifconfig

(Should no longer show the "mon" equivalent and instead show wlan0 or whatever your adapter is called in normal mode)

Now you can use your network manager app to reconnect to the network for browsing.

Not sure why I haven't seen this solution. Most end up rebooting to get back to normal internet mode.

0
4

Don't use the airmon-ng check kill command to fix any errors or problems, instead, use the following commands to start monitor mode:

$> sudo ifconfig wlan0 down
$> sudo iwconfig wlan0 mode monitor
$> sudo ifconfig wlan0 up
$> sudo aireplay-ng wlan0
2

For now, on Kali 2.0, the only solution I've found for this is to reboot. I've tried 3 different USB adapters with compatible chipsets, in a dual-boot environment and in a VM, and I've tried countless ways to reconnect to the internet after killing the appropriate processes for airmon. No combination that I've tried has ever regained internet connectivity. I add this here as it is an accurate, though unfortunate, solution, in hopes that the answer can be improved upon.

2
  • I don't have the rep to answer, but you can systemctl stop NetworkManager; systemctl stop wpa_supplicant then do the airmon-ng things, then ifconfig wlan0 down; iwconfig wlan0 mode managed; ifconfig wlan0 up; systemctl start wpa_supplicant; systemctl start NetworkManager and it should get everything running again. Commented Dec 6, 2023 at 21:32
  • you usually dont have to do a full reboot, restarting he network service would usually fix it Commented Aug 28 at 1:18
0

Here is a modern solution that works:

Do not use airmon-ng to start monitor mode because restoring WI-FI may not be possible without also re-attaching adapter or restarting system

Start monitoring mode using iw instead of airmon-ng
Use airmon-ng only to check for services which to stop with systemctl

Omit sudo if you're root.

# Bring NIC down
sudo ip link set wlan0 down

# Check for services that need to be stopped
sudo airmon-ng check

# Stop all services from previous output, e.g.:
sudo systemctl stop NetworkManager
sudo systemctl stop wpa_supplicant

# Start monitor mode without any flags
sudo iw wlan0 set monitor none

# Bring NIC back up
sudo ip link set wlan0 up

# See if there is monitoring NIC, if yes use that from now on.
# If not, use same device name.
sudo iw dev

Once you're done with monitoring and want to restore WI-FI...

First stop all processes such as airmon-ng aireplay-ng or aircrack-ng...

# If there is monitoring NIC, use that to disable monitor mode
sudo iw dev

sudo ip link set wlan0 down

# Stop monitoring mode with iw
sudo iw wlan0 set type managed

sudo ip link set wlan0 up

# Restart all services that you previously stopped, to regain WI-FI, e.g.:
sudo systemctl restart wpa_supplicant
sudo systemctl restart NetworkManager
0

In my case I use iwd instead of NetworkManager and it would list the device in "unknown" mode (no internet). Restarting the service would fix it.

I also found the name of the driver module using lshw -class net (it's in "configuration: ... driver=xxxx ..."

Then rmmod xxxx and modprobe xxxx (replace xxxx with the name of your driver module) to reload the driver. If it complains about it being used by another module, then do it for the other module first.

That would fix it too.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.