Table des matières

Mode connecté

La connexion TCP

Le mode connecté de TCP n'est pas d'une grande simplicité. Il est conçu pour être robuste et tient compte des possibilités et des risques des grands réseaux maillés, à savoir:

TCP en revanche ne prend hélas pas en compte, ou très peu, les problèmes de piratage.

L'exemple est pris sur mon réseau local, mais le principe reste rigoureusement le même sur l'Internet. La manipulation sur le réseau local m'évite d'avoir à faire un filtrage plus ou moins pénible.

La séquence en gros

No. Time    Source              Destination        Proto Info
 1 0.000000 00:20:18:b9:49:37   ff:ff:ff:ff:ff:ff   ARP  Who has 192.168.0.250? Tell 192.168.0.10
 2 0.000277 00:20:18:61:90:e3   00:20:18:b9:49:37   ARP  192.168.0.250 is at 00:20:18:61:90:e3
 3 0.000474 chris.maison.mrs    gateway1.maison.mrs TCP  1927 > pop3 [SYN]
 4 0.000885 gateway1.maison.mrs chris.maison.mrs    TCP  pop3 > 1927 [SYN, ACK]
 5 0.001111 chris.maison.mrs    gateway1.maison.mrs TCP  1927 > pop3 [ACK]
 6 0.049836 gateway1.maison.mrs chris.maison.mrs    POP  Response: +OK
 7 0.050586 chris.maison.mrs    gateway1.maison.mrs POP  Request: USER chris
 8 0.050998 gateway1.maison.mrs chris.maison.mrs    TCP  pop3 > 1927 [ACK]
 9 0.051511 gateway1.maison.mrs chris.maison.mrs    POP  Response: +OK
10 0.051979 chris.maison.mrs    gateway1.maison.mrs POP  Request: PASS babaorum
11 0.060769 gateway1.maison.mrs chris.maison.mrs    TCP  pop3 > 1927 [ACK]
12 0.159888 gateway1.maison.mrs chris.maison.mrs    POP  Response: +OK Mailbox open, 0 messages
13 0.160799 chris.maison.mrs    gateway1.maison.mrs POP  Request: STAT
14 0.161552 gateway1.maison.mrs chris.maison.mrs    POP  Response: +OK 0 0
15 0.162801 chris.maison.mrs    gateway1.maison.mrs POP  Request: QUIT
16 0.167987 gateway1.maison.mrs chris.maison.mrs    POP  Response: +OK Sayonara
17 0.168562 chris.maison.mrs    gateway1.maison.mrs TCP  1927 > pop3 [FIN, ACK]
18 0.168957 gateway1.maison.mrs chris.maison.mrs    TCP  pop3 > 1927 [ACK]
19 0.169465 gateway1.maison.mrs chris.maison.mrs    TCP  pop3 > 1927 [FIN, ACK]
20 0.169698 chris.maison.mrs    gateway1.maison.mrs TCP  1927 > pop3 [ACK]

Pas moins de 20 trames, pour constater qu'il n'y a pas de nouveau courrier!

TCP en détail

Un petit coup d'ARP...

Les séquences 1 et 2 ne sont pas inintéressantes, bien que ne faisant pas directement partie du protocole TCP. C'est de l'ARP, ça vient de la couche basse d'Ethernet,

Trame 2:
Le serveur répond:
192.168.0.250 à la MAC Address:00:20:18:61:90:e3

Si, sans trop attendre, je lance la commande ARP sur mon poste, voici le résultat:

E:\> arp -a

Interface : 192.168.0.10 on Interface 0x4000003
Adresse Internet Adresse physique Type
192.168.0.250 00-20-18-61-90-e3 dynamique**

Au bout d'un « certain temps » sans servir, cette ligne sera effacée de la mémoire. Rappelons qu'à l'intérieur d'un réseau, la couche d'accès physique (la plus basse du modèle DOD)  utilise exclusivement les adresses MAC

Et la connexion TCP

Etablissement de la connexion

Accrochez-vous, c'est un peu compliqué :)

Il faut d'abord savoir que les connexions TCP mettent en œuvre deux pointeurs de 32 bits, respectivement appelés:

Ces deux pointeurs permettent le suivi des paquets:

D'autres pointeurs permettent également de fiabiliser la connexion, comme le checksum. Nous n'allons pas rentrer dans tous les détails, d'autres sites sur l'Internet le font déjà très bien. Le point particulier des numéros de séquence et d'acquittement va en revanche être regardé de près, parce qu'il est utilisé pour une attaque particulièrement redoutable: le « spoofing ».

Par ailleurs, un ensemble de « flags » (drapeaux, bits significatifs d'un état particulier) permet de donner des informations sur la nature du paquet.

Voyons ce que les livres disent:

L'établissement d'une connexion se fait en trois temps:

Etablissement d'une connexion TCP

1 2 3
Le client envoie une séquence de synchronisation, avec un numéro de séquence. Le Flag « SYN » est positionné Le serveur répond par une acceptation dans laquelle il renvoie:
- un numéro d'acquittement égal au numéro de séquence qu'il a reçu+1
- un numéro de séquence les flags SYN et ACK sont positionnés.
Le client acquitte la réponse en envoyant:
- un numéro d'acquittement égal au numéro de séquence envoyé par le serveur +1
- un numéro de séquence égal au numéro d'acquittement envoyé par le serveur

Mais voyons cela sur l'exemple::

Frame 3 (62 on wire, 62 captured)
   Arrival Time: Oct 12, 2000 11:19:15.3756
    Time delta from previous packet: 0.000197 seconds
    Frame Number: 3
    Packet Length: 62 bytes
    Capture Length: 62 bytes
Ethernet II
    Destination: 00:20:18:61:90:e3 (00:20:18:61:90:e3)
    Source: 00:20:18:b9:49:37 (00:20:18:b9:49:37)
    *** //Au niveau Ethernet, nous trouvons les deux adresses MAC
    Type: IP (0x0800)
Internet Protocol
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..00 = Currently Unused: 0
    Total Length: 48
    Identification: 0x7624
    Flags: 0x04
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 128
    Protocol: TCP (0x06)
    *** C'est bien un protocole TCP
    Header checksum: 0x024f (correct)
    Source: chris.maison.mrs (192.168.0.10)
    Destination: gateway1.maison.mrs (192.168.0.250)
Transmission Control Protocol, Src Port: 1927 (1927), Dst Port: pop3 (110)
    Source port: 1927 (1927)
    *** Le port du client (l'émetteur de cette trame)
    Destination port: pop3 (110)
    *** Le port de destination (110 pour POP3)
    Sequence number: 3662573346
    *** Et un numéro de séquence (à mémoriser pour la suite).
    Header length: 28 bytes
    Flags: 0x0002 (SYN)
        ..0. .... = Urgent: Not set
        ...0 .... = Acknowledgment: Not set
        .... 0... = Push: Not set
        .... .0.. = Reset: Not set
        .... ..1. = Syn: Set
        *** C'est bien une requête « SYN »
        .... ...0 = Fin: Not set
    Window size: 16384
    Checksum: 0x6f64
    Options: (8 bytes)
        Maximum segment size: 1460 bytes
        NOP
        NOP
        SACK permitted

La seconde doit être la réponse du serveur POP. Normalement, c'est un ACK (Acknowledgment, Acceptation de la synchronisation du client, suivi d'une demande de synchronisation du numéro de séquence du serveur), c'est ce que disent les livres. Voyons ça :

Frame 4 (62 on wire, 62 captured)
    Arrival Time: Oct 12, 2000 11:19:15.3760
    Time delta from previous packet: 0.000411 seconds
    Frame Number: 4
    Packet Length: 62 bytes
    Capture Length: 62 bytes
Ethernet II
    Destination: 00:20:18:b9:49:37 (00:20:18:b9:49:37) *** Le client
    Source: 00:20:18:61:90:e3 (00:20:18:61:90:e3)      *** Le serveur
    Type: IP (0x0800)
Internet Protocol
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..00 = Currently Unused: 0
    Total Length: 48
    Identification: 0x088a
    Flags: 0x04
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 64
    Protocol: TCP (0x06)
    Header checksum: 0xafe9 (correct)
    Source: gateway1.maison.mrs (192.168.0.250)
    Destination: chris.maison.mrs (192.168.0.10)
Transmission Control Protocol, Src Port: pop3 (110), Dst Port: 1927 (1927)
    Source port: pop3 (110)
    *** Le serveur continue sur le port 110
    Destination port: 1927 (1927)
    *** Et répond bien sur le port ouvert par le client
    Sequence number: 4089248825
    *** Le numéro de séquence proposé par le serveur
    Acknowledgement number: 3662573347
    *** Rappelez-vous, le n° de séquence du client était 3662573346
    *** Le numéro d'acquittement est 3662573346 + 1
    Header length: 28 bytes
    Flags: 0x0012 (SYN, ACK)
        ..0. .... = Urgent: Not set
        ...1 .... = Acknowledgment: Set
        *** Nous avons bien un acquittement de la part du serveur
        .... 0... = Push: Not set
        .... .0.. = Reset: Not set
        .... ..1. = Syn: Set
        *** Et une demande de synchronisation (sur le numéro de séquence 4089248825)
        .... ...0 = Fin: Not set
    Window size: 32120
    Checksum: 0x41e4
    Options: (8 bytes)
        Maximum segment size: 1460 bytes
        NOP
        NOP
        SACK permitted

Ici, nous devrions trouver un acquittement du client sur le numéro de séquence 4089248825

Frame 5 (60 on wire, 60 captured)
    Arrival Time: Oct 12, 2000 11:19:15.3762
    Time delta from previous packet: 0.000226 seconds
    Frame Number: 5
    Packet Length: 60 bytes
    Capture Length: 60 bytes
Ethernet II
    Destination: 00:20:18:61:90:e3 (00:20:18:61:90:e3)
    Source: 00:20:18:b9:49:37 (00:20:18:b9:49:37)
    *** C'est bien le client qui répond au serveur
    Type: IP (0x0800)
Internet Protocol
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..00 = Currently Unused: 0
    Total Length: 40
    Identification: 0x7625
    Flags: 0x04
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 128
    Protocol: TCP (0x06)
    Header checksum: 0x0256 (correct)
    Source: chris.maison.mrs (192.168.0.10)
    Destination: gateway1.maison.mrs (192.168.0.250)
Transmission Control Protocol, Src Port: 1927 (1927), Dst Port: pop3 (110)
    Source port: 1927 (1927)
    Destination port: pop3 (110)
    *** Les ports ne sont toujours pas changés
    Sequence number: 3662573347
    *** souvenez-vous: « Acknowledgement number: 3662573347 »
    Acknowledgement number: 4089248826
    *** comme tout à l'heure, 4089248825 + 1
    Header length: 20 bytes
    Flags: 0x0010 (ACK)
        ..0. .... = Urgent: Not set
        ...1 .... = Acknowledgment: Set
        *** Il n'y a bien qu'un acquittement.
        .... 0... = Push: Not set
        .... .0.. = Reset: Not set
        .... ..0. = Syn: Not set
        .... ...0 = Fin: Not set
    Window size: 17520
    Checksum: 0xa7b0

C'est bien comme dans les livres (ouf!)

La transmission des données

Que disent les livres? Ils disent que maintenant, les échanges de données vont se faire.

Sur le protocole POP3, c'est le serveur qui va envoyer un message de bienvenue. La trame qui suit doit donc provenir du serveur, elle doit contenir:

Frame 6 (103 on wire, 103 captured)
    Arrival Time: Oct 12, 2000 11:19:15.4249
    Time delta from previous packet: 0.048725 seconds
    Frame Number: 6
    Packet Length: 103 bytes
    Capture Length: 103 bytes
Ethernet II
    Destination: 00:20:18:b9:49:37 (00:20:18:b9:49:37)
    Source: 00:20:18:61:90:e3 (00:20:18:61:90:e3)
    Type: IP (0x0800)
Internet Protocol
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..00 = Currently Unused: 0
    Total Length: 89
    Identification: 0x088b
    Flags: 0x04
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 64
    Protocol: TCP (0x06)
    Header checksum: 0xafbf (correct)
    Source: gateway1.maison.mrs (192.168.0.250)
    Destination: chris.maison.mrs (192.168.0.10)
    *** C'est bien le serveur qui répond.
Transmission Control Protocol, Src Port: pop3 (110), Dst Port: 1927 (1927)
    Source port: pop3 (110)
    Destination port: 1927 (1927)
    Sequence number: 4089248826
    Acknowledgement number: 3662573347
    *** Nous partons bien sur les numéros de séquence et d'acquittement définis
    Header length: 20 bytes
    Flags: 0x0018 (PSH, ACK)
        ..0. .... = Urgent: Not set
        ...1 .... = Acknowledgment: Set
        *** L'acquittement au paquet précédent est donné
        .... 1... = Push: Set
        *** Il va y avoir des données...
        .... .0.. = Reset: Not set
        .... ..0. = Syn: Not set
        .... ...0 = Fin: Not set
    Window size: 32120
    Checksum: 0xa343
Post Office Protocol
    Response: +OK
    Response Arg: POP3 gateway1.maison.mrs v7.64 server ready
    *** Et voilà les données.

Pour le moment, tout se passe encore conformément aux écritures. Voyons la suite.

Le paquet précédent contient les données:

+OK POP3 gateway1.maison.mrs v7.64 server ready

Ceci nous fait 47 octets (Il ne faut pas oublier de compter les espaces, ce sont des caractères comme les autres). Il ne faut pas oublier non plus qu'une ligne de texte se termine par les caractères CR (retour à la ligne) et LF (saut de ligne), ce qui nous fait deux caractères de plus, soit au total 49 octets.

Normalement:

Le client doit maintenant envoyer son login. Nous devrions donc trouver un PUSH et un ACK .

Frame 7 (66 on wire, 66 captured)
    Arrival Time: Oct 12, 2000 11:19:15.4257
    Time delta from previous packet: 0.000750 seconds
    Frame Number: 7
    Packet Length: 66 bytes
    Capture Length: 66 bytes
Ethernet II
    Destination: 00:20:18:61:90:e3 (00:20:18:61:90:e3)
    Source: 00:20:18:b9:49:37 (00:20:18:b9:49:37)
    Type: IP (0x0800)
Internet Protocol
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..00 = Currently Unused: 0
    Total Length: 52
    Identification: 0x7626
    Flags: 0x04
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 128
    Protocol: TCP (0x06)
    Header checksum: 0x0249 (correct)
    Source: chris.maison.mrs (192.168.0.10)
    Destination: gateway1.maison.mrs (192.168.0.250)
    *** C'est bien le client qui s'adresse au serveur
Transmission Control Protocol, Src Port: 1927 (1927), Dst Port: pop3 (110)
    Source port: 1927 (1927)
    Destination port: pop3 (110)
    Sequence number: 3662573347
    *** Oui, c'est l'Acknowledgment number du paquet précédent
    Acknowledgement number: 4089248875
    *** OUI!!! C'est le Sequence number du paquet précédent augmenté de 49
    Header length: 20 bytes
    Flags: 0x0018 (PSH, ACK)
        ..0. .... = Urgent: Not set
        ...1 .... = Acknowledgment: Set
        *** voici l'ACK...
        .... 1... = Push: Set
        *** et voilà le PUSH, donc il y aura des données
        .... .0.. = Reset: Not set
        .... ..0. = Syn: Not set
        .... ...0 = Fin: Not set
    Window size: 17471
    Checksum: 0x0da4
Post Office Protocol
    Request: USER
    Request Arg: chris
    *** Ce sont les données.

Tout s'est passé comme prévu.

Bien. Comme nous connaissons par cœur le protocole POP, nous savons que le serveur va envoyer la réponse « +OK » et une invite à communiquer le mot de passe.

Nous devrions trouver:

Frame 8 (60 on wire, 60 captured)
    Arrival Time: Oct 12, 2000 11:19:15.4261
    Time delta from previous packet: 0.000412 seconds
    Frame Number: 8
    Packet Length: 60 bytes
    Capture Length: 60 bytes
Ethernet II
    Destination: 00:20:18:b9:49:37 (00:20:18:b9:49:37)
    Source: 00:20:18:61:90:e3 (00:20:18:61:90:e3)
    Type: IP (0x0800)
Internet Protocol
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..00 = Currently Unused: 0
    Total Length: 40
    Identification: 0x088c
    Flags: 0x04
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 64
    Protocol: TCP (0x06)
    Header checksum: 0xafef (correct)
    Source: gateway1.maison.mrs (192.168.0.250)
    Destination: chris.maison.mrs (192.168.0.10)
    *** C'est bien le serveur qui répond.
Transmission Control Protocol, Src Port: pop3 (110), Dst Port: 1927 (1927)
    Source port: pop3 (110)
    Destination port: 1927 (1927)
    Sequence number: 4089248875
    Acknowledgement number: 3662573359 =3662573347+12. Toujours normal, 12 octets de données dans le paquet précédent.
    Header length: 20 bytes
    Flags: 0x0010 (ACK)
        ..0. .... = Urgent: Not set
        ...1 .... = Acknowledgment: Set
        *** Voici ACK...
        .... 0... = Push: Not set
        *** Mais il n'y a pas de PUSH, donc pas de données?
        .... .0.. = Reset: Not set
        .... ..0. = Syn: Not set
        .... ...0 = Fin: Not set
    Window size: 32120
    Checksum: 0x6e6b

Ben non, il n'y a pas eu de données. Comme on est parfaitement certain que le serveur doit en envoyer (parce que l'on connaît le protocole POP3 par cœur), c'est que c'est encore le serveur qui va parler…

Frame 9 (95 on wire, 95 captured)
    Arrival Time: Oct 12, 2000 11:19:15.4266
    Time delta from previous packet: 0.000513 seconds
    Frame Number: 9
    Packet Length: 95 bytes
    Capture Length: 95 bytes
Ethernet II
    Destination: 00:20:18:b9:49:37 (00:20:18:b9:49:37)
    Source: 00:20:18:61:90:e3 (00:20:18:61:90:e3)
    Type: IP (0x0800)
Internet Protocol
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..00 = Currently Unused: 0
    Total Length: 81
    Identification: 0x088d
    Flags: 0x04
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 64
    Protocol: TCP (0x06)
    Header checksum: 0xafc5 (correct)
    Source: gateway1.maison.mrs (192.168.0.250)
    Destination: chris.maison.mrs (192.168.0.10)
    *** Oui, c'est encore le serveur
Transmission Control Protocol, Src Port: pop3 (110), Dst Port: 1927 (1927)
    Source port: pop3 (110)
    Destination port: 1927 (1927)
    Sequence number: 4089248875
    Acknowledgement number: 3662573359
    *** Et les numéros sont identiques au paquet précédent (normal, pas de données dans le paquet précédent)
    Header length: 20 bytes
    Flags: 0x0018 (PSH, ACK)
        ..0. .... = Urgent: Not set
        ...1 .... = Acknowledgment: Set
        .... 1... = Push: Set
        *** Ce coup-ci, il y a des données.
        .... .0.. = Reset: Not set
        .... ..0. = Syn: Not set
        .... ...0 = Fin: Not set
    Window size: 32120
    Checksum: 0x6428
Post Office Protocol
    Response: +OK
    Response Arg: User name accepted, password please
    *** Les voilà!

Et voilà. Le client va envoyer son mot de passe, le dialogue continue.

Frame 10 (68 on wire, 68 captured)
    Arrival Time: Oct 12, 2000 11:19:15.4271
    Time delta from previous packet: 0.000468 seconds
    Frame Number: 10
    Packet Length: 68 bytes
    Capture Length: 68 bytes
Ethernet II
    Destination: 00:20:18:61:90:e3 (00:20:18:61:90:e3)
    Source: 00:20:18:b9:49:37 (00:20:18:b9:49:37)
    Type: IP (0x0800)
Internet Protocol
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..00 = Currently Unused: 0
    Total Length: 54
    Identification: 0x7627
    Flags: 0x04
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 128
    Protocol: TCP (0x06)
    Header checksum: 0x0246 (correct)
    Source: chris.maison.mrs (192.168.0.10)
    Destination: gateway1.maison.mrs (192.168.0.250)

    *** C'est bien le client
Transmission Control Protocol, Src Port: 1927 (1927), Dst Port: pop3 (110)
    Source port: 1927 (1927)
    Destination port: pop3 (110)
    Sequence number: 3662573359
    *** = Acknowledgement number précédent
    Acknowledgement number: 4089248916
    *** = Sequence number précédent augmenté de 41, nous avons compris le principe
    Header length: 20 bytes
    Flags: 0x0018 (PSH, ACK)
        ..0. .... = Urgent: Not set
        ...1 .... = Acknowledgment: Set
        .... 1... = Push: Set
        *** Il va y avoir des données.
        .... .0.. = Reset: Not set
        .... ..0. = Syn: Not set
        .... ...0 = Fin: Not set
  Window size: 17430
  Checksum: 0x8f50
Post Office Protocol
    Request: PASS
    Request Arg: epikoi

    *** M**** alors! le mot de passe circule en clair !
        rassurez-vous, ce n'est pas le bon que vous lisez :-)
        Mais le mot de passe circule vraiment en clair. Stupéfiant non?//**

Bien. Il ne reste plus que 10 trames à regarder mais maintenant, ça va devenir monotone. Je vous laisse les analyser tout seul. Je vous conseille tout de même les trames 17, 18 19 et 20 qui servent à fermer proprement la connexion. C'est une procédure importante qui permet au serveur « d'oublier » cette connexion.

Frame 11 (60 on wire, 60 captured)
    Arrival Time: Oct 12, 2000 11:19:15.4359
    Time delta from previous packet: 0.008790 seconds
    Frame Number: 11
    Packet Length: 60 bytes
    Capture Length: 60 bytes
Ethernet II
    Destination: 00:20:18:b9:49:37 (00:20:18:b9:49:37)
    Source: 00:20:18:61:90:e3 (00:20:18:61:90:e3)
    Type: IP (0x0800)
Internet Protocol
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..00 = Currently Unused: 0
    Total Length: 40
    Identification: 0x088e
    Flags: 0x04
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 64
    Protocol: TCP (0x06)
    Header checksum: 0xafed (correct)
    Source: gateway1.maison.mrs (192.168.0.250)
    Destination: chris.maison.mrs (192.168.0.10)
Transmission Control Protocol, Src Port: pop3 (110), Dst Port: 1927 (1927)
    Source port: pop3 (110)
    Destination port: 1927 (1927)
    Sequence number: 4089248916
    Acknowledgement number: 3662573373
    Header length: 20 bytes
    Flags: 0x0010 (ACK)
        ..0. .... = Urgent: Not set
        ...1 .... = Acknowledgment: Set
        .... 0... = Push: Not set
        .... .0.. = Reset: Not set
        .... ..0. = Syn: Not set
        .... ...0 = Fin: Not set
    Window size: 32120
    Checksum: 0x6e34

Frame 12 (84 on wire, 84 captured)
    Arrival Time: Oct 12, 2000 11:19:15.5350
    Time delta from previous packet: 0.099119 seconds
    Frame Number: 12
    Packet Length: 84 bytes
    Capture Length: 84 bytes
Ethernet II
    Destination: 00:20:18:b9:49:37 (00:20:18:b9:49:37)
    Source: 00:20:18:61:90:e3 (00:20:18:61:90:e3)
    Type: IP (0x0800)
Internet Protocol
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..00 = Currently Unused: 0
    Total Length: 70
    Identification: 0x088f
    Flags: 0x04
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 64
    Protocol: TCP (0x06)
    Header checksum: 0xafce (correct)
    Source: gateway1.maison.mrs (192.168.0.250)
    Destination: chris.maison.mrs (192.168.0.10)
Transmission Control Protocol, Src Port: pop3 (110), Dst Port: 1927 (1927)
    Source port: pop3 (110)
    Destination port: 1927 (1927)
    Sequence number: 4089248916
    Acknowledgement number: 3662573373
    Header length: 20 bytes
    Flags: 0x0018 (PSH, ACK)
        ..0. .... = Urgent: Not set
        ...1 .... = Acknowledgment: Set
        .... 1... = Push: Set
        .... .0.. = Reset: Not set
        .... ..0. = Syn: Not set
        .... ...0 = Fin: Not set
    Window size: 32120
    Checksum: 0x8064
Post Office Protocol
    Response: +OK
    Response Arg: Mailbox open, 0 messages

Frame 13 (60 on wire, 60 captured)
    Arrival Time: Oct 12, 2000 11:19:15.5359
    Time delta from previous packet: 0.000911 seconds
    Frame Number: 13
    Packet Length: 60 bytes
    Capture Length: 60 bytes
Ethernet II
    Destination: 00:20:18:61:90:e3 (00:20:18:61:90:e3)
    Source: 00:20:18:b9:49:37 (00:20:18:b9:49:37)
    Type: IP (0x0800)
Internet Protocol
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..00 = Currently Unused: 0
    Total Length: 46
    Identification: 0x7628
    Flags: 0x04
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 128
    Protocol: TCP (0x06)
    Header checksum: 0x024d (correct)
    Source: chris.maison.mrs (192.168.0.10)
    Destination: gateway1.maison.mrs (192.168.0.250)
Transmission Control Protocol, Src Port: 1927 (1927), Dst Port: pop3 (110)
    Source port: 1927 (1927)
    Destination port: pop3 (110)
    Sequence number: 3662573373
    Acknowledgement number: 4089248946
    Header length: 20 bytes
    Flags: 0x0018 (PSH, ACK)
        ..0. .... = Urgent: Not set
        ...1 .... = Acknowledgment: Set
        .... 1... = Push: Set
        .... .0.. = Reset: Not set
        .... ..0. = Syn: Not set
        .... ...0 = Fin: Not set
    Window size: 17400
    Checksum: 0x05d6
Post Office Protocol
    Request: STAT

Frame 14 (63 on wire, 63 captured)
    Arrival Time: Oct 12, 2000 11:19:15.5366
    Time delta from previous packet: 0.000753 seconds
    Frame Number: 14
    Packet Length: 63 bytes
    Capture Length: 63 bytes
Ethernet II
    Destination: 00:20:18:b9:49:37 (00:20:18:b9:49:37)
    Source: 00:20:18:61:90:e3 (00:20:18:61:90:e3)
    Type: IP (0x0800)
Internet Protocol
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..00 = Currently Unused: 0
    Total Length: 49
    Identification: 0x0890
    Flags: 0x04
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 64
    Protocol: TCP (0x06)
    Header checksum: 0xafe2 (correct)
    Source: gateway1.maison.mrs (192.168.0.250)
    Destination: chris.maison.mrs (192.168.0.10)
Transmission Control Protocol, Src Port: pop3 (110), Dst Port: 1927 (1927)
    Source port: pop3 (110)
    Destination port: 1927 (1927)
    Sequence number: 4089248946
    Acknowledgement number: 3662573379
    Header length: 20 bytes
    Flags: 0x0018 (PSH, ACK)
        ..0. .... = Urgent: Not set
        ...1 .... = Acknowledgment: Set
        .... 1... = Push: Set
        .... .0.. = Reset: Not set
        .... ..0. = Syn: Not set
        .... ...0 = Fin: Not set
    Window size: 32120
    Checksum: 0x8d62
Post Office Protocol
    Response: +OK
    Response Arg: 0 0

Frame 15 (60 on wire, 60 captured)
    Arrival Time: Oct 12, 2000 11:19:15.5379
    Time delta from previous packet: 0.001249 seconds
    Frame Number: 15
    Packet Length: 60 bytes
    Capture Length: 60 bytes
Ethernet II
    Destination: 00:20:18:61:90:e3 (00:20:18:61:90:e3)
    Source: 00:20:18:b9:49:37 (00:20:18:b9:49:37)
    Type: IP (0x0800)
Internet Protocol
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..00 = Currently Unused: 0
    Total Length: 46
    Identification: 0x7629
    Flags: 0x04
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 128
    Protocol: TCP (0x06)
    Header checksum: 0x024c (correct)
    Source: chris.maison.mrs (192.168.0.10)
    Destination: gateway1.maison.mrs (192.168.0.250)
Transmission Control Protocol, Src Port: 1927 (1927), Dst Port: pop3 (110)
    Source port: 1927 (1927)
    Destination port: pop3 (110)
    Sequence number: 3662573379
    Acknowledgement number: 4089248955
    Header length: 20 bytes
    Flags: 0x0018 (PSH, ACK)
        ..0. .... = Urgent: Not set
        ...1 .... = Acknowledgment: Set
        .... 1... = Push: Set
        .... .0.. = Reset: Not set
        .... ..0. = Syn: Not set
        .... ...0 = Fin: Not set
    Window size: 17391
    Checksum: 0xffce
Post Office Protocol
    Request: QUIT

Frame 16 (68 on wire, 68 captured)
    Arrival Time: Oct 12, 2000 11:19:15.5431
    Time delta from previous packet: 0.005186 seconds
    Frame Number: 16
    Packet Length: 68 bytes
    Capture Length: 68 bytes
Ethernet II
    Destination: 00:20:18:b9:49:37 (00:20:18:b9:49:37)
    Source: 00:20:18:61:90:e3 (00:20:18:61:90:e3)
    Type: IP (0x0800)
Internet Protocol
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..00 = Currently Unused: 0
    Total Length: 54
    Identification: 0x0891
    Flags: 0x04
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 64
    Protocol: TCP (0x06)
    Header checksum: 0xafdc (correct)
    Source: gateway1.maison.mrs (192.168.0.250)
    Destination: chris.maison.mrs (192.168.0.10)
Transmission Control Protocol, Src Port: pop3 (110), Dst Port: 1927 (1927)
    Source port: pop3 (110)
    Destination port: 1927 (1927)
    Sequence number: 4089248955
    Acknowledgement number: 3662573385
    Header length: 20 bytes
    Flags: 0x0018 (PSH, ACK)
        ..0. .... = Urgent: Not set
        ...1 .... = Acknowledgment: Set
        .... 1... = Push: Set
        .... .0.. = Reset: Not set
        .... ..0. = Syn: Not set
        .... ...0 = Fin: Not set
    Window size: 32120
    Checksum: 0x3cde
Post Office Protocol
    Response: +OK
    Response Arg: Sayonara

Frame 17 (60 on wire, 60 captured)
    Arrival Time: Oct 12, 2000 11:19:15.5437
    Time delta from previous packet: 0.000575 seconds
    Frame Number: 17
    Packet Length: 60 bytes
    Capture Length: 60 bytes
Ethernet II
    Destination: 00:20:18:61:90:e3 (00:20:18:61:90:e3)
    Source: 00:20:18:b9:49:37 (00:20:18:b9:49:37)
    Type: IP (0x0800)
Internet Protocol
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..00 = Currently Unused: 0
    Total Length: 40
    Identification: 0x762a
    Flags: 0x04
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 128
    Protocol: TCP (0x06)
    Header checksum: 0x0251 (correct)
    Source: chris.maison.mrs (192.168.0.10)
    Destination: gateway1.maison.mrs (192.168.0.250)
Transmission Control Protocol, Src Port: 1927 (1927), Dst Port: pop3 (110)
    Source port: 1927 (1927)
    Destination port: pop3 (110)
    Sequence number: 3662573385
    Acknowledgement number: 4089248969
    Header length: 20 bytes
    Flags: 0x0011 (FIN, ACK)
        ..0. .... = Urgent: Not set
        ...1 .... = Acknowledgment: Set
        .... 0... = Push: Not set
        .... .0.. = Reset: Not set
        .... ..0. = Syn: Not set
        .... ...1 = Fin: Set
    Window size: 17377
    Checksum: 0xa789

Frame 18 (60 on wire, 60 captured)
    Arrival Time: Oct 12, 2000 11:19:15.5441
    Time delta from previous packet: 0.000395 seconds
    Frame Number: 18
    Packet Length: 60 bytes
    Capture Length: 60 bytes
Ethernet II
    Destination: 00:20:18:b9:49:37 (00:20:18:b9:49:37)
    Source: 00:20:18:61:90:e3 (00:20:18:61:90:e3)
    Type: IP (0x0800)
Internet Protocol
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..00 = Currently Unused: 0
    Total Length: 40
    Identification: 0x0892
    Flags: 0x04
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 64
    Protocol: TCP (0x06)
    Header checksum: 0xafe9 (correct)
    Source: gateway1.maison.mrs (192.168.0.250)
    Destination: chris.maison.mrs (192.168.0.10)
Transmission Control Protocol, Src Port: pop3 (110), Dst Port: 1927 (1927)
    Source port: pop3 (110)
    Destination port: 1927 (1927)
    Sequence number: 4089248969
    Acknowledgement number: 3662573386
    Header length: 20 bytes
    Flags: 0x0010 (ACK)
        ..0. .... = Urgent: Not set
        ...1 .... = Acknowledgment: Set
        .... 0... = Push: Not set
        .... .0.. = Reset: Not set
        .... ..0. = Syn: Not set
        .... ...0 = Fin: Not set
    Window size: 32120
    Checksum: 0x6df2

Frame 19 (60 on wire, 60 captured)
    Arrival Time: Oct 12, 2000 11:19:15.5446
    Time delta from previous packet: 0.000508 seconds
    Frame Number: 19
    Packet Length: 60 bytes
    Capture Length: 60 bytes
Ethernet II
    Destination: 00:20:18:b9:49:37 (00:20:18:b9:49:37)
    Source: 00:20:18:61:90:e3 (00:20:18:61:90:e3)
    Type: IP (0x0800)
Internet Protocol
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..00 = Currently Unused: 0
    Total Length: 40
    Identification: 0x0893
    Flags: 0x04
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 64
    Protocol: TCP (0x06)
    Header checksum: 0xafe8 (correct)
    Source: gateway1.maison.mrs (192.168.0.250)
    Destination: chris.maison.mrs (192.168.0.10)
Transmission Control Protocol, Src Port: pop3 (110), Dst Port: 1927 (1927)
    Source port: pop3 (110)
    Destination port: 1927 (1927)
    Sequence number: 4089248969
    Acknowledgement number: 3662573386
    Header length: 20 bytes
    Flags: 0x0011 (FIN, ACK)
        ..0. .... = Urgent: Not set
        ...1 .... = Acknowledgment: Set
        .... 0... = Push: Not set
        .... .0.. = Reset: Not set
        .... ..0. = Syn: Not set
        .... ...1 = Fin: Set
    Window size: 32120
    Checksum: 0x6df1

Frame 20 (60 on wire, 60 captured)
    Arrival Time: Oct 12, 2000 11:19:15.5448
    Time delta from previous packet: 0.000233 seconds
    Frame Number: 20
    Packet Length: 60 bytes
    Capture Length: 60 bytes
Ethernet II
    Destination: 00:20:18:61:90:e3 (00:20:18:61:90:e3)
    Source: 00:20:18:b9:49:37 (00:20:18:b9:49:37)
    Type: IP (0x0800)
Internet Protocol
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..00 = Currently Unused: 0
    Total Length: 40
    Identification: 0x762b
    Flags: 0x04
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 128
    Protocol: TCP (0x06)
    Header checksum: 0x0250 (correct)
    Source: chris.maison.mrs (192.168.0.10)
    Destination: gateway1.maison.mrs (192.168.0.250)
Transmission Control Protocol, Src Port: 1927 (1927), Dst Port: pop3 (110)
    Source port: 1927 (1927)
    Destination port: pop3 (110)
    Sequence number: 3662573386
    Acknowledgement number: 4089248970
    Header length: 20 bytes
    Flags: 0x0010 (ACK)
        ..0. .... = Urgent: Not set
        ...1 .... = Acknowledgment: Set
        .... 0... = Push: Not set
        .... .0.. = Reset: Not set
        .... ..0. = Syn: Not set
        .... ...0 = Fin: Not set
    Window size: 17377
    Checksum: 0xa788

Ce qu'il est intéressant d'étudier, c'est le mécanisme des numéros de séquence et d'acquittement. Parce que celui qui va être capable de prédire la séquence de ces numéros, s'il dispose d'outils qui savent bricoler les trames, pourra se faire passer pour un autre dans un dialogue TCP existant. C'est ce qu'on appelle le « spoofing“, méthode de piratage délicate mais dangereuse.

Vous avez également la RFC 793 dont une traduction en français est disponible ici:

http://abcdrfc.free.fr/rfc-vf/rfc793.html