PDA

View Full Version : Solve arimon-ng issues by a simple modfication of NetworkManager.conf



kcdtv
2015-08-30, 17:08
About the conflict between airmon-ng and NetwrokManager

You may have seen a lot of posts and topics these days about "problems with airmon-ng in Kali sana."
The mode monitor interface created by airmon-ng doesn't work and we need to use "airmon-ng check kill", which is very annoying as it simply totally stop network manager and doesn't allow us to be connected with another interface.
http://pix.toile-libre.org/upload/original/1440952762.png

First it is good to know that it is not an issue specific to Kali linux or that it is related to the "new airmon-ng" interfaces.
The problem is a general issue for any GNU-Linux distribution and occurs with all aircrack-ng version since it is caused by NetworkManager
Thanks to USUARIONUEVO (cf Kali 2.0 evitar que networkmanager nos *robe las interfaces en monitor (https://www.wifi-libre.com/topic-206-kali-20-evitar-que-networkmanager-nos-robe-las-interfaces-en-monitor-page-2.html#p1172)) we know that the conflict is generated by version superior to 0.9.8.10
Downgrading Network Manger would solve the issue but it is not an option.

Editing /etc/NetworkManager/NetworkManager.conf

This solution is "ugly" but logical and seems to be very safe with no mistake possible. Effects are inmediate.
With airmon-ng we create an interface called wlanXmon. It is only dedicated to monitor mode and it is not suposed to be handled by network manager. The problem is that Network Manager always take back the control over our wlanXmon interfaces due to some recents changes.
Let's help airmon-ng a little to keep the control on the interface by adding exceptions in our Network Manager' file.

1 : Open your /etc/NetworkManager/NetworkManager.conf file as root

sudo leafpad /etc/NetworkManager/NetworkManager.conf

2 : Add the following lines to your file

[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 # 30/08/2015: avoid conflicts with airmon-ng - https://forums.kali.org/showthread.php?27091-Solve-arimon-ng-issues-by-a-simple-modfication-of-NetworkManager-conf

3 : Save the modification. You are now able to use airmon-ng as it should be; without any need to force it by "check killing" everything
http://pix.toile-libre.org/upload/original/1440953997.png

It is not an elegant solution, but very straightforward.
You can put how many wlanXmon interfaces you want. I put 12 : it should be enough if you don't use many different dongles.
Notice that the symbol used as a separator between the interfaces is ;

Tip previously published (in Spanish) in Modificación del fichero NetworkManager.conf para arreglar airmon-ng (https://www.wifi-libre.com/topic-220-modificacion-del-fichero-networkmanagerconf-para-arreglar-airmon-ng.html#p1173)

John_Doe
2015-09-10, 22:57
Hello kcdtv, this is the bee's knees! THANK YOU!

soxrok2212
2015-09-11, 02:04
AH! Thanks buddy!

denied
2015-09-29, 07:08
Finally! Glad we sorted that out! Thanks mate!

Pepe
2015-09-30, 19:45
I find it quite elegant indeed. Thanks mate for sharing.

raellic
2016-07-23, 02:01
Great solution! Thank you very much. One addition I would make-- if you have two dedicated devices and use wlan0 for internet and wlan1 solely for monitoring, you can just add "interface-name:wlan1;" to the .conf file as an unmanaged interface. Saves the effort of creating a wlan1mon interface.

scodais
2016-10-10, 22:59
I have tried this solution, yet whenever I try to run programs which require monitoring and Internet my wlan0 disappears. I only use two interfaces so I took raellic advice and it was a no-go. Suggestions?