Complete Solutions
TCP (Transmission Control Protocol) Key characteristics are: Session based, Congestion
control and in-order delivery. TCP is tightly linked with IP and usually seen as TCP/IP in writing.
A connection-oriented, guaranteed-delivery protocol used to send data packets between
computers over a network like the Internet. provides reliable, ordered, and error-checked delivery
of a stream of packets on the internet. Works at both ends of most Internet communication to
ensure a perfect copy of a message is sent.
TCP Handshake syn + syn/ack + ack. Suppose our client wants to connect to a server. It
first sends a SYN packet, this packet has a SYN flag set and also a sequence number. The
acknowledgement number is 0 because this is the first packet. The server responds with a
SYN/ACK packet, which means that both the SYN flap and the ACK flags are set. The sequence
number is a server sequence number and acknowledgment number is
the sequence number plus one. This means that this SYN/ACK packet is an acknowledgement of
the initial SYN packet from the client. And then the client sends a final ACK packet to the server.
In this ACK packet, it incremented its Its own sequence number and acknowledge the sequence
number from the server. This tells the server that the client has received this SYN/ACK packet.
At this point, the TCP connection is established.
, SYN flood attack An attack that takes advantage of the procedures for initiating a TCP/IP
session. Type of DoS attack in which the attacker sends multiple SYN messages initializing TCP
connections with a target host. The attacker uses IP spoofing to send a large number of packets
requesting connections to the victim computer. These appear to be legitimate but in fact reference
a client system that is unable to respond. Example: MS blaster worm
MS Blaster Worm The Blaster worm in 2003 infected many machines. And these infected
machines were insructed to launch a denial of service attack at noon on August 16th. That is,
these machines were instructed to launch SYN flood on port 80 on the target server
windowsupdate.com. In particular, 50 SYN requests were sent every second. And each packet is
40 bytes. And the source IP address of these request packets were randomly generated. As a
result, the server windowsupdate.com was rendered unavailable. As a response, Microsoft moved
the Windows update service to a new domain, windowsupdate.microsoft.com.
how do we defend against SYN flood attacks? How about increase the memory size or
decrease the timeout value so that when a server does not receive an ACK packet, it just clears
out the memory. These are not good solutions, because an attacker can just send more packets or
at a faster pace. A better solution is to remove the need for a server to keep state.
SYN cookies does not require modified version of TCP, so this is false. SYN cookies are
only applied when there's a SYN flood attack. That is, during normal operations, or when a