Detect if interface is in promiscuous mode with C

孤街浪徒 提交于 2019-12-06 07:59:27

问题


I am doing a different tools to check security of linux servers... nothing important and very similar to the tools of chkrootkit. One of the tools I want to do, is like the ifpromisc.c from chkrootkit, that is detect if one of the server interfaces is in promiscuous mode.

I found an answer on stackoverflow: howto check a network devices status in C?

But after check this solution, I noticed is only for old kernels, because new libpcap doesn't set IFF_PROMISC flag when uses PACKET_MR_PROMISC. I have been looking for other solutions without luck. Any idea?

Thanks!

来源:https://stackoverflow.com/questions/22533297/detect-if-interface-is-in-promiscuous-mode-with-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!