🍩
HackBook.io
  • Pentesting Pocket Book for hackers and developers.
  • Reconnaissance
    • Internal Recon Basics
    • OSINT
      • Infrastructure
      • Recon-ng
      • Users
      • Google Dorks
    • Active Scanning
      • NMAP
        • NSE
          • reconnoitre
        • NMap Evasion
      • NC Scan
      • Finger Printing
    • Web Server OSINT
      • WhatWeb
      • Subdomains
      • Directory & File Enumeration
        • Enumeration
          • GoCutty
          • gobuster
          • Dirb
          • nikto
        • Fuzzing
        • Crawling
  • Web Application Hacking
    • Web 101
      • Clients
      • Servers
      • Encodings
    • Web Hacking Techniques
      • SOP
      • Open Redirect
      • File & Resource Attacks
        • Directory Traversal
          • Dir Traversal Fuzzer
        • LFI
        • RFI
        • Unrestricted File Uploads
      • XSS
        • DOM
        • Stored
        • Reflected
        • Blind
        • Self XSS
      • XXE
        • XXE Payloads
      • XPath
      • SSRF
      • CSRF
      • SQLi
        • SQL Basics
        • Securing SQL
        • Hacking SQL
          • sqlmap
          • In-Band
          • Error Based
          • Blind
      • Authorization
      • Session Hijacking
      • Command Injection
      • Insecure Deserialization
      • File Uploads
        • File Upload Mitigations
      • HPP
      • Click Jacking
        • Adobe SWF Investigator
      • HTTP Response Splitting
      • Flash 101
        • Flash Hacking
      • HTML5
        • WebSockets
        • CORS
          • iframe
          • Headers
    • Web Hacking Procedures
      • Captcha
      • Username Generation
      • Username Enumeration
      • Inhouse WebApps
      • SSL Cert Generation
      • CMS
        • WordPress
        • Joomla
      • Popular Exploits
        • Bludit CMS
        • ShellShock
        • WebDav
  • Weaponization
    • Buffer Overflows (BOF)
      • DSBOFG
        • Scripts
  • Initial Access
    • 😈Services
      • Finger
      • SNMP
      • LDAP
      • SMTP
      • NFS
      • RPC
        • RPCBind
      • RDP
      • SQL
        • NoSQL
      • POP3
      • Samba
      • SMB
      • SSH
      • Telnet
      • NetBios
      • VOIP/SIP
      • DNS
        • DNS Lookups
        • Zone Transfer
        • SubDomain Enums
        • dnsdumpster
    • 😈Shells
      • Powercat
      • Odd Shells
      • Troubleshoot
      • TTY/PTTY
  • Persistence
    • File Transfers
      • Py->Exe->Txt
      • Cross compile example
    • Backdoors
  • Privilege Escalation
    • Universal Escalation
    • Windows Escalation
      • Automated
      • Popular Exploits
        • ActiveXObject to Wscript RCE
        • Macros
        • Object Linking
    • Linux Escalation
      • Automated
    • Passwords
      • John
      • Medusa
      • Cewl
      • ncrack
      • Crunch
      • Hydra
      • MITM
      • Responder
        • SAM
          • pwdump and fgdump
          • Pass-the-hash
      • Crack the hash
      • NTLM
  • Network Discovery
    • Network Traffic
      • tcpdump
    • Internal Discovery
  • Collection and Staging
    • Collection
      • File types
  • Hacking Objectives
    • Non Kinetic War (Quick Guide)
  • Procedures
    • Bash Guide
    • Active Directory
    • Crypto 101
    • Forensics
  • Glossary
  • Hacking Frameworks
    • Metasploit
      • msfvenom
    • Dsnif
  • ThreatModeling
    • Threat Modeling Overview
  • Certifications
    • VMDR
      • Qualys Asset Management
      • Qualys Vulnerability Management
      • Qualys Threat Prioritization
      • Qualys Response (Patch Deployment)
    • OSCP Cheat Sheet
  • RF - Radio Frequency
    • Ham Technician
Powered by GitBook
On this page

Was this helpful?

  1. Privilege Escalation
  2. Passwords

MITM

PreviousHydraNextResponder

Last updated 3 years ago

Was this helpful?

MITMs are typically a LAN based attack that abuses layer2/3 protocols like arp,dhcp. SUMMARY: Back in the days of network HUBs we only needed a NIC that could go into promiscuous mode and our computer could sniff the traffic of any frame no matter the MAC since they were all knocking at our door anyways. But now we use switches that send the frame to the registered port and this makes sniffing far more difficult. There are some attacks that overflow the switches to get them to act like hubs so we can snif. Sniffing can be passive or active- Active: (MAC flooding)(ARP poisoning) Not stealthy Passive: Just listen with wireshark and see what you hear and try to get sensitive information. Almost impossible to detect this method Arp was made as away to quickly map layer 3 IPs with layer 2 MAC addresses. There are 2 types of ARP protocol packets(request/reply). This works in conjunction with an arp tables that stores these mappings with a ttl. Every network component on a network has an arp table on it. ARP tables: (win)#arp -a (lin)#arp When a computer wants to send something to another IP on the network it will first check its arp table to see if there are any mapping for a mac address. If there are it will pull the mac address and add it to the layer 2 part of the frame and send it out. If not found then it will send an arp request for the IP: src_ip:sender src_mac:sender dest_ip:who we want to check dest_mac:FF:FF:FF:FF:FF:FF //this indicates the broadcast This request will go to every node in the broadcast domain. Any node that does not match the dest ip will drop the packet. Matching Ip will respond with its MAC. MAC Flooding: Here we flood the CAM table on the switch which holds the following entries: <MAC - port - TTL> When we fill the CAM table we make it where any new MAC seen on the network will not be saved to the switch and will be sent out in a hub fashion. ARP Poisoning: We can do what is called a Gratuitous arp reply where we send out our MAC to the nodes to tell them what our MAC is without them asking. We can do this either to the gateway or a host. We need to send these about every 30 seconds (faster than the cache time out) in order to hold our spot in the middle. After the attack we should expunge our MAC from the cache with the real Mac just be be safe. There are tools to detect arp poisoning but not much to stop it. (tool dsniff) Host: We can send these arp reply's to insert ourselves between 2 computers by spoofing the IP and giving our mac.

Gateway: This method we send our MAC as the gateway IP to trick all nodes or a subset of nodes on the network that we are the gateway. Then all request are sent to the real gateway as if they were us.

We can also dos ourselves if we grab to many hosts and cant handle the requests fast enough.