Tagged: 

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #46048
    lama.samra
    Participant

    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
    )

    #46051
    Diego PérezDiego Pérez
    Moderator

    Hi!
    It looks like you have a typo in your code, you have used hwrsc instead of hwsrc.

    Let me know how it goes!
    Diego

    #46458
    lama.samra
    Participant

    hello,
    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

    #46492
    Diego PérezDiego Pérez
    Moderator

    Hi!
    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!
    Diego

    #46509
    lama.samra
    Participant

    for linux ifconfig
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500

    inet 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

    ipconfig
    Network settings for linux
    network linux
    Network settings for windows
    network windows

    • This reply was modified 4 years, 1 month ago by lama.samra.
    #46511
    lama.samra
    Participant

    wind-ipconfi
    windows-net
    Untitled

    #46589
    Diego PérezDiego Pérez
    Moderator

    Hi!
    You are using different networks for each machine. You need to attach them to the same NAT Network.

    Let me know how it goes!
    Diego

    #46645
    lama.samra
    Participant

    hello
    thank you for helping me! but I attached them and the same problem still exist, I really feel bad:(
    network
    ipconfig
    ifconfig

    #46653
    Diego PérezDiego Pérez
    Moderator

    Hi!
    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

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.