I have a project that is to protect my box from attack man in the middle arp poison. I should detect if interface mode of other machine is promiscuous.
I must write script python or command linux.
Information Security Stack Exchange is a question and answer site for information security professionals. It only takes a minute to sign up.Sign up to join this community
The seminal work on detection of promiscuous interfaces on the network is Detection of Promiscuous Modes using ARP Packets:
...promiscuous mode detection is performed by checking the responses of ARP packets, when ARP request packets are sent to all nodes on the network
I don't know of implementations offhand, but the paper is detailed enough for you to write your own IMHO.
I would suggest you to try scapy, if you're doing it on linux. It has great features for the case you need.