mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-16 10:03:52 -07:00
added PoC DNSspoof plugin
This commit is contained in:
parent
0f78e0c033
commit
cf7c9e9e10
2 changed files with 88 additions and 3 deletions
|
@ -10,7 +10,6 @@ class ArpSpoof(Plugin):
|
|||
name = "ARP Spoof"
|
||||
optname = "arpspoof"
|
||||
desc = 'Redirect traffic using arp-spoofing'
|
||||
implements = []
|
||||
has_opts = True
|
||||
|
||||
def initialize(self,options):
|
||||
|
@ -43,7 +42,7 @@ class ArpSpoof(Plugin):
|
|||
file = open('/proc/sys/net/ipv4/ip_forward', 'w')
|
||||
file.write('1')
|
||||
file.close()
|
||||
os.system('iptables -F && iptables -X && iptables -t nat -F && iptables -t nat -X')
|
||||
#os.system('iptables -F && iptables -X && iptables -t nat -F && iptables -t nat -X')
|
||||
os.system('iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port %s' % self.port)
|
||||
|
||||
if self.mode == 'req':
|
||||
|
@ -106,7 +105,7 @@ class ArpSpoof(Plugin):
|
|||
file = open('/proc/sys/net/ipv4/ip_forward', 'w')
|
||||
file.write('0')
|
||||
file.close()
|
||||
os.system('iptables -t nat -F && iptables -t nat -X')
|
||||
os.system('iptables -F && iptables -X && iptables -t nat -F && iptables -t nat -X')
|
||||
print '[*] Re-arping network'
|
||||
pkt = Ether(src=self.routermac, dst='ff:ff:ff:ff:ff:ff')/ARP(psrc=self.routerip, hwsrc=self.routermac, op=2)
|
||||
sendp(pkt, inter=1, count=5, iface=self.interface)
|
Loading…
Add table
Add a link
Reference in a new issue