0

So I want to write this small C# application that would be able to sniff packets (DNS packets in particular) using the promiscuous mode. Also, I want to avoid using WinPcap as I don't want to force user to install any additional software.

The problem is that I have absolutely no idea how to switch NIC to promiscuous mode with code, or how to test in windows if the NIC is actually on.

Also, I tried sniffing for packets with Wireshark, but even though the checkbox for promiscuous mode was selected, I still couldn't see any packets that must have been sent/received by my phone (uses Windows Phone 7.8) that I'd connected to the same network (and yes, I turned off the mobile internet first, to be certain it was using my WiFi).

So how do I turn the promiscuous mode on and how can I check in the system that it's actually on?

tgogos
  • 23,218
  • 20
  • 96
  • 128
Kamil Janowski
  • 1,872
  • 2
  • 21
  • 43

1 Answers1

0

If your sniffer machine is on the same wireless network, this may work, but I think only if your wireless adapter supports "monitor" mode. Otherwise, if your sniffer machine is connected to the same network via Ethernet, I don't think you'll necessarily see packets from your windows phone unless they are broadcast/multicast packets (and not handled by the router, i.e., DHCP, instead of being broadcast to other nodes in the network, i.e., your sniffer machine).

Aaron
  • 594
  • 2
  • 12