How to put NIC into promiscuous mode?
Hi I want to put my NIC into promiscuous mode. Why? Because I wrote app which 开发者_StackOverflow社区is able potentially to detect sniffing in my local network (send modyfied appropriately ethernet packets). I just want now check it out, so in my second comp I want to set up promisc mode. There's Windows 7 and simply Dell Wireless 1397 WLAN Mini-Card...if it makes a difference.
How can I do this?
You might not be able to put that adapter into promiscuous mode. This is Windows, and the adapter is a Wi-Fi adapter, and, according to this Microsoft documentation on 802.11 drivers on Windows, "It is only valid for the miniport driver to enable the NDIS_PACKET_TYPE_PROMISCUOUS, NDIS_PACKET_TYPE_802_11_PROMISCUOUS_MGMT, or NDIS_PACKET_TYPE_802_11_PROMISCUOUS_CTRL packet filters if the driver is operating in Network Monitor (NetMon) or Extensible Access Point (AP) modes."
If your application uses WinPcap (as does, for example, Wireshark), it can't put the driver into "network monitor" mode, as WinPcap currently doesn't support that (because its kernel driver doesn't support version 6 of the NDIS interface for network drivers), so drivers that follow Microsoft's recommendations won't allow you to put the interface into promiscuous mode.
And if it could put it into monitor mode, that might disable transmitting packets; according to this Microsoft page on monitor mode, "While in NetMon mode, the miniport driver can only receive packets based on the current packet filter settings. The driver cannot send packets either on its own or through a call to its MiniportSendNetBufferLists function."
I`ve used wireshark for this sort of thing in the past
精彩评论