wraith-wireless / PyRIC

Python wireless library for Linux
http://wraith-wireless.github.io/PyRIC
Other
95 stars 50 forks source link

Interference of NetworkManager on managed interface #31

Open sophron opened 7 years ago

sophron commented 7 years ago

On Wifiphisher, we need to spawn a vif on managed mode that NetworkManager does not interfere with, so we can pass it to hostapd. Otherwise, hostapd will fail to set it on AP.

From the README:

In my experience, virtual interfaces are primarily used to recon, attack or some other tomfoolery but can also be used to analyze your wireless network. In either case, it is generally advised to create a virtual monitor interface and delete all others (on the same phy) - this makes sure that some external process like NetworkManager does not interfere with your shenanigans.

This seems to be true when you create a vif on Monitor mode. However, when I create a vif on Managed mode, NetworkManager will find it and interfere with it either way. For example, if you create a pyric0 vif (on managed mode) and delete (or not) the rest on the same phy, nmcli dev status will show the vif as recognized by NetworkManager. I come to the conclusion that the only way to avoid this interference is by either killing these kind of procs (e.g. like airmon-ng check kill does) or tell NetworkManager to stop messing with it (by specifying it to its .conf).

I am wondering if there is a way to spawn a vif directly on AP (or Master) mode (e.g. using devadd). Network-manager should not interfere with it then, and hostapd should happily accept it too.

wraith-wireless commented 7 years ago

Sorry for the late response, will look into this