SlideShare a Scribd company logo
1
SECURITY PROBLEMS IN TCP/IP
     Reference: Security Problems in the TCP/IP Protocol Suite : by
        Steve Bellovin


     R-services
     Source-routing
     ARP attacks
     Session hijacking
     TCP session stealing




                                                                      2
SECURITY PROBLEMS IN R-SERVICES
    rsh and rcp use the .rhosts file in your directory, which lists hosts and accounts to
        allows access from without a password.
    Allowed by /etc/inetd
    Example .rhosts file:


        red.cs.umass.edu           brian
        *.cs.umass.edu          brian
        *   *




                                                                                            3
SECURITY PROBLEMS IN R-SERVICES
  Now that we know a machine is running rsh, how can we pretend to be
    another machine to gain access?


     Attack                           Defense


   Source routing                   ignore source routes
   False routing table updates      secure routing protocols
   Session hijacking                ssh/ secure connection
   ICMP redirects                   ?
   False ARP packets                Publish ARP tables
   TCP session stealing             ssh/ secure connection




                                                                        4
SECURITY PROBLEMS IN R-SERVICES


  Exploiting trusted relationships: C is a trusted host to S

  Source routing:
   IP source-route option
   The responder includes the source-route on the reply packets.
   Some/most OSs ignore source routes these days.

                                 X           1. C->S: spoofed packet
                                                (source-route; includes X)


                                2. replies
                  C                                S
  Open a TCP connection to rshd spoofing the address of a trusted host,
    but include yourself in the source route.



                                                                             5
SESSION HIJACKING

    Normal TCP operation from client, C, to server, S
     C->S: SYN(ISNC)
                                                        Client C               Server S
     S->C: SYN(ISNS), ACK(ISNC+1)
     C->S: ACK(ISNS +1)                                           SYN(ISNC)
     Client and Server exchange data
     ISN number generation                                    SYN(ISNS),
        4.2BSD: increments 128/sec                            ACK(ISNC+1
                                                                   )
        4.3BSD: increments 125000/sec
                                                                     ACK(ISNS+1)




                                                                                     6
SESSION HIJACKING

    Session hijacking: Find a machine, C, that’s down, guess the ISN. Usually in regular
        increments.
     X->S: SYN(ISNX) [spoofs C]               S: rshd server
     S->C: SYN(ISNS), ACK(ISNX +1)
     X->S: ACK(ISNS +1) [spoofs C; estimates ISNS]
     X->S: [ echo “* *” >> ~/.rhosts]         [spoofs C]
     X->S: RESET [spoofs C]
     X rlogins from anywhere in the world.

                                                        X          3. SYN(5000), ACK(1001)
        1. ISN estimation:       1: Disables C

                                                   2. SYN(1000)
                                      C                                    S
                                                 Trusted relationship




                                                                                             7
SESSION HIJACKING


    2. Session hijacking:

                                  X
                                                6: ACK(ISNS +1)
                                                     (spoofs C; estimates ISNS)
                                4: SYN(ISNX)
                                   (spoofs C)
                 C                                       S
                        5: SYN(ISNS), ACK(ISNX+1)


     3. Executes remote commands:

                                    X
                                                   7: [echo “* *” >> ~/.rhosts]
                                                              (spoofs C)
                                      8: RESET
                                      (spoofs C)
                            C                              S                      8
DISABLING HOSTS: SYN FLOODING DOS
   Send lots of spoofed SYN packets to a victim host


   Each SYN packet received causes a buffer to be allocated, and the limits of the
      listen()call to be reached.


   Morris invented SYN flooding just to launch a session hijacking attack, later used
      against Yahoo!




                                                                                        9
ATTACKING ROUTING TO EXPLOIT RSH


  Two types of routing: dynamic routing vs. static routing
  Dynamic routing updates
   OSPF: link-state algorithm
   RIP: distance vector algorithm

  Attacker injects a RIP update stating she has a path to host C
   All subsequent packets to C will be routed to the attacker.
   The attacker initiates connection to rshd of the server. (spoofing C)
  Defense: uses secure routing protocols
   Only accept authenticated updates.
   Requires key management.




                                                                            10
ICMP ATTACK


  ICMP redirect: forces a machine to route through you.
   Requires an existing connection
   Open a spoofed connection to the host you want to attack.
   Then send a spoofed ICMP redirect to the victim redirecting it to the gateway you’ve
    compromised.


  Others
   ICMP destination unreachable
   Frequent ICMP source quenches




                                                                                           11
ARP ATTACKS

    When a machines sends an ARP request out, you could answer that you own the
       address.
     But in a race condition with the real machine.
    Unfortunately, ARP will just accept replies without requests!
    Just send a spoofed reply message saying your MAC address owns a certain IP
        address.
     Repeat frequently so that cache doesn’t timeout


    Messages are routed through you to sniff or modify.




                                                                                  12
ARP SPOOFING - COUNTERMEASURES


  “Publish” MAC address of router/default gateway and trusted hosts to prevent ARP spoof

   Statically defining the IP to Ethernet address mapping


  Example:
        arp -s hostname 00:01:02:03:04:ab pub




                                                                                           13
TCP SESSION STEALING

    Reference: “A Simple Active Attack Against TCP” by Laurent Joncheray.
        In Proceedings of 5th USENIX Unix Security Symposium. June 1995

    Active attack using desynchronized states
           The attacker is in the path b/w the client and the server
           The attacker can sniff all the packets and inject some spoofed packets
           Steps:
            1. The attacker sniffs the communication b/w the two.
            2. The attacker disables the communication by desynchronizing the
            client and the server.
            3. The attacker injects spoofed packets that acceptable for both ends.




                                                                                     14
TCP SESSION STEALING

    Desynchronized state b/w client C and server S
     Both in “Established state”
     No data is being sent (stable state)
     S_SEQ  C_ACK and C_SEQ  S_ACK


    When S_ACK < C_SEQ < S_ACK + S_Wind:
     The packet is accepted (buffered) but not sent to the user
    When C_SEQ > S_ACK + S_Wind or C_SEQ < S_ACK :
     The packet is dropped
    In both cases, the ACK(S_ACK) is sent (ACK packet with S_SEQ,
        S_ACK)




                                                                    15
TCP SESSION STEALING

    In a desynchronized state, the attacker can send any acceptable data to the server
     E.g. [echo myhost >> ~/.rhost] for rlogin




                                       X          2: X->S (spoofing C): S_ACK, S_SEQ
     1: C->S: C_SEQ, C_ACK
                                                            [echo myhost >> ~/.rhost]

                                                               (accepted)
                                               (dropped)
                  C                                           S
           C_SEQ, C_ACK                                    S_SEQ, S_ACK

                      S_SEQ  C_ACK and C_SEQ  S_ACK

                                                                                         16
DESYNCHRONIZATION
                                                                      X       3,4, 6

                                                                          2
  Early desynchronization                                C                             S
                                                                          1
       1. C->S(Syn): C_Seq0     ; C: Syn_Sent
       2. S->C(Syn/Ack): S_Seq0, C_Seq0+1 ; S: Syn_Rcvd
                                 ; C: Established (C_Seq0+1, S_Seq0+1)

       (before the packet C->S(Ack): S_Seq0+1)
       3. X->S(spoofing C, Rst)
       4. X->S(spoofing C, Syn): X_Seq0 ; the same port # used in (1)
       5. S->C(Syn/Ack): S_Seq1, X_Seq0+1
       6. X->S(spoofing C, Ack): S_Seq1+1
                                  ; S: Established (S_Seq1+1, X_Seq0+1)




                                                                                       17
THE ATTACK

    Null data desynchronization

    1. The attacker watches the session without interfering.
    2. During a quiet period, the attacker sends a large amount of null data (IAC, NOP for
      telnet): nothing happens, server only changes the TCP Ack number
    3. Now, when the client sends data, it is dropped by the server because it’s lower
      than the server’s window.
    4. The attacker does the same with the client.


    Defense: ssh connection, or IPsec




                                                                                             18

More Related Content

What's hot (20)

Public Key Cryptosystem
Public Key CryptosystemPublic Key Cryptosystem
Public Key Cryptosystem
Devakumar Kp
 
12 types of DDoS attacks
12 types of DDoS attacks12 types of DDoS attacks
12 types of DDoS attacks
Haltdos
 
RSA Algorithm
RSA AlgorithmRSA Algorithm
RSA Algorithm
Srinadh Muvva
 
Authentication Protocols
Authentication ProtocolsAuthentication Protocols
Authentication Protocols
Trinity Dwarka
 
User authentication
User authenticationUser authentication
User authentication
CAS
 
Password Cracking
Password CrackingPassword Cracking
Password Cracking
Sagar Verma
 
Data Encryption Standard (DES)
Data Encryption Standard (DES)Data Encryption Standard (DES)
Data Encryption Standard (DES)
Haris Ahmed
 
Message Authentication
Message AuthenticationMessage Authentication
Message Authentication
Ram Dutt Shukla
 
block ciphers
block ciphersblock ciphers
block ciphers
Asad Ali
 
Message digest 5
Message digest 5Message digest 5
Message digest 5
Tirthika Bandi
 
IDS and IPS
IDS and IPSIDS and IPS
IDS and IPS
Santosh Khadsare
 
Vtu network security(10 ec832) unit 2 notes..
Vtu network security(10 ec832) unit 2 notes..Vtu network security(10 ec832) unit 2 notes..
Vtu network security(10 ec832) unit 2 notes..
Jayanth Dwijesh H P
 
Network security
Network securityNetwork security
Network security
quest university nawabshah
 
Transport layer security.ppt
Transport layer security.pptTransport layer security.ppt
Transport layer security.ppt
ImXaib
 
Intrusion Detection Systems and Intrusion Prevention Systems
Intrusion Detection Systems  and Intrusion Prevention Systems Intrusion Detection Systems  and Intrusion Prevention Systems
Intrusion Detection Systems and Intrusion Prevention Systems
Cleverence Kombe
 
Topic2 caser hill_cripto
Topic2 caser hill_criptoTopic2 caser hill_cripto
Topic2 caser hill_cripto
MdFazleRabbi18
 
Cryptography Intro
Cryptography IntroCryptography Intro
Cryptography Intro
Christopher Martin
 
Intro to modern cryptography
Intro to modern cryptographyIntro to modern cryptography
Intro to modern cryptography
zahid-mian
 
Authentication techniques
Authentication techniquesAuthentication techniques
Authentication techniques
IGZ Software house
 
Secure Socket Layer
Secure Socket LayerSecure Socket Layer
Secure Socket Layer
Naveen Kumar
 
Public Key Cryptosystem
Public Key CryptosystemPublic Key Cryptosystem
Public Key Cryptosystem
Devakumar Kp
 
12 types of DDoS attacks
12 types of DDoS attacks12 types of DDoS attacks
12 types of DDoS attacks
Haltdos
 
Authentication Protocols
Authentication ProtocolsAuthentication Protocols
Authentication Protocols
Trinity Dwarka
 
User authentication
User authenticationUser authentication
User authentication
CAS
 
Password Cracking
Password CrackingPassword Cracking
Password Cracking
Sagar Verma
 
Data Encryption Standard (DES)
Data Encryption Standard (DES)Data Encryption Standard (DES)
Data Encryption Standard (DES)
Haris Ahmed
 
block ciphers
block ciphersblock ciphers
block ciphers
Asad Ali
 
Vtu network security(10 ec832) unit 2 notes..
Vtu network security(10 ec832) unit 2 notes..Vtu network security(10 ec832) unit 2 notes..
Vtu network security(10 ec832) unit 2 notes..
Jayanth Dwijesh H P
 
Transport layer security.ppt
Transport layer security.pptTransport layer security.ppt
Transport layer security.ppt
ImXaib
 
Intrusion Detection Systems and Intrusion Prevention Systems
Intrusion Detection Systems  and Intrusion Prevention Systems Intrusion Detection Systems  and Intrusion Prevention Systems
Intrusion Detection Systems and Intrusion Prevention Systems
Cleverence Kombe
 
Topic2 caser hill_cripto
Topic2 caser hill_criptoTopic2 caser hill_cripto
Topic2 caser hill_cripto
MdFazleRabbi18
 
Intro to modern cryptography
Intro to modern cryptographyIntro to modern cryptography
Intro to modern cryptography
zahid-mian
 
Secure Socket Layer
Secure Socket LayerSecure Socket Layer
Secure Socket Layer
Naveen Kumar
 

Viewers also liked (20)

Tcp
TcpTcp
Tcp
giaolvq
 
Himanshupptx
HimanshupptxHimanshupptx
Himanshupptx
Himanshu Chaurishiya
 
Presentation1
Presentation1Presentation1
Presentation1
Rahul Polara
 
Introduction to TCP/IP
Introduction to TCP/IPIntroduction to TCP/IP
Introduction to TCP/IP
Michael Lamont
 
TCP/IP
TCP/IPTCP/IP
TCP/IP
Syed Zaid Irshad
 
Ip Spoofing
Ip SpoofingIp Spoofing
Ip Spoofing
Dhrumil Shah
 
My ppt..priya
My ppt..priyaMy ppt..priya
My ppt..priya
priya_kp03
 
I P S P O O F I N G
I P  S P O O F I N GI P  S P O O F I N G
I P S P O O F I N G
avinashkanchan
 
TCP/IP Basics
TCP/IP BasicsTCP/IP Basics
TCP/IP Basics
SMC Networks Europe
 
Osi , tcp/ip protocol and Addressing
Osi , tcp/ip protocol and Addressing Osi , tcp/ip protocol and Addressing
Osi , tcp/ip protocol and Addressing
marwan aldulaimy
 
FEGTS IP training - TCP/IP Introduction
FEGTS IP training - TCP/IP IntroductionFEGTS IP training - TCP/IP Introduction
FEGTS IP training - TCP/IP Introduction
Kae Hsu
 
Protocols and the TCP/IP Protocol Suite
Protocols and the TCP/IP Protocol SuiteProtocols and the TCP/IP Protocol Suite
Protocols and the TCP/IP Protocol Suite
Atharaw Deshmukh
 
More on Tcp/Ip
More on Tcp/IpMore on Tcp/Ip
More on Tcp/Ip
Rakhi Saxena
 
Network infrastructure - TCP/IP
Network infrastructure - TCP/IPNetwork infrastructure - TCP/IP
Network infrastructure - TCP/IP
raymondkao
 
IP Spoofing
IP SpoofingIP Spoofing
IP Spoofing
Akmal Hussain
 
Spoofing Techniques
Spoofing TechniquesSpoofing Techniques
Spoofing Techniques
Raza_Abidi
 
TCP/IP(networking)
TCP/IP(networking)TCP/IP(networking)
TCP/IP(networking)
welcometofacebook
 
Ip address
Ip addressIp address
Ip address
Amandeep Kaur
 
Ip Spoofing
Ip SpoofingIp Spoofing
Ip Spoofing
arpit.arp
 
The secret of TCP/IP and how it affects your PBX
The secret of TCP/IP and how it affects your PBXThe secret of TCP/IP and how it affects your PBX
The secret of TCP/IP and how it affects your PBX
Olle E Johansson
 

Similar to Security problems in TCP/IP (20)

chapter5sfawefafsfsfasfafafsafsafasfasfafafasfaf.ppt
chapter5sfawefafsfsfasfafafsafsafasfasfafafasfaf.pptchapter5sfawefafsfsfasfafafsafsafasfasfafafasfaf.ppt
chapter5sfawefafsfsfasfafafsafsafasfasfafafasfaf.ppt
VerdiFerdiansyah1
 
Network and DNS Vulnerabilities
Network and DNS VulnerabilitiesNetwork and DNS Vulnerabilities
Network and DNS Vulnerabilities
n|u - The Open Security Community
 
6005679.ppt
6005679.ppt6005679.ppt
6005679.ppt
AlmaOraevi
 
Internet Security Issues
Internet Security IssuesInternet Security Issues
Internet Security Issues
anides
 
Figure 3 TCP Session Hijacking Attack victims to execute the mali.pdf
Figure 3 TCP Session Hijacking Attack victims to execute the mali.pdfFigure 3 TCP Session Hijacking Attack victims to execute the mali.pdf
Figure 3 TCP Session Hijacking Attack victims to execute the mali.pdf
orderfabfirki
 
Computer network (2)
Computer network (2)Computer network (2)
Computer network (2)
NYversity
 
26 security2
26 security226 security2
26 security2
congiodiqua
 
NETWORK SECURITY
NETWORK SECURITYNETWORK SECURITY
NETWORK SECURITY
Vinil Patel
 
12 tcp-dns
12 tcp-dns12 tcp-dns
12 tcp-dns
Culverton Blessy
 
26-security2.ppt
26-security2.ppt26-security2.ppt
26-security2.ppt
sumita02
 
26-security2.ppt
26-security2.ppt26-security2.ppt
26-security2.ppt
jepoy808
 
26-security2.ppt
26-security2.ppt26-security2.ppt
26-security2.ppt
anakorang28
 
ip spoofing
ip spoofingip spoofing
ip spoofing
vipin soni
 
Module 6 Session Hijacking
Module 6   Session HijackingModule 6   Session Hijacking
Module 6 Session Hijacking
leminhvuong
 
Isys20261 lecture 07
Isys20261 lecture 07Isys20261 lecture 07
Isys20261 lecture 07
Wiliam Ferraciolli
 
Information security advanced
Information security advancedInformation security advanced
Information security advanced
Jamil S. Alagha
 
vulnerabilities in IP.pdf
vulnerabilities in IP.pdfvulnerabilities in IP.pdf
vulnerabilities in IP.pdf
MuhammadSufyanAbbasi1
 
CS10NETWOKSecurityhdhgsfdhsdheahgqergd.ppt
CS10NETWOKSecurityhdhgsfdhsdheahgqergd.pptCS10NETWOKSecurityhdhgsfdhsdheahgqergd.ppt
CS10NETWOKSecurityhdhgsfdhsdheahgqergd.ppt
mohammednisath
 
Vulnerabilities in IP Protocols
Vulnerabilities in IP ProtocolsVulnerabilities in IP Protocols
Vulnerabilities in IP Protocols
babak danyal
 
Layer one 2011-gh0stwood-d-dos-attacks
Layer one 2011-gh0stwood-d-dos-attacksLayer one 2011-gh0stwood-d-dos-attacks
Layer one 2011-gh0stwood-d-dos-attacks
fangjiafu
 
chapter5sfawefafsfsfasfafafsafsafasfasfafafasfaf.ppt
chapter5sfawefafsfsfasfafafsafsafasfasfafafasfaf.pptchapter5sfawefafsfsfasfafafsafsafasfasfafafasfaf.ppt
chapter5sfawefafsfsfasfafafsafsafasfasfafafasfaf.ppt
VerdiFerdiansyah1
 
Internet Security Issues
Internet Security IssuesInternet Security Issues
Internet Security Issues
anides
 
Figure 3 TCP Session Hijacking Attack victims to execute the mali.pdf
Figure 3 TCP Session Hijacking Attack victims to execute the mali.pdfFigure 3 TCP Session Hijacking Attack victims to execute the mali.pdf
Figure 3 TCP Session Hijacking Attack victims to execute the mali.pdf
orderfabfirki
 
Computer network (2)
Computer network (2)Computer network (2)
Computer network (2)
NYversity
 
NETWORK SECURITY
NETWORK SECURITYNETWORK SECURITY
NETWORK SECURITY
Vinil Patel
 
26-security2.ppt
26-security2.ppt26-security2.ppt
26-security2.ppt
sumita02
 
26-security2.ppt
26-security2.ppt26-security2.ppt
26-security2.ppt
jepoy808
 
26-security2.ppt
26-security2.ppt26-security2.ppt
26-security2.ppt
anakorang28
 
Module 6 Session Hijacking
Module 6   Session HijackingModule 6   Session Hijacking
Module 6 Session Hijacking
leminhvuong
 
Information security advanced
Information security advancedInformation security advanced
Information security advanced
Jamil S. Alagha
 
CS10NETWOKSecurityhdhgsfdhsdheahgqergd.ppt
CS10NETWOKSecurityhdhgsfdhsdheahgqergd.pptCS10NETWOKSecurityhdhgsfdhsdheahgqergd.ppt
CS10NETWOKSecurityhdhgsfdhsdheahgqergd.ppt
mohammednisath
 
Vulnerabilities in IP Protocols
Vulnerabilities in IP ProtocolsVulnerabilities in IP Protocols
Vulnerabilities in IP Protocols
babak danyal
 
Layer one 2011-gh0stwood-d-dos-attacks
Layer one 2011-gh0stwood-d-dos-attacksLayer one 2011-gh0stwood-d-dos-attacks
Layer one 2011-gh0stwood-d-dos-attacks
fangjiafu
 

More from Sukh Sandhu (12)

Qualified Social Media Expert
Qualified Social Media ExpertQualified Social Media Expert
Qualified Social Media Expert
Sukh Sandhu
 
An introduction to microsoft office 2007 lecture
An introduction to microsoft office 2007 lectureAn introduction to microsoft office 2007 lecture
An introduction to microsoft office 2007 lecture
Sukh Sandhu
 
Healthy Foods and Junk Food - Sharing some Information
Healthy Foods and Junk Food - Sharing some InformationHealthy Foods and Junk Food - Sharing some Information
Healthy Foods and Junk Food - Sharing some Information
Sukh Sandhu
 
HTML standards
HTML standardsHTML standards
HTML standards
Sukh Sandhu
 
Mark-up languages
Mark-up languagesMark-up languages
Mark-up languages
Sukh Sandhu
 
How to build a web page - SES Magazine
How to build a web page - SES MagazineHow to build a web page - SES Magazine
How to build a web page - SES Magazine
Sukh Sandhu
 
Content management system requirements checklist
Content management system requirements checklistContent management system requirements checklist
Content management system requirements checklist
Sukh Sandhu
 
Web standards
Web standards Web standards
Web standards
Sukh Sandhu
 
The HTML Beginner Tutorial
The HTML Beginner Tutorial The HTML Beginner Tutorial
The HTML Beginner Tutorial
Sukh Sandhu
 
Personal development plan
Personal development planPersonal development plan
Personal development plan
Sukh Sandhu
 
How to write a good business letter
How to write a good business letter   How to write a good business letter
How to write a good business letter
Sukh Sandhu
 
When You Are Angry
When You Are AngryWhen You Are Angry
When You Are Angry
Sukh Sandhu
 
Qualified Social Media Expert
Qualified Social Media ExpertQualified Social Media Expert
Qualified Social Media Expert
Sukh Sandhu
 
An introduction to microsoft office 2007 lecture
An introduction to microsoft office 2007 lectureAn introduction to microsoft office 2007 lecture
An introduction to microsoft office 2007 lecture
Sukh Sandhu
 
Healthy Foods and Junk Food - Sharing some Information
Healthy Foods and Junk Food - Sharing some InformationHealthy Foods and Junk Food - Sharing some Information
Healthy Foods and Junk Food - Sharing some Information
Sukh Sandhu
 
Mark-up languages
Mark-up languagesMark-up languages
Mark-up languages
Sukh Sandhu
 
How to build a web page - SES Magazine
How to build a web page - SES MagazineHow to build a web page - SES Magazine
How to build a web page - SES Magazine
Sukh Sandhu
 
Content management system requirements checklist
Content management system requirements checklistContent management system requirements checklist
Content management system requirements checklist
Sukh Sandhu
 
The HTML Beginner Tutorial
The HTML Beginner Tutorial The HTML Beginner Tutorial
The HTML Beginner Tutorial
Sukh Sandhu
 
Personal development plan
Personal development planPersonal development plan
Personal development plan
Sukh Sandhu
 
How to write a good business letter
How to write a good business letter   How to write a good business letter
How to write a good business letter
Sukh Sandhu
 
When You Are Angry
When You Are AngryWhen You Are Angry
When You Are Angry
Sukh Sandhu
 

Recently uploaded (20)

[2025] Qualtric XM-EX-EXPERT Study Plan | Practice Questions + Exam Details
[2025] Qualtric XM-EX-EXPERT Study Plan | Practice Questions + Exam Details[2025] Qualtric XM-EX-EXPERT Study Plan | Practice Questions + Exam Details
[2025] Qualtric XM-EX-EXPERT Study Plan | Practice Questions + Exam Details
Jenny408767
 
Policies, procedures, subject selection and QTAC.pptx
Policies, procedures, subject selection and QTAC.pptxPolicies, procedures, subject selection and QTAC.pptx
Policies, procedures, subject selection and QTAC.pptx
mansk2
 
Unit 1 Kali NetHunter is the official Kali Linux penetration testing platform...
Unit 1 Kali NetHunter is the official Kali Linux penetration testing platform...Unit 1 Kali NetHunter is the official Kali Linux penetration testing platform...
Unit 1 Kali NetHunter is the official Kali Linux penetration testing platform...
ChatanBawankar
 
Flower Identification Class-10 by Kushal Lamichhane.pdf
Flower Identification Class-10 by Kushal Lamichhane.pdfFlower Identification Class-10 by Kushal Lamichhane.pdf
Flower Identification Class-10 by Kushal Lamichhane.pdf
kushallamichhame
 
Primary Bash in Richmond 2025 - Literacy.pdf
Primary Bash in Richmond 2025 - Literacy.pdfPrimary Bash in Richmond 2025 - Literacy.pdf
Primary Bash in Richmond 2025 - Literacy.pdf
Faye Brownlie
 
the dynastic history of the Gahadwals of Early Medieval Period
the dynastic history of the Gahadwals of Early Medieval Periodthe dynastic history of the Gahadwals of Early Medieval Period
the dynastic history of the Gahadwals of Early Medieval Period
PrachiSontakke5
 
Unit 4 Reverse Engineering Tools Functionalities & Use-Cases.pdf
Unit 4  Reverse Engineering Tools  Functionalities & Use-Cases.pdfUnit 4  Reverse Engineering Tools  Functionalities & Use-Cases.pdf
Unit 4 Reverse Engineering Tools Functionalities & Use-Cases.pdf
ChatanBawankar
 
STUDENT LOAN TRUST FUND DEFAULTERS GHANA
STUDENT LOAN TRUST FUND DEFAULTERS GHANASTUDENT LOAN TRUST FUND DEFAULTERS GHANA
STUDENT LOAN TRUST FUND DEFAULTERS GHANA
Kweku Zurek
 
Unit 1 Tools Beneficial for Monitoring the Debugging Process.pdf
Unit 1 Tools Beneficial for Monitoring the Debugging Process.pdfUnit 1 Tools Beneficial for Monitoring the Debugging Process.pdf
Unit 1 Tools Beneficial for Monitoring the Debugging Process.pdf
ChatanBawankar
 
Unit 2 DNS Spoofing in a BadUSB Attack.pdf
Unit 2 DNS Spoofing in a BadUSB Attack.pdfUnit 2 DNS Spoofing in a BadUSB Attack.pdf
Unit 2 DNS Spoofing in a BadUSB Attack.pdf
ChatanBawankar
 
Geographical-Diversity-of-India.pptx/7th class /new ncert /samyans academy
Geographical-Diversity-of-India.pptx/7th class /new ncert /samyans academyGeographical-Diversity-of-India.pptx/7th class /new ncert /samyans academy
Geographical-Diversity-of-India.pptx/7th class /new ncert /samyans academy
Sandeep Swamy
 
Protest - Student Revision Booklet For VCE English
Protest - Student Revision Booklet For VCE EnglishProtest - Student Revision Booklet For VCE English
Protest - Student Revision Booklet For VCE English
jpinnuck
 
Decision Tree-ID3,C4.5,CART,Regression Tree
Decision Tree-ID3,C4.5,CART,Regression TreeDecision Tree-ID3,C4.5,CART,Regression Tree
Decision Tree-ID3,C4.5,CART,Regression Tree
Global Academy of Technology
 
Optical and non optical devices used in low vision
Optical and non optical devices used in low visionOptical and non optical devices used in low vision
Optical and non optical devices used in low vision
Aligarh Muslim University, Aligarh, Uttar Pradesh, India
 
Order Lepidoptera: Butterflies and Moths.pptx
Order Lepidoptera: Butterflies and Moths.pptxOrder Lepidoptera: Butterflies and Moths.pptx
Order Lepidoptera: Butterflies and Moths.pptx
Arshad Shaikh
 
KNN,Weighted KNN,Nearest Centroid Classifier,Locally Weighted Regression
KNN,Weighted KNN,Nearest Centroid Classifier,Locally Weighted RegressionKNN,Weighted KNN,Nearest Centroid Classifier,Locally Weighted Regression
KNN,Weighted KNN,Nearest Centroid Classifier,Locally Weighted Regression
Global Academy of Technology
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-25-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-25-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-25-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-25-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Paper 110A | Shadows and Light: Exploring Expressionism in ‘The Cabinet of Dr...
Paper 110A | Shadows and Light: Exploring Expressionism in ‘The Cabinet of Dr...Paper 110A | Shadows and Light: Exploring Expressionism in ‘The Cabinet of Dr...
Paper 110A | Shadows and Light: Exploring Expressionism in ‘The Cabinet of Dr...
Rajdeep Bavaliya
 
Mixed Bag Session On 'SWOPNOSONDHANI'....
Mixed Bag Session On 'SWOPNOSONDHANI'....Mixed Bag Session On 'SWOPNOSONDHANI'....
Mixed Bag Session On 'SWOPNOSONDHANI'....
Snehanjan Das
 
How to Configure Credit Card in Odoo 18 Accounting
How to Configure Credit Card in Odoo 18 AccountingHow to Configure Credit Card in Odoo 18 Accounting
How to Configure Credit Card in Odoo 18 Accounting
Celine George
 
[2025] Qualtric XM-EX-EXPERT Study Plan | Practice Questions + Exam Details
[2025] Qualtric XM-EX-EXPERT Study Plan | Practice Questions + Exam Details[2025] Qualtric XM-EX-EXPERT Study Plan | Practice Questions + Exam Details
[2025] Qualtric XM-EX-EXPERT Study Plan | Practice Questions + Exam Details
Jenny408767
 
Policies, procedures, subject selection and QTAC.pptx
Policies, procedures, subject selection and QTAC.pptxPolicies, procedures, subject selection and QTAC.pptx
Policies, procedures, subject selection and QTAC.pptx
mansk2
 
Unit 1 Kali NetHunter is the official Kali Linux penetration testing platform...
Unit 1 Kali NetHunter is the official Kali Linux penetration testing platform...Unit 1 Kali NetHunter is the official Kali Linux penetration testing platform...
Unit 1 Kali NetHunter is the official Kali Linux penetration testing platform...
ChatanBawankar
 
Flower Identification Class-10 by Kushal Lamichhane.pdf
Flower Identification Class-10 by Kushal Lamichhane.pdfFlower Identification Class-10 by Kushal Lamichhane.pdf
Flower Identification Class-10 by Kushal Lamichhane.pdf
kushallamichhame
 
Primary Bash in Richmond 2025 - Literacy.pdf
Primary Bash in Richmond 2025 - Literacy.pdfPrimary Bash in Richmond 2025 - Literacy.pdf
Primary Bash in Richmond 2025 - Literacy.pdf
Faye Brownlie
 
the dynastic history of the Gahadwals of Early Medieval Period
the dynastic history of the Gahadwals of Early Medieval Periodthe dynastic history of the Gahadwals of Early Medieval Period
the dynastic history of the Gahadwals of Early Medieval Period
PrachiSontakke5
 
Unit 4 Reverse Engineering Tools Functionalities & Use-Cases.pdf
Unit 4  Reverse Engineering Tools  Functionalities & Use-Cases.pdfUnit 4  Reverse Engineering Tools  Functionalities & Use-Cases.pdf
Unit 4 Reverse Engineering Tools Functionalities & Use-Cases.pdf
ChatanBawankar
 
STUDENT LOAN TRUST FUND DEFAULTERS GHANA
STUDENT LOAN TRUST FUND DEFAULTERS GHANASTUDENT LOAN TRUST FUND DEFAULTERS GHANA
STUDENT LOAN TRUST FUND DEFAULTERS GHANA
Kweku Zurek
 
Unit 1 Tools Beneficial for Monitoring the Debugging Process.pdf
Unit 1 Tools Beneficial for Monitoring the Debugging Process.pdfUnit 1 Tools Beneficial for Monitoring the Debugging Process.pdf
Unit 1 Tools Beneficial for Monitoring the Debugging Process.pdf
ChatanBawankar
 
Unit 2 DNS Spoofing in a BadUSB Attack.pdf
Unit 2 DNS Spoofing in a BadUSB Attack.pdfUnit 2 DNS Spoofing in a BadUSB Attack.pdf
Unit 2 DNS Spoofing in a BadUSB Attack.pdf
ChatanBawankar
 
Geographical-Diversity-of-India.pptx/7th class /new ncert /samyans academy
Geographical-Diversity-of-India.pptx/7th class /new ncert /samyans academyGeographical-Diversity-of-India.pptx/7th class /new ncert /samyans academy
Geographical-Diversity-of-India.pptx/7th class /new ncert /samyans academy
Sandeep Swamy
 
Protest - Student Revision Booklet For VCE English
Protest - Student Revision Booklet For VCE EnglishProtest - Student Revision Booklet For VCE English
Protest - Student Revision Booklet For VCE English
jpinnuck
 
Order Lepidoptera: Butterflies and Moths.pptx
Order Lepidoptera: Butterflies and Moths.pptxOrder Lepidoptera: Butterflies and Moths.pptx
Order Lepidoptera: Butterflies and Moths.pptx
Arshad Shaikh
 
KNN,Weighted KNN,Nearest Centroid Classifier,Locally Weighted Regression
KNN,Weighted KNN,Nearest Centroid Classifier,Locally Weighted RegressionKNN,Weighted KNN,Nearest Centroid Classifier,Locally Weighted Regression
KNN,Weighted KNN,Nearest Centroid Classifier,Locally Weighted Regression
Global Academy of Technology
 
Paper 110A | Shadows and Light: Exploring Expressionism in ‘The Cabinet of Dr...
Paper 110A | Shadows and Light: Exploring Expressionism in ‘The Cabinet of Dr...Paper 110A | Shadows and Light: Exploring Expressionism in ‘The Cabinet of Dr...
Paper 110A | Shadows and Light: Exploring Expressionism in ‘The Cabinet of Dr...
Rajdeep Bavaliya
 
Mixed Bag Session On 'SWOPNOSONDHANI'....
Mixed Bag Session On 'SWOPNOSONDHANI'....Mixed Bag Session On 'SWOPNOSONDHANI'....
Mixed Bag Session On 'SWOPNOSONDHANI'....
Snehanjan Das
 
How to Configure Credit Card in Odoo 18 Accounting
How to Configure Credit Card in Odoo 18 AccountingHow to Configure Credit Card in Odoo 18 Accounting
How to Configure Credit Card in Odoo 18 Accounting
Celine George
 

Security problems in TCP/IP

  • 1. 1
  • 2. SECURITY PROBLEMS IN TCP/IP Reference: Security Problems in the TCP/IP Protocol Suite : by Steve Bellovin R-services Source-routing ARP attacks Session hijacking TCP session stealing 2
  • 3. SECURITY PROBLEMS IN R-SERVICES rsh and rcp use the .rhosts file in your directory, which lists hosts and accounts to allows access from without a password. Allowed by /etc/inetd Example .rhosts file: red.cs.umass.edu brian *.cs.umass.edu brian * * 3
  • 4. SECURITY PROBLEMS IN R-SERVICES Now that we know a machine is running rsh, how can we pretend to be another machine to gain access? Attack Defense  Source routing ignore source routes  False routing table updates secure routing protocols  Session hijacking ssh/ secure connection  ICMP redirects ?  False ARP packets Publish ARP tables  TCP session stealing ssh/ secure connection 4
  • 5. SECURITY PROBLEMS IN R-SERVICES Exploiting trusted relationships: C is a trusted host to S Source routing:  IP source-route option  The responder includes the source-route on the reply packets.  Some/most OSs ignore source routes these days. X 1. C->S: spoofed packet (source-route; includes X) 2. replies C S Open a TCP connection to rshd spoofing the address of a trusted host, but include yourself in the source route. 5
  • 6. SESSION HIJACKING Normal TCP operation from client, C, to server, S  C->S: SYN(ISNC) Client C Server S  S->C: SYN(ISNS), ACK(ISNC+1)  C->S: ACK(ISNS +1) SYN(ISNC)  Client and Server exchange data  ISN number generation SYN(ISNS),  4.2BSD: increments 128/sec ACK(ISNC+1 )  4.3BSD: increments 125000/sec ACK(ISNS+1) 6
  • 7. SESSION HIJACKING Session hijacking: Find a machine, C, that’s down, guess the ISN. Usually in regular increments.  X->S: SYN(ISNX) [spoofs C] S: rshd server  S->C: SYN(ISNS), ACK(ISNX +1)  X->S: ACK(ISNS +1) [spoofs C; estimates ISNS]  X->S: [ echo “* *” >> ~/.rhosts] [spoofs C]  X->S: RESET [spoofs C]  X rlogins from anywhere in the world. X 3. SYN(5000), ACK(1001) 1. ISN estimation: 1: Disables C 2. SYN(1000) C S Trusted relationship 7
  • 8. SESSION HIJACKING 2. Session hijacking: X 6: ACK(ISNS +1) (spoofs C; estimates ISNS) 4: SYN(ISNX) (spoofs C) C S 5: SYN(ISNS), ACK(ISNX+1) 3. Executes remote commands: X 7: [echo “* *” >> ~/.rhosts] (spoofs C) 8: RESET (spoofs C) C S 8
  • 9. DISABLING HOSTS: SYN FLOODING DOS Send lots of spoofed SYN packets to a victim host Each SYN packet received causes a buffer to be allocated, and the limits of the listen()call to be reached. Morris invented SYN flooding just to launch a session hijacking attack, later used against Yahoo! 9
  • 10. ATTACKING ROUTING TO EXPLOIT RSH Two types of routing: dynamic routing vs. static routing Dynamic routing updates  OSPF: link-state algorithm  RIP: distance vector algorithm Attacker injects a RIP update stating she has a path to host C  All subsequent packets to C will be routed to the attacker.  The attacker initiates connection to rshd of the server. (spoofing C) Defense: uses secure routing protocols  Only accept authenticated updates.  Requires key management. 10
  • 11. ICMP ATTACK ICMP redirect: forces a machine to route through you.  Requires an existing connection  Open a spoofed connection to the host you want to attack.  Then send a spoofed ICMP redirect to the victim redirecting it to the gateway you’ve compromised. Others  ICMP destination unreachable  Frequent ICMP source quenches 11
  • 12. ARP ATTACKS When a machines sends an ARP request out, you could answer that you own the address.  But in a race condition with the real machine. Unfortunately, ARP will just accept replies without requests! Just send a spoofed reply message saying your MAC address owns a certain IP address.  Repeat frequently so that cache doesn’t timeout Messages are routed through you to sniff or modify. 12
  • 13. ARP SPOOFING - COUNTERMEASURES “Publish” MAC address of router/default gateway and trusted hosts to prevent ARP spoof  Statically defining the IP to Ethernet address mapping Example: arp -s hostname 00:01:02:03:04:ab pub 13
  • 14. TCP SESSION STEALING Reference: “A Simple Active Attack Against TCP” by Laurent Joncheray. In Proceedings of 5th USENIX Unix Security Symposium. June 1995 Active attack using desynchronized states  The attacker is in the path b/w the client and the server  The attacker can sniff all the packets and inject some spoofed packets  Steps: 1. The attacker sniffs the communication b/w the two. 2. The attacker disables the communication by desynchronizing the client and the server. 3. The attacker injects spoofed packets that acceptable for both ends. 14
  • 15. TCP SESSION STEALING Desynchronized state b/w client C and server S  Both in “Established state”  No data is being sent (stable state)  S_SEQ  C_ACK and C_SEQ  S_ACK When S_ACK < C_SEQ < S_ACK + S_Wind:  The packet is accepted (buffered) but not sent to the user When C_SEQ > S_ACK + S_Wind or C_SEQ < S_ACK :  The packet is dropped In both cases, the ACK(S_ACK) is sent (ACK packet with S_SEQ, S_ACK) 15
  • 16. TCP SESSION STEALING In a desynchronized state, the attacker can send any acceptable data to the server  E.g. [echo myhost >> ~/.rhost] for rlogin X 2: X->S (spoofing C): S_ACK, S_SEQ 1: C->S: C_SEQ, C_ACK [echo myhost >> ~/.rhost] (accepted) (dropped) C S C_SEQ, C_ACK S_SEQ, S_ACK S_SEQ  C_ACK and C_SEQ  S_ACK 16
  • 17. DESYNCHRONIZATION X 3,4, 6 2 Early desynchronization C S 1 1. C->S(Syn): C_Seq0 ; C: Syn_Sent 2. S->C(Syn/Ack): S_Seq0, C_Seq0+1 ; S: Syn_Rcvd ; C: Established (C_Seq0+1, S_Seq0+1) (before the packet C->S(Ack): S_Seq0+1) 3. X->S(spoofing C, Rst) 4. X->S(spoofing C, Syn): X_Seq0 ; the same port # used in (1) 5. S->C(Syn/Ack): S_Seq1, X_Seq0+1 6. X->S(spoofing C, Ack): S_Seq1+1 ; S: Established (S_Seq1+1, X_Seq0+1) 17
  • 18. THE ATTACK Null data desynchronization 1. The attacker watches the session without interfering. 2. During a quiet period, the attacker sends a large amount of null data (IAC, NOP for telnet): nothing happens, server only changes the TCP Ack number 3. Now, when the client sends data, it is dropped by the server because it’s lower than the server’s window. 4. The attacker does the same with the client. Defense: ssh connection, or IPsec 18