Xin chào ! Nếu đây là lần đầu tiên bạn đến với diễn đàn, xin vui lòng danh ra một phút bấm vào đây để đăng kí và tham gia thảo luận cùng VnPro.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bat tay 3 buoc ???

    Connection establishment

    To establish a connection, TCP uses a three-way handshake. Before a client attempts to connect with a server, the server must first bind to a port to open it up for connections: this is called a passive open. Once the passive open is established, a client may initiate an active open. To establish a connection, the three-way (or 3-step) handshake occurs:

    1. The active open is performed by the client sending a SYN to the server.
    2. In response, the server replies with a SYN-ACK.
    3. Finally the client sends an ACK back to the server.

    At this point, both the client and server have received an acknowledgment of the connection.

    Example:
    The initiating host (client) sends a synchronization packet (SYN flag set to 1) to initiate a connection. It sets the packet's sequence number to a random value x.
    The other host receives the packet, records the sequence number x from the client, and replies with an acknowledgment and synchronization (SYN-ACK). The Acknowledgment is a 32-bit field in TCP segment header. It contains the next sequence number that this host is expecting to receive (x + 1). The host also initiates a return session. This includes a TCP segment with its own initial Sequence Number of value y.
    The initiating host responds with the next Sequence Number (x + 1) and a simple Acknowledgment Number value of y + 1, which is the Sequence Number value of the other host + 1.
    Gia tri random x? cac ban cho minh hoi, gia tri nay tai sao ko bat dau tu so 0, ma phai random, ma theo minh biet thi no ko bao gio la so 0, ma la 1 so ngau nhien nao do? thanks

  • #2
    Gia tri random x? cac ban cho minh hoi, gia tri nay tai sao ko bat dau tu so 0, ma phai random, ma theo minh biet thi no ko bao gio la so 0, ma la 1 so ngau nhien nao do? thanks

    Mình nhớ có đọc ở đâu đó về cái này, nói đại khái là vầy.
    Nó chỉ bắt tay 1 lần. Nếu giá trị sequence không sinh ra ngẫu nhiên thì hacker có thể rà đại một số sequence có giá trị từ 0 lên để trả lại máy cần nhận. Khi đó máy client có thể hiểu lầm máy hacker là server mà có thể bị xâm nhập bất hợp pháp. [vì lúc này hacker đã giả IP của server, chỉ có số sequence thì nó chưa biết]
    Phạm Minh Tuấn

    Email : phamminhtuan@vnpro.org
    Yahoo : phamminhtuan_vnpro
    -----------------------------------------------------------------------------------------------
    Trung Tâm Tin Học VnPro
    149/1D Ung Văn Khiêm P25 Q.Bình thạnh TPHCM
    Tel : (08) 35124257 (5 lines)
    Fax: (08) 35124314

    Home page: http://www.vnpro.vn
    Support Forum: http://www.vnpro.org
    - Chuyên đào tạo quản trị mạng và hạ tầng Internet
    - Phát hành sách chuyên môn
    - Tư vấn và tuyển dụng nhân sự IT
    - Tư vấn thiết kế và hỗ trợ kỹ thuật hệ thống mạng

    Network channel: http://www.dancisco.com
    Blog: http://www.vnpro.org/blog

    Comment


    • #3
      Vay neu ko tinh den van de hacker, thi con muc dich nao khac cho van de nay nua ko?

      Comment

      Working...
      X