The Transmission Control Protocol (TCP) TCP is a protocol that specifies: –How to distinguish among multiple destinations on a given machine –How to initiate.

Slides:



Advertisements
Similar presentations
Network and Application Attacks Contributed by- Chandra Prakash Suryawanshi CISSP, CEH, SANS-GSEC, CISA, ISO 27001LI, BS 25999LA, ERM (ISB) June 2006.
Advertisements

Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
CISCO NETWORKING ACADEMY Chabot College ELEC Transport Layer (4)
Computer Security and Penetration Testing
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
CCNA – Network Fundamentals
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 OSI Transport Layer Network Fundamentals – Chapter 4.
Transmission Control Protocol (TCP)
Intermediate TCP/IP TCP Operation.
Guide to TCP/IP, Third Edition
CISCO NETWORKING ACADEMY PROGRAM (CNAP)
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
1 CS 4396 Computer Networks Lab Transmission Control Protocol (TCP) Part I.
BZUPAGES.COM 1 User Datagram Protocol - UDP RFC 768, Protocol 17 Provides unreliable, connectionless on top of IP Minimal overhead, high performance –No.
Transport Layer – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Chapter 7 – Transport Layer Protocols
Copyright 1999, S.D. Personick. All Rights Reserved. Telecommunications Networking II Lecture 32 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
Computer Security Fundamentals by Chuck Easttom Chapter 4 Denial of Service Attacks.
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Transport Layer.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
1 CCNA 2 v3.1 Module Intermediate TCP/IP CCNA 2 Module 10.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
Gursharan Singh Tatla Transport Layer 16-May
What Can IP Do? Deliver datagrams to hosts – The IP address in a datagram header identify a host IP treats a computer as an endpoint of communication Best.
TRANSPORT LAYER T.Najah Al-Subaie Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET331.
1 Transport Layer Computer Networks. 2 Where are we?
Overview Network communications exposes one to many different types of risks: No protection of the privacy, integrity, or authenticity of messages Traffic.
1 Semester 2 Module 10 Intermediate TCP/IP Yuda college of business James Chen
1 Chapter Overview TCP/IP DoD model. 2 Network Layer Protocols Responsible for end-to-end communications on an internetwork Contrast with data-link layer.
6.1. Transport Control Protocol (TCP) It is the most widely used transport protocol in the world. Provides reliable end to end connection between two hosts.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
TCP Lecture 13 November 13, TCP Background Transmission Control Protocol (TCP) TCP provides much of the functionality that IP lacks: reliable service.
26-TCP Dr. John P. Abraham Professor UTPA. TCP  Transmission control protocol, another transport layer protocol.  Reliable delivery  Tcp must compensate.
University of the Western Cape Chapter 12: The Transport Layer.
ECE453 – Introduction to Computer Networks Lecture 14 – Transport Layer (I)
Transmission Control Protocol TCP. Transport layer function.
Routers and Routing Basics CCNA 2 Chapter 10.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
The Transmission Control Protocol (TCP) Application Services (Telnet, FTP, , WWW) Reliable Stream Transport (TCP) Connectionless Packet Delivery.
Transport Control Protocol (TCP) Features of TCP, packet loss and retransmission, adaptive retransmission, flow control, three way handshake, congestion.
CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
1 TCP: Reliable Transport Service. 2 Transmission Control Protocol (TCP) Major transport protocol used in Internet Heavily used Completely reliable transfer.
2000 년 11 월 20 일 전북대학교 분산처리실험실 TCP Flow Control (nagle’s algorithm) 오 남 호 분산 처리 실험실
Lecture 22 Network Security CS 450/650 Fundamentals of Integrated Computer Security Slides are modified from Hesham El-Rewini.
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
Computer Science and Engineering Computer System Security CSE 5339/7339 Session 25 November 16, 2004.
Connection Establishment and Termination. Tcpdump tcpdump is a common packet analyzer that runs under the command line. It allows the user to intercept.
Slide #1 CIT 380: Securing Computer Systems TCP/IP.
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 2 v3.1 Module 10 Intermediate TCP/IP.
DoS/DDoS attack and defense
© Jörg Liebeherr (modified by Malathi Veeraraghavan) 1 Overview Formats, Data Transfer, etc. Connection Management.
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
© 2002, Cisco Systems, Inc. All rights reserved..
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Computer Networks 1000-Transport layer, TCP Gergely Windisch v spring.
1 Transmission Control Protocol (TCP) RFC: Introduction The TCP is intended to provide a reliable process-to-process communication service in a.
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
5. End-to-end protocols (part 1)
Error and Control Messages in the Internet Protocol
TCP.
PART 5 Transport Layer Computer Networks.
TCP - Part I Karim El Defrawy
CCNA 2 v3.1 Module 10 Intermediate TCP/IP
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
The Transmission Control Protocol (TCP)
Transport Layer 9/22/2019.
Presentation transcript:

The Transmission Control Protocol (TCP) TCP is a protocol that specifies: –How to distinguish among multiple destinations on a given machine –How to initiate and terminate a stream transfer –Format of the data and acknowledgments that two computers exchange to achieve a reliable transfer –Procedures the computers use to ensure that the data arrives correctly

Establishing a TCP Connection The 3-way handshake –Guarantee that both sides are ready for connection –Allows both sides to agree on initial sequence numbers Receive SYN Site 1NetworkSite 2 Send SYN seq=x Send SYN seq=y, ACK x+1 Send ACK y+1 Receive SYN&ACK Receive ACK

SYN Flood After the second message has been sent but before the third message has been received the connection is “half opened” –Most hosts store these half-opened connections in a fixed-size table while they await the third message –Half-opened connections are timed out after after half a minute or so

SYN Flood (cont) Attacker attempts to: –Fill up the half-opened connection table Attacker sends the victim machine a large number of SYN segments with spoofed source addresses (to nonexistent or unreachable hosts) Produces a large number of half-opened connections at the victim’s machine that will never become fully open The half-opened connection table fills and no new connections can be accepted until space is available –Keep it full Continue sending SYN segments to replace half-open connections as they time out Result: the victim host cannot accept any other, legitimate attempts to open a connection

Land Attack tool exploits a vulnerability in certain TCP implementations Attacker creates an invalid TCP SYN segment: –Spoofed source address is identical to the destination address –Source port is identical to the destination port Causes some TCP implementations to freeze or crash Fixed with software patches

Tribe Flood Network (TFN) Distributed denial of service attack tool –Newer versions have been developed (TFN2K, TFN3K, Stacheldraht) –Used in February, 2000 to attack several major e-commerce sites on the Web Similar to trinoo: –Daemon programs: listen for and execute commands from a master –Master programs Control a number of daemons Communicate with an attacker and pass his/her commands on to daemons

TFN (cont) “Improvements” over trinoo: –Random protocol (TCP, UDP, or ICMP) for communication between master and daemons –Can send out “decoy” packets to random IP addresses to obscure the true target of the attack –Daemons spoof the source IP address in the attack packets they send –Daemons can attack multiple targets –Wider variety of attacks

TFN (cont) Daemon attack strategies: –UDP flood (like with trinoo) –TCP SYN flood –ICMP ping flood –ICMP directed broadcast flood (smurf) –All of the above

Attacks Against Initial Sequence Numbers Recall: the 3-way handshake allows two communicating parties to agree on Initial Sequence Numbers (ISNs) What if the ISN can be guessed by a third-party?

Attacks Against ISNs (cont) If the ISN of an existing or future TCP connection can be determined an attacker may be able to: –Complete a 3-way handshake using a spoofed source IP address –Close an ongoing connection –Hijack an ongoing connection

Scans and Probes Attackers typically engage in a variety of reconnaissance activities before attacking: –To identify important/interesting hosts –To identify potential vulnerabilities that could be exploited A port scanner is a program that tries to determine which ports have programs listening on them Example: –Attempts to open a TCP connection to each port in order –If a connection is made then immediately close it and record the fact that the port is open –If the connection fails then the port is closed

Port Scanning (cont) Using fully-open connections to scan is likely to draw a lot of attention to the scan –Most hosts log: Each attempt to connect to a closed port Each time a newly-opened connection is closed with little or no data having been sent Clandestine scanning methods: –SYN scan: A SYN segment is sent to each port and any port that responds with a SYN+ACK segment is opened Instead of completing the handshake, a RST (reset) segment is sent to close the connection before it is fully opened Some hosts do not log half-opened connections

Closing a TCP Connection Applications should close a connection when they have no more data to transmit Connection can be closed in either one or both directions –Site 1 finishes transmitting data and waits for ACK from site 2 –Site 1 transmits a segment with the FIN bit set –Site 2 acknowledges the FIN segment –Site 2 notifies the application that no more data is coming –Data can still be transmitted from site 2 to site 1 –Site 1 will still receive and acknowledge data from site 2 –Eventually, site 2 will finish transmitting and close its connection –Both endpoints delete record of the connection

Closing a TCP Connection (cont) Site 1NetworkSite 2 Send FIN seq=x Receive FIN Send ACK x+1 Receive FIN&ACK Receive ACK Send FIN seq=y, ACK x+1 Send ACK y+1 Receive ACK (app closes connection) (inform application) (app closes connection)

TCP Connection Reset Applications normally close connections Sometimes abnormal conditions arise that break a connection Broken connections can be reset: –Site 1 sends a segment with the RST bit set –Site 2 receives segment and aborts the connection –Transfers in both directions cease immediately –Resources for the connection are released –Applications programs are informed

Forcing Data Delivery TCP divides the stream of octets into segments for transmission This improves efficiency since octets can be buffered until a good-sized segment can be sent TCP provides a push operation for applications that want to force delivery of octets –Set PSH bit –Send segment

Reserved TCP Port Numbers Like UDP: –Static port bindings for commonly used services Ports are reserved –Dynamic port bindings Port numbers over 1024 Port numbers for services accessible by both UDP and TCP usually match –ECHO (7) –TIME (37)

Reserved TCP Port Numbers

TCP Performance Silly Window Syndrome –Sender generates data quickly –Receiver reads incoming data one octet at a time SenderReceiver

TCP Performance (cont) Silly Window Syndrome –Each ACK advertises a small amount of space –Each segment carries a small amount of data Problems: –Poor use of network bandwidth –Unnecessary computational overhead

TCP Performance (cont) Avoiding Silly Window Syndrome –Use heuristics at sender to avoid transmitting a small amount of data in each segment –Use heuristics at receiver to avoid sending small window advisements Receive-side silly window avoidance –Monitor receive window size –Delay advertising an increase until a “significant” increase is possible “Significant” = min(half the window, maximum segment size)

Receive-Side Silly Window Avoidance Example Receive 6 octets, send ACK 7 with window advisement of 0 Application reads one octet Send window advisement of 3, receive 3 octets

Receive-Side Silly Window Avoidance Two approaches: –Receiver can ACK received octets but does not advertise an increase in its window until the increase is significant –Receiver can not send ACKs when the window is not large enough to advertise Advantages/disadvantages?

Send-Side Silly Window Avoidance Goal: avoid sending small segments Application can generate data in small blocks TCP must collect data sent by application into a single large segment (clump) for transmission TCP must delay sending a segment until it contains a reasonable amount of data How long should TCP wait before transmitting data?

Send-Side Silly Window Avoidance (cont) The Nagle Algorithm: –Application generates data to be sent over a connection that has already transmitted some data If all previous transmissions have been acknowledged send the data immediately If any ACKs are still pending do not transmit until: –Maximum segment size is reached, or –An ACK arrives Self-clocking - does not compute delays Applies even if the application requests a push

TCP Summary Provides reliable stream delivery service –Full duplex –Out-of-band for urgent data Makes efficient use of the network –Piggybacking –Sliding windows Efficiency End-to-end flow control –Acknowledgment and retransmission –Congestion recovery/avoidance