def badNose(self, subnet): """ This method is for detecting network sniffers remotely on your network Usage: wrb.badNose(subnet='192.168.1.0/24') """ self.subnet = subnet promiscping(self.subnet)
def detect_promiscuous(self, evt): self.inet = ('lo' if self.text_ctrl_5.GetValue() == ' ' else self.text_ctrl_5.GetValue()) d = str( promiscping('127.0.0.1/8089', iface=self.inet, fake_bcast='ff:ff:ff:ff:ff:fe')) e = d.split()[5:] f = d.split()[:5] for i in list(zip(e, f))[1:4]: if int(i[1].split(':')[1]) == 0: self.Print( 'Atacante no puede obtener ping requests de forma promiscua en {}' .format(i[0].split(':')[0])) else: self.Print( 'Respondidos {} ping requests en {} de forma promiscua. El servidor es vulnerable' .format(i[1].split(':')[1], i[1].split(':')[0])) if int(i[0].split(':')[1]) == 0: self.Print( '{} ping enviado pero el atacante no obtuvo ninguna respuesta' .format(i[0].split(':')[0])) else: self.Print( 'Atacante no obtuvo respuesta de {} paquetes de {}'.format( i[0].split(':')[1], i[0].split(':')[0])) evt.Skip()
import sys from scapy.all import promiscping if len(sys.argv) < 2: print sys.argv[0] + " <net>" sys.exit() promiscping(sys.argv[1])
#!/usr/bin/python import sys from scapy.all import promiscping if len(sys.argv) < 2: print sys.argv[0] + " <net>" sys.exit() promiscping(sys.argv[1])