Network Attacks /Harvesting/MITM

Guides and Reference

Guides and Reference

Tools

Network Level Attacks

https://book.hacktricks.xyz/pentesting/pentesting-network#lan-attacksd

  • ARP cache poisoning

    • First you must set up IP forwarding to forward any extraneous packets received to their proper destination

      • # echo 1 > /proc/sys/net/ipv4/ip_forward

    • Display your machine's current ARP cache

      • # arp -a

    • Use the arpspoof command to masquerade as another IP

      • #arpspoof -i eth0 -t [target IP] [IP to spoof as]

    • To set up an ARP MITM you will need to set it up in both directions

      • #arpspoof -i eth0 -t [IP1] [IP2]

      • #arpspoof -i eth0 -t [IP2] [IP1]

    • You can set one of the IPs as your default gateway then start wireshark to capture all traffic a target creates going outbound

  • Attacks after ARP Spoofing

    • Sidejacking - Sniffing session tokens and using them to auth the user

      • Use Firesheep

      • Hampster/Ferret - acts as a proxy server and replaces you cookies with session cookies stolen from someone else

See the Special Targets section for more tools on attacking Cisco Devices

pageSpecial Targets

MITM Methodology

  • Most MITM programs use SSLStrip/SSLstrip+ to intercept HTTPS data by "downgrading" them to HTTP.

  • SSLStrip+ will work against TLS and SSL if HSTS is not used.

  • SSLStrip+ will work on anything that does not have HSTS preloaded.

  • SSLStrip+ will only work on non-preloaded HSTS websites.

  • We can intercept HTTPS non-HSTS websites but users are presented with multiple warnings before visiting the desired website.

  • We cannot MITM anything HSTS related (FaceBook, Twitter, IG, etc.).

  • For best results

    • An attacker computer running Kali directly from USB or as the host OS.

    • A separate computer to be the target (Windows or MacOS preferably).

    • Attacker and Target computer/laptops connected to the same home network as you with internet connectivity.

    • Restart Kali after each tool example.

Last updated