Putting network interface in promiscuous mode (not monitor mode)
Solution 1
DISCLAIMER: I don't know how dependent this answer is on specific hardware.
airmon-ng
will enable a monitor interface without disrupting your wifi connection. Install aircrack-ng
then run something like (I'm assuming wlan0 here):
sudo airmon-ng start wlan0
Which will typically create a mon0
interface to the same physical card.
You can also try to do it with iw
(I'm assuming you are using phy0 here):
sudo iw dev #this will show you the relation between phy's and interfaces
sudo iw phy phy0 interface add mon0 type monitor
Where you will create a mon0
interface to the same physical card. See (http://linuxwireless.org/en/users/Documentation/iw/#Adding_interfaces_with_iw) for more details on using iw
.
As far as hardware goes, I usually run Atheros cards, but I've seen both of these techniques work on Broadcom cards as well, with the notable difference that when I had a mon0
interface to a broadcom card, airodump-ng
couldn't change the channel.
Solution 2
Try:
ip link set wlan0 promisc on
Related videos on Youtube
David Chouinard
Updated on September 18, 2022Comments
-
David Chouinard over 1 year
I'm looking to capture Wifi request probes while still associated with a network and otherwise not affecting that connection.
I can successfully enable monitor mode but, of course, can't join networks while in monitor mode.
I'm assuming that a network interface that supports monitor mode likely support promiscuous mode too, is that an unreasonable expectation?
I've tried running
tshark
on the interface while associated to a network (it seemstshark
makes an attempt to set the hardware in promiscuous mode), but that doesn't capture the packets I'm looking for.How do I put a wireless interface in promiscuous mode?
-
David Chouinard almost 9 yearsNope, doesn't behave any differently, nor do I see any errors.
-
David Chouinard almost 9 yearsOh, but
netstat -i
does show the interface flags asBMPRU
, where theP
stands for promiscuous. -
Wouter Verhelst almost 9 yearsPromiscuous mode means the kernel or network card won't drop packages that aren't addressed to your network card; however, it does not mean that such packages will be sent to your network card, or (if you're using wpa2) that they'll be encrypted to your network card.
-
David Chouinard almost 9 yearsYes, I know. Maybe my question wasn't clear, but I successfully used
airmon-ng
to set the interface to monitor mode. That works fine. I'm looking to put the card in promiscuous mode, not monitor mode. -
David Chouinard almost 9 yearsInteresting. Yes, that it was I'm trying to do. When I run
airmon-ng
, thewlan0
interface gets replaced withwlan0mon
. The originalwlan0
interface is no longer available. If I usewpa_supplicant
to connect withwlan0mon
, the dump collection stops. -
rexroni almost 9 yearsHave you tried the
iw
technique? I ask because I'm pretty sure that theairmon-ng
source code is actually just a bash script that goes through and tries a bunch of things. It likely tries theiw
technique but fails out and tries something else. I think if you manually run theiw
technique and it gives you an error, you might be up against a hardware limitation. ... Oh! Also runiw phy
and under the "supported commands" see if there's anew_interface
command supported. -
David Chouinard almost 9 yearsWow, that works. Phenomenal. Thank you very much.