Network Protocol Theory Flashcards
What is the TCP/IP model
The TCP/IP model, also known as the Internet Protocol Suite, is a more practical framework developed by the U.S. Department of Defense. It is designed to ensure successful communication over the internet and consists of four layers.
What are the OSI model layers
- Physical Layer: Deals with the physical connection between devices and the transmission of binary data over physical mediums.
- Data Link Layer: Handles error detection and correction, as well as frame synchronization.
- Network Layer: Manages logical addressing, routing, and packet forwarding.
- Transport Layer: Provides reliable data transfer, flow control, and error recovery.
- Session Layer: Manages sessions or connections between applications.
- Presentation Layer: Ensures data is in a readable format and handles encryption and compression.
- Application Layer: Interfaces directly with user applications, providing network services.
What is the OSI models
The OSI (Open Systems Interconnection) model is a conceptual framework created by the International Organization for Standardization (ISO) to standardize the functions of a telecommunication or computing system into seven distinct layers. Each layer serves specific functions and communicates with the layers directly above and below it.
What is the relation between the OSI model and the TCP/IP model
- Conceptual Layers: The OSI model is more theoretical and detailed, with seven layers, whereas the TCP/IP model is more practical and simplified, with four layers.
- Layer Mapping:
• OSI Physical and Data Link Layers correspond to the TCP/IP Link Layer.
• OSI Network Layer corresponds to the TCP/IP Internet Layer.
• OSI Transport Layer is the same as the TCP/IP Transport Layer.
• OSI Session, Presentation, and Application Layers are combined into the TCP/IP Application Layer. - Usage: The OSI model is used primarily as a teaching and troubleshooting tool to understand and design network protocols. The TCP/IP model is the basis for the actual implementation of the Internet and related protocols.
- Development: The OSI model was developed by the ISO, a global standards organization, while the TCP/IP model was developed by the U.S. Department of Defense and is the foundation of the Internet’s architecture.
What are the TCP/IP layers
- Link Layer (Network Interface Layer): Corresponds to the OSI’s Physical and Data Link layers. It deals with the physical transmission of data.
- Internet Layer: Maps to the OSI’s Network layer. It handles logical addressing and routing (mainly using the IP protocol).
- Transport Layer: Aligns with the OSI’s Transport layer. It ensures reliable data transfer through protocols like TCP and UDP.
- Application Layer: Combines the functions of the OSI’s Session, Presentation, and Application layers. It includes protocols such as HTTP, FTP, SMTP, etc.
What are the main protocols for each layer in the OSI model?
OSI Model
• Physical Layer: Ethernet, DSL, ISDN, USB, Bluetooth, Wi-Fi
• Data Link Layer: Ethernet, PPP, HDLC, Frame Relay, ATM, ARP
• Network Layer: IP, ICMP, IGMP, IPsec
• Transport Layer: TCP, UDP, SCTP, DCCP
• Session Layer: NetBIOS, PPTP, RPC
• Presentation Layer: SSL/TLS, JPEG, GIF, MPEG, ASCII, EBCDIC
• Application Layer: HTTP, FTP, SMTP, DNS, SNMP, Telnet, SSH, IMAP, POP3, NTP
What is packaging capsulation and what it is used for?
Packet encapsulation is the process of enclosing data with protocol-specific information at each layer of the TCP/IP model. This method ensures that data can be transmitted across networks and interpreted correctly by the receiving device.
How does the pack encapsulation works?
- Application Layer: Generates data and adds application-specific headers.
• Example: HTTP data
• Encapsulation: [HTTP data] - Transport Layer: Encapsulates application layer data within a transport layer segment (TCP/UDP).
• Example: TCP header + HTTP data
• Encapsulation: [TCP header + HTTP data] - Internet Layer: Encapsulates the transport layer segment within an IP packet.
• Example: IP header + [TCP header + HTTP data]
• Encapsulation: [IP header + TCP header + HTTP data] - Link Layer: Encapsulates the IP packet within a link layer frame for transmission.
• Example: Ethernet header + [IP header + TCP header + HTTP data] + Ethernet trailer
• Encapsulation: [Ethernet header + IP header + TCP header + HTTP data + Ethernet trailer]
What are the addresses used for each layer in the TCP/IP model?
Each layer has its own addressing structure
○ Data link layer: MAC address (for Ethernet)
■ A globally unique address “burnt” in the NIC
■ The ARP protocol maps an IP address to a MAC
addr
○ Internet layer: IP address
■ Identifies “globally” a network host
■ There can be private addresses (RFC1918 for
IPv4)
○ Transport layer: port
■ Identifies a specific service on a host
What are the main characteristics of UDP protocol?
- Connectionless: Unlike TCP, UDP does not establish a connection before sending data. Each UDP datagram is treated as an independent message, and there is no handshake or acknowledgment mechanism.
- Unreliable: UDP does not guarantee delivery or order of datagrams. It does not perform error checking or retransmission of lost packets. If reliability is needed, it must be implemented at the application layer.
- Minimal Overhead: UDP has a smaller header size compared to TCP, which reduces overhead. This makes UDP suitable for applications where low latency and efficiency are more important than reliability.
What are the main characteristics of the TCP protocol?
- Connection-Oriented: TCP establishes a connection between the sender and receiver before transmitting data. This connection is maintained until all data has been exchanged, and it ensures that data is delivered in order and without loss or duplication.
- Reliable Delivery: TCP guarantees the reliable delivery of data by using acknowledgments, sequence numbers, and retransmissions. It ensures that data is delivered correctly and in the same order it was sent.
- Three-Way Handshake: TCP uses a three-way handshake to establish a connection. This process involves the exchange of SYN (synchronize) and ACK (acknowledge) packets between the client and server to synchronize sequence numbers and establish communication parameters.
What are the typical network protocol attacks?
Denial of service (against availability)
Sniffing (against confidentiality)
Spoofing (against integrity and authenticity)
What are some examples of network protocol attacks that promotes denial of service
Killer packets
SYN flood
Smurf, multiplication or amplification attacks
Distributed DoS
To witch taxonomy killer packets belong to and what are some examples of this type of attack
It belongs to the denial of service taxonomy
The examples are ping of death, teardrop, land attack
To each type of denial of service attack, the ping of death belongs to and how does it works?
The “Ping of Death” attack is a type of cyber attack that exploits vulnerabilities in the way some computer systems handle ICMP (Internet Control Message Protocol) packets, particularly ICMP Echo Request packets (commonly known as “ping” packets).
- Normal ICMP Echo Request: Normally, when you send a “ping” command from one computer to another, it sends a small ICMP Echo Request packet to the target computer, asking it to respond with an ICMP Echo Reply packet. This is a common way to test network connectivity and measure response times.
- Oversized ICMP Packet: In a Ping of Death attack, the attacker manipulates the ICMP packet to make it much larger than the standard maximum size allowed by the Internet Protocol (IP). Typically, the maximum size for an IP packet is 65,535 bytes, but older systems may not properly handle packets of this size.
- Buffer Overflow: When the oversized ICMP packet is received by the target computer, its network stack may not be able to handle the packet properly. This can lead to a buffer overflow, where the data in the packet overflows the buffer allocated to store it. As a result, the system may crash, become unresponsive, or exhibit other unexpected behavior.
- Denial of Service (DoS): The goal of the Ping of Death attack is often to disrupt the target computer or network by causing it to crash or become unavailable. By sending a series of oversized ICMP packets, the attacker can overwhelm the target system’s resources, leading to a denial of service (DoS) condition where legitimate users are unable to access the system or network services.
To what type of denial of service attack the teardrop attack belongs to and how does it works?
The “Teardrop” attack is a type of cyber attack that exploits vulnerabilities in the way some computer systems handle fragmented IP packets. Here’s a simple explanation of how the Teardrop attack works:
- IP Packet Fragmentation: When data is sent over a network, it is divided into smaller units called packets. If the size of the data exceeds the maximum transmission unit (MTU) of the network, the data is fragmented into smaller packets for transmission.
- Fragmented Packets: In the Teardrop attack, the attacker manipulates the fragments of an IP packet to create overlapping or malformed fragments. Specifically, the attacker sends a series of fragmented packets where the offset and length fields are manipulated in such a way that when the packets are reassembled by the target system, they overlap or conflict with each other.
- Reassembly Vulnerability: When the target system receives the maliciously crafted fragmented packets, it attempts to reassemble them into the original complete packet. However, due to the overlapping or conflicting fragments, the system may encounter errors or inconsistencies during the reassembly process.
- System Crash or Unresponsiveness: If the target system’s network stack is unable to handle the overlapping or conflicting fragments properly, it may crash, become unresponsive, or exhibit other unexpected behavior. This can lead to a denial of service (DoS) condition where legitimate users are unable to access the system or network services.
To what type of denial of service attack the land attack belongs to and how does it works?
Killer packets attack
The “Land” attack is a type of cyber attack that exploits vulnerabilities in the TCP/IP protocol stack to disrupt network communication. Here’s a simple explanation of how the Land attack works:
- TCP/IP Handshake: When two computers communicate over a network using the TCP/IP protocol, they establish a connection through a process called a three-way handshake. During this handshake, the client sends a SYN (synchronize) packet to the server, and the server responds with a SYN-ACK (synchronize-acknowledge) packet, and finally, the client sends an ACK (acknowledge) packet to confirm the connection.
- Spoofed SYN Packets: In a Land attack, the attacker sends spoofed SYN packets to the target system. These SYN packets are crafted to appear as if they are coming from the target system itself, with the source IP address and port set to match the destination IP address and port.
- TCP Connection Loop: When the target system receives the spoofed SYN packets, it attempts to establish a TCP connection with itself. However, because the source IP address and port of the SYN packets match the destination IP address and port, the target system becomes stuck in a loop, continuously attempting to establish a connection with itself.
- Resource Exhaustion: As the target system becomes stuck in the TCP connection loop, it consumes system resources such as CPU cycles, memory, and network bandwidth. This can eventually lead to a denial of service (DoS) condition, where the system becomes overwhelmed and unable to respond to legitimate network requests.
To what taxonomy the SYN flood attack belongs to and how does it works?
It belongs to the denial of service taxonomy
Or generates a high volume of SYN request with spoofed source addresses. This way many half open TCP/IPP connections fill the queue.
The filled queue results in the dropping off legitimate clients request
How do we mitigate SYN flood attacks?
With SYN-cookies
- Normal TCP Handshake: In a normal TCP handshake, when a client wants to establish a connection with a server, it sends a SYN (synchronize) packet to the server. The server then responds with a SYN-ACK (synchronize-acknowledge) packet, and finally, the client sends an ACK (acknowledge) packet to complete the handshake and establish the connection.
- SYN Flood Attack: In a SYN flood attack, the attacker floods the target server with a large number of SYN packets, but does not complete the handshake by sending the final ACK packet. This causes the server to allocate resources for each half-open connection and eventually exhaust its resources, leading to a denial of service (DoS) condition where legitimate users are unable to establish connections with the server.
- SYN Cookie Generation: In a SYN cookie implementation, when the server receives a SYN packet from a client, instead of allocating resources and maintaining a half-open connection, it generates a SYN cookie. The SYN cookie is a cryptographic hash of the client’s IP address, port number, and other connection parameters, along with a secret server-side key.
- SYN Cookie Response: The server then responds to the client’s SYN packet with a SYN-ACK packet that contains the SYN cookie instead of allocating resources for the connection. The server does not maintain any state for the connection until the final ACK packet is received from the client.
- SYN Cookie Verification: When the client sends the final ACK packet to complete the handshake, it includes the SYN cookie generated by the server. The server verifies the SYN cookie to ensure that it matches the expected value based on the client’s connection parameters and the secret server-side key.
- Connection Establishment: If the SYN cookie is valid, the server establishes the connection with the client as usual. If the SYN cookie is invalid or missing, the server ignores the connection request, preventing the allocation of resources for unauthorized or malicious connections.
What type of taxonomy distributed DoS attack belongs to how does it works?
He belongs to the denial of service taxonomy
A Distributed Denial of Service (DDoS) attack works by overwhelming a target system or network with a flood of traffic from multiple sources, making it inaccessible to legitimate users. Here’s how a DDoS attack typically works:
- Botnet Formation: The attacker first creates or gains control of a large number of compromised computers or devices. These compromised devices, often referred to as “bots” or “zombies,” are typically infected with malware and can be controlled remotely by the attacker.
- Command and Control (C&C): The attacker uses a command and control infrastructure to coordinate the actions of the botnet. This infrastructure allows the attacker to issue commands to the compromised devices, such as directing them to launch a DDoS attack against a specific target.
- Traffic Generation: Once the botnet is assembled and under the attacker’s control, the attacker instructs the compromised devices to generate a flood of traffic targeting the victim’s system or network. This traffic can take various forms, including:
• Volume-based attacks: Flood the target with a high volume of network traffic, such as UDP (User Datagram Protocol) or ICMP (Internet Control Message Protocol) packets.
• Protocol-based attacks: Exploit vulnerabilities in specific protocols or services, such as SYN flooding attacks targeting the TCP handshake process.
• Application-layer attacks: Target specific applications or services running on the victim’s system, such as HTTP flood attacks targeting web servers. - Traffic Amplification: In some cases, the attacker may use techniques to amplify the volume of traffic generated by the botnet. For example, the attacker may exploit misconfigured servers or services that respond with larger-than-expected responses to specific requests, such as DNS amplification attacks or NTP amplification attacks.
- Traffic Redirection: To further obfuscate the source of the attack and evade detection or mitigation efforts, the attacker may use techniques such as IP spoofing or distributed reflection to make the attack traffic appear to originate from legitimate sources.
- Target Overwhelmed: As the flood of malicious traffic reaches the target system or network, it consumes available bandwidth, processing resources, or other critical resources, causing the target to become overwhelmed and unable to respond to legitimate requests. This results in a denial of service (DoS) condition, where legitimate users are unable to access the targeted services or resources.
What is the DDoS Smurf attack?
The DDoS Smurf attack is a type of distributed denial-of-service (DDoS) attack that exploits the Internet Control Message Protocol (ICMP) and IP broadcast addresses to amplify the volume of attack traffic directed at a victim. Here’s how a DDoS Smurf attack works:
- ICMP Echo Requests: In a DDoS Smurf attack, the attacker sends a large number of ICMP Echo Request packets (commonly known as “ping” packets) to IP broadcast addresses. These packets contain the IP address of the victim as the source address, making it appear as if the victim is sending the requests.
- Broadcast Amplification: When the ICMP Echo Request packets are sent to a broadcast address, they are broadcasted to all devices on the same network segment. Each device on the network segment that receives the broadcasted ICMP packet responds to it by sending an ICMP Echo Reply packet, which is directed back to the source IP address specified in the ICMP Echo Request packet.
- Amplified Response: Since the attacker has spoofed the victim’s IP address in the ICMP Echo Request packets, the ICMP Echo Reply packets generated by the devices on the network segment are sent back to the victim’s IP address instead of the actual source of the ICMP Echo Request packets.
- Traffic Amplification: The DDoS Smurf attack leverages the amplification effect of the responses generated by the devices on the network segment. By sending a relatively small number of ICMP Echo Request packets to broadcast addresses, the attacker can generate a significantly larger volume of ICMP Echo Reply packets directed at the victim’s IP address, overwhelming the victim’s network bandwidth and resources.
- Denial of Service: As the victim’s network becomes inundated with a flood of ICMP Echo Reply packets, it may become overwhelmed and unable to respond to legitimate network traffic. This results in a denial-of-service (DoS) condition, where legitimate users are unable to access the victim’s services or resources.
- Detection and Mitigation: Detecting and mitigating DDoS Smurf attacks can be challenging due to the distributed nature of the attack and the use of IP address spoofing. Network administrators can implement measures such as ingress filtering, which blocks spoofed IP addresses from entering the network, and rate limiting ICMP traffic to reduce the impact of DDoS Smurf attacks.
What is Network-level sniffing and how does it works
Network-level sniffing, also known as packet sniffing or packet capture, is the process of capturing and analyzing network traffic at the network layer (Layer 3) of the OSI model. Here’s an explanation of how network-level sniffing works:
- Capturing Packets: Network-level sniffing involves capturing packets as they traverse a network segment. This can be done using specialized software tools called packet sniffers or network analyzers. These tools put network interfaces (such as Ethernet, Wi-Fi, or others) into “promiscuous mode,” allowing them to capture all packets passing through the network segment, regardless of their intended destination.
- Analyzing Packets: Once packets are captured, they can be analyzed to extract useful information about the network traffic. This analysis can include examining packet headers (such as IP addresses, port numbers, protocol types, etc.) and packet payloads (the actual data being transmitted).
- Understanding Traffic Patterns: By inspecting captured packets, network administrators can gain insights into traffic patterns, network usage, and potential issues or anomalies. This information can be used for troubleshooting network problems, optimizing network performance, and identifying security threats.
- Security Implications: While network-level sniffing can be a valuable tool for network analysis and troubleshooting, it also poses security risks. Unauthorized individuals or malicious actors could use packet sniffers to eavesdrop on network communications and capture sensitive information, such as usernames, passwords, or confidential data.
- Protection Measures: To mitigate the risks associated with network-level sniffing, organizations can implement various security measures, including:
• Encrypting sensitive data to protect it from eavesdropping.
• Implementing network segmentation and access controls to limit access to sensitive network segments.
• Monitoring network traffic for signs of unauthorized sniffing activity.
• Using intrusion detection/prevention systems (IDS/IPS) to detect and block suspicious network traffic.
What is ARP and how does it works?
ARP stands for Address Resolution Protocol. It is a communication protocol used in computer networks to map IP addresses to MAC (Media Access Control) addresses. Here’s how ARP works:
- IP Address to MAC Address Mapping: In computer networks, devices communicate with each other using IP addresses (at the network layer) and MAC addresses (at the data link layer). When a device wants to communicate with another device on the same local network, it needs to know the MAC address of the destination device.
- ARP Request: If a device has the IP address of another device but does not know its MAC address, it sends out an ARP request broadcast message to the local network. The ARP request contains the IP address of the target device that the sender wants to communicate with.
- ARP Reply: When the device with the requested IP address receives the ARP request, it responds with an ARP reply message. The ARP reply contains the MAC address associated with the IP address specified in the ARP request.
- Caching: Once a device receives an ARP reply, it caches the IP-to-MAC mapping in its ARP table (also known as the ARP cache) for future reference. This caching helps reduce the need for ARP requests for frequently accessed devices, improving network efficiency.
What is ARP spoofing?
ARP spoofing, also known as ARP poisoning or ARP cache poisoning, is a type of cyber attack where an attacker sends falsified Address Resolution Protocol (ARP) messages over a local area network. Here’s how ARP spoofing works:
- ARP Protocol: In a typical network, devices use ARP to map IP addresses to MAC addresses. When one device wants to communicate with another device on the same local network, it first checks its ARP cache (a table storing IP-to-MAC address mappings). If the IP address is not found in the ARP cache, the device sends an ARP request broadcast message to the network, asking for the MAC address associated with the target IP address.
- Spoofing ARP Replies: In an ARP spoofing attack, the attacker sends falsified ARP reply messages to one or more devices on the network. These ARP reply messages contain forged MAC addresses, falsely claiming to be the MAC address associated with a particular IP address.
- Updating ARP Cache: When the targeted device receives the falsified ARP reply, it updates its ARP cache with the forged MAC address. As a result, the device associates the attacker’s MAC address with the target IP address.
- Traffic Redirection: With the ARP cache poisoned, traffic intended for the target IP address is now sent to the attacker’s MAC address instead. The attacker can then intercept, modify, or eavesdrop on the traffic before forwarding it to the legitimate destination.
- Consequences: ARP spoofing can be used for various malicious purposes, including:
• Man-in-the-middle (MITM) attacks: The attacker intercepts and modifies communication between two parties without their knowledge.
• Session hijacking: The attacker steals authentication credentials or session tokens to impersonate a legitimate user.
• Denial of service (DoS): The attacker floods the network with falsified ARP messages, causing network congestion or disruption. - Mitigation: To prevent ARP spoofing attacks, network administrators can implement various security measures, including:
• ARP spoofing detection tools: Monitoring network traffic for suspicious ARP activity.
• Static ARP entries: Manually configuring ARP mappings to prevent dynamic ARP updates.
• Port security: Limiting the number of MAC addresses allowed on a switch port to prevent unauthorized devices from connecting.