Intrusion Detection: Link-Layer and Network Layers Flashcards
TCP Header
- The application layer passes the payload down to the Transport Layer.
- The Transport Layer adds a TCP Header to the application payload
- This header includes crucial transmission information such as source and destination ports, as well as information that makes sure the TCP segment arrives as expected
IP Packet Header
- The TCP header and the application payload are now being pushed to the Internet Layer
- The Internet Layer adds the IP header
- This header includes information that makes sure the packet is delivered to the correct destination IP
During packet decapsulation, how does the Network Access layer (Data Link) know to pass the packet along to the Internet Layer (Network)
- An indicator exists that reveals what protocol follows the Ethernet header (IPv4 or IPv6)
- The Ethernet Layer passes all data following the Ethernet Header to the IPv4 handling part of the IP layer
How is encapsulation observed in Wireshark?
- On a given line of a Wireshark packet stream, several sections appear below, representing each section of the frame, that be expanded to see the bytes of a given part of the encapsulated frame
- The layers from top down are:
- Network access layer
- Internet layer
- Transport layer
- Application layer
What is IEEE 802.X?
- Link Layers; a family of standards that enable intercommunication between equipment from a variety of manufacturers
- Specifies functions of the physical layer and the data link layer of major LAN protocols
- The most common link layers being used today:
- 802.3: Ethernet
- 802.11: Wireless
- 802.15.1: Bluetooth
What are the sections of an Ethernet Frame?
- Preamble
- Recipient MAC
- Sender MAC
- Type
- Data
- Pad
- FCS
Premable
- A 64-bit information telling the receiving NIC that a frame is coming and where the frame starts
- 8 bytes
Type
- Telling the recipient basic type of data such as IPv4 or IPv6
- 2 bytes
0x0800 = IPv4
0x0806 = ARP
0x86DD = IPv6
Data
- Whatever payload the frame carries, such as IP packet
- Can be up to 1500 bytes
Pad
- The minimum frame size is 64 bytes
- If the frame is less than 64 bytes, NIC adds extra data in the Pad
FCS
- Frame Check Sequence
- Error checking mechanism
- 4 bytes
What are the security issues with ARP?
- There is no way to validate MAC address ownership
- ARP is stateless (cache/table entries are simply updated when IP/MAC pairs are observed)
What is the outcome of a successful ARP attack?
- the attacker can intercept (MITM) traffic destined for another host, inspect it, alter it, and ultimately forward it to the original/intended destination, or forward back to the sender
How do you modify Wireshark to see the source and destination MAC addresses in an ARP request/response?
View > Name Resolution > Resolve Physical Address
What is the OP code for an ARP request in Wireshark?
Opcode request (1)
What is the OP code for an ARP reply in Wireshark?
Opcode reply (2)
Gratuitous ARP Request
- a request packet where the source and destination IP are set with the IP of the machine that is issuing the packet and the destination MAC is the broadcast address
Gratuitous ARP Reply
- an ARP reply that has been sent w/o being requested
Abusing Gratuitous ARP
- Using crafted/illegitimate MAC addresses
- typically results in lots of ARP traffic
Example of malicious ARP in Wireshark?
- Lots of ARP traffic from a single MAC
- Broadcast traffic
- Each request increments by one on the requested IP address
ARP Poisoning (Internal)
- exploited to add fake information between two communication peers in a local network
- In a scenario where M (the attacker) wants to listen to all traffic between A and B
- M sends fake IP/MAC pairs to both A and B, making M the MITM
- Both A and B’s ARP cache are poisoned with MAC of M:
- A Poisoned with IP_B/MAC_M
- B Poisoned with IP_A/MAC_M
ARP Poisoning (External/Remote)
- When a host in a LAN wants to send packets to hosts outside the LAN, it uses the default gateway
- The default gateway MAC address must be used to forward packets along with the correct IP address
- Here is the process:
- Host A wants to send packets to the Internet. It already has the IP of the Gateway (IP_G), and it needs the associated MAC address.
- M can use a gratuitous ARP reply to advertise itself as the default gateway: binds IP_G with his own (MAC_M)
- All the traffic meant to leave the LAN will pass through M, which will then redirect to the real gateway