# Networking Fundamentals

## ARP (Address Resolution Protocol)

<figure><img src="https://2068334946-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fow1iM27u7disHeJiSlBC%2Fuploads%2FkbNyabKN4cM4mMWwcZbu%2Fimage.png?alt=media&#x26;token=233745a1-4189-4c8c-9467-1acfe84854a7" alt=""><figcaption></figcaption></figure>

* Connects every changing IP address to a fixed MAC address (Layer 2) in a Local Area Network (LAN)
* Broadcasts a packet to all devices of a network
* ARP Cache --> MAC address stored in table with Timeout

#### ARP Attacks:

1. **ARP poisoning (Spoofing)** - Attacker sends spoofed ARP packets to default gateway on a LAN to inject its MAC - IP pairing into the MAC Table; spoof MAC address of attacker
2. **ARP Scanning** - Bunch of Broadcast ARP packets (Scanner usually tries packets of Lengths of 42 & 60; 60 just has padding)

<figure><img src="https://2068334946-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fow1iM27u7disHeJiSlBC%2Fuploads%2FvMVBlZ4456ZcYVjlxT6a%2Fimage.png?alt=media&#x26;token=380c4d2c-ed11-497b-8224-57bd81b29566" alt=""><figcaption></figcaption></figure>

## ICMP (Internet Control Message Protocol)

* Purpose is to send control and error messages:
  * Traceroute Command --> show the physical path of routers (hops) & time for each hop
  * Ping Command --> Measures speed of connection between 2 points; lag
* &#x20;connectionless protocol, layer 3

Attacks:

1. Ping/ICMP Flood Attack - Flood victim device with Echo-Request packets
2. Ping of Death - Ping sent to victim machine with larger than allowable size (65535B)
3. Smurf Attacks - Attacker sends mass packets with victim's Src\_IP; Echo replies then bombards victim

## DNS



Attacks:

1. **DNS Poisoning** - Spoof IP addresses of legitimate sites

## DHCP

## TCP Handshake

<figure><img src="https://2068334946-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fow1iM27u7disHeJiSlBC%2Fuploads%2F6L1cSOyBS3n383c7qD5Z%2Fimage.png?alt=media&#x26;token=65a7c5a7-9395-4fbd-b49f-ab4644138f4f" alt=""><figcaption></figcaption></figure>
