• ARP Spoofing
  • Poisoning Attacks | 69
  • Learning Kali Linux




    Download 22,59 Mb.
    Pdf ko'rish
    bet71/225
    Sana14.05.2024
    Hajmi22,59 Mb.
    #232856
    1   ...   67   68   69   70   71   72   73   74   ...   225
    Bog'liq
    learningkalilinux

    Ethics Warning
    While spoofing attacks are used by attackers, they are not some‐
    thing that you should be doing on a network you are testing, unless
    it falls into the scope of what you have said you would test against.
    There is the possibility of data loss using this technique.
    ARP Spoofing
    The Address Resolution Protocol (ARP) is a simple protocol. The assumption is
    when your system needs to communicate on the network but it has only the IP
    address and not the MAC address, it will send out a request (who-has) to the net‐
    work. The system that has that IP address will respond (is-at) by filling in the MAC
    address for its system. Your system then knows the MAC address for the target sys‐
    tem and can send the message it’s been holding to the correct destination.
    To be efficient, your system will cache that mapping. In fact, it will cache any map‐
    ping that it sees go by. ARP assumes that the only time a system will indicate that it
    owns an IP address is when someone has asked. As it turns out, though, that’s not the
    case. If I were to have my system send out an ARP response (is-at) saying that I
    owned your IP address and that anyone trying to get to that IP address should send to
    Poisoning Attacks | 69


    my MAC address, I would get messages destined for you. By sending out an ARP
    response indicating your IP address is at my MAC address, I put myself into the mid‐
    dle of the communication flow.
    This is only single-direction, though. If I end up spoofing your IP address with my
    MAC address, I’m getting only messages that were supposed to go to you. To get the
    other end of the conversation, I would need to spoof other addresses. You may, for
    example, spoof the local gateway in order to capture messages to and from you and
    the internet. This takes care of only getting the messages to me. I have to also get the
    messages back out to the intended targets, or the communication just stops because
    no one is getting messages they expect to get. This requires my system to forward the
    initial message out to the intended target.
    Since ARP caches do time out, if I don’t keep having my system sending these mes‐
    sages, eventually the cache will time out and then I won’t get the messages I want any‐
    more. This means that I need to keep sending out these messages, called gratuitous
    ARP messages. A 
    gratuitous ARP message
    is one that hasn’t been requested but
    offered nonetheless. There are legitimate reasons for this behavior, but they aren’t
    common.
    While other tools can be used for this, we can use the program Ettercap. Ettercap has
    two modes of functioning. The first is a curses-style interface, meaning it runs in a
    console but isn’t strictly command line. It presents a character-based GUI. The other
    one is a full Windows-based GUI. 
    Figure 2-8
    shows Ettercap after our target hosts
    have been selected and the ARP poisoning has been started. To start the spoofing
    attack, I scanned for hosts to get all of the MAC addresses on the network. Then, I
    selected the two targets and started the ARP spoofing attack.

    Download 22,59 Mb.
    1   ...   67   68   69   70   71   72   73   74   ...   225




    Download 22,59 Mb.
    Pdf ko'rish