Tagged: arp spoof
- This topic has 8 replies, 2 voices, and was last updated 4 years, 2 months ago by Diego Pérez.
- AuthorPosts
- September 26, 2020 at 12:56 pm #46048lama.samraParticipant
hello i am trying to run the arp spoof program in this course but every time I get this, cam you please help me with it?
(Traceback (most recent call last):
File “arp_spoof.py”, line 15, in <module>
spoof(“10.0.2.2”, “10.0.2.1”)
File “arp_spoof.py”, line 12, in spoof
target_mac = get_mac(target_ip)
File “arp_spoof.py”, line 9, in get_mac
return answered_list[0][1].hwrsc
File “/usr/local/lib/python2.7/dist-packages/scapy/packet.py”, line 237, in __getattr__
return self.payload.__getattr__(attr)
File “/usr/local/lib/python2.7/dist-packages/scapy/packet.py”, line 237, in __getattr__
return self.payload.__getattr__(attr)
File “/usr/local/lib/python2.7/dist-packages/scapy/packet.py”, line 237, in __getattr__
return self.payload.__getattr__(attr)
File “/usr/local/lib/python2.7/dist-packages/scapy/packet.py”, line 235, in __getattr__
fld, v = self.getfield_and_val(attr)
File “/usr/local/lib/python2.7/dist-packages/scapy/packet.py”, line 1291, in getfield_and_val
raise AttributeError(attr)
AttributeError: hwrsc
)September 26, 2020 at 6:39 pm #46051Diego PérezModeratorHi!
It looks like you have a typo in your code, you have used hwrsc instead of hwsrc.Let me know how it goes!
DiegoOctober 6, 2020 at 1:32 pm #46458lama.samraParticipanthello,
now it is giving me this errore
raceback (most recent call last):File “arp_spoof.py”, line 29, in <module>
spoof(target_ip, getaway_ip)
File “arp_spoof.py”, line 15, in spoof
target_mac = get_mac(target_ip)
File “arp_spoof.py”, line 12, in get_mac
return answered_list[0][1].hwsrc
File “/usr/local/lib/python2.7/dist-packages/scapy/plist.py”, line 89, in __getitem__
return self.res.__getitem__(item)
IndexError: list index out of range
October 7, 2020 at 6:33 pm #46492Diego PérezModeratorHi!
That can happen becuase you are not using the proper ips or the machines are connected to different networks.Can you show the results of:
ifconfig and route -n in kali
ipconfig in windows
Can you share a screenshot of the Network settings used in VirtualBox for both machines?Thanks!
DiegoOctober 8, 2020 at 9:56 am #46509lama.samraParticipantfor linux ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500inet 192.168.1.37 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::a00:27ff:fe59:fbfa prefixlen 64 scopeid 0x20<link>
ether 08:00:27:59:fb:fa txqueuelen 1000 (Ethernet)
RX packets 51 bytes 5341 (5.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 30 bytes 3036 (2.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 24 bytes 1356 (1.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 24 bytes 1356 (1.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 100 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 100 0 0 eth0
ipconfig for windows
Network settings for linux
Network settings for windows
- This reply was modified 4 years, 2 months ago by lama.samra.
October 8, 2020 at 10:06 am #46511lama.samraParticipantOctober 8, 2020 at 11:59 pm #46589Diego PérezModeratorHi!
You are using different networks for each machine. You need to attach them to the same NAT Network.Let me know how it goes!
DiegoOctober 10, 2020 at 11:23 am #46645lama.samraParticipantOctober 10, 2020 at 6:59 pm #46653Diego PérezModeratorHi!
There’s something weird with your network, can you share the settings for topgun network?Also try to create a new NAT Network and left the default ip range, then attach both machines ot it.
Let me know.
Diego - AuthorPosts
- You must be logged in to reply to this topic.