Tagged: arp spoofer
- This topic has 5 replies, 2 voices, and was last updated 4 years, 3 months ago by Diego Pérez.
- AuthorPosts
- September 21, 2020 at 8:32 pm #45836NikolajevZjParticipant
Hello,
Recently I’ve been using the arp spoofing program written in this course.I encountered a following problem.When i run the MITM attack windows VM loses connection,i executed the echo 1 > /proc/sys/net/ipv4/ip_forward command but it still doesn’t work,I had this problem before but i somehow fixed it, I don’t remember how.Could you help me?September 22, 2020 at 5:55 am #45848Diego PérezModeratorHi!
Try by flushing iptables before running the attack:
iptables –flush
iptables –table nat –flush
iptables –delete-chain
iptables –table nat –delete-chain
iptables -P FORWARD ACCEPTEnable port forwarding
echo 1 > /proc/sys/net/ipv4/ip_forwardHope it helps!
DiegoSeptember 22, 2020 at 7:53 pm #45867NikolajevZjParticipantHello!
Thanks to the commands you’ve mentioned I was able to deal with my issue.Firstly I’ve noticed that I’ve been calling the commands with the subprocess in an innapropriate way,I can’t figure out how to call them properly,they just don’t get executed,I need to type them manually.Before when I typed the echo command manually I think the iptables were blocking it,cause I think I didn’t stop the dns spoofer and they were refreshing each second.Anyway what I did,was just typing iptables –flush and restarting the spoofer,it works now,thanks once again!But there’s is one thing,the dns spoofer cuts the connection,and as I have written I can’t deal with calling the echo and iptables commands.
I would like to make to make the program more convienient to use,by automating the necessary commands.I was calling both the echo and iptables commands like this:
def ip_tab():
command_line = “iptables -I FORWARD -j NFQUEUE –queue-num 0”
args = shlex.split(command_line)
subprocess.Popen(args)
I copied this method from stack overflow,because with the echo command it was showing some kind of directory error.
I also tried the subprocess.call with both commands but it didn’t work either.I’m stuck!Can you help me out?September 22, 2020 at 11:57 pm #45870Diego PérezModeratorHi!
Yeah, that shlex implemenattion might be used in a different situation.I’ll recommend to use the os module, it’s quite simple to use, as an example:
os.system(“echo 1 > /proc/sys/net/ipv4/ip_forward”)
I have used this my self and works pretty well.
Hope it helps!
DiegoSeptember 23, 2020 at 6:59 am #45904NikolajevZjParticipantHi!
Yeah,the os.system command worked,the kali is forwarding the packets correctly.Thanks!September 24, 2020 at 1:07 am #45961Diego PérezModeratorHi!
Cool you got it!
Diego - AuthorPosts
- You must be logged in to reply to this topic.