FTP protocol analysis and packet capture

You can learn https://blog.csdn.net/longyc2010/article/details/43113173

Fundamental

FTP is a TCP-based services only, does not support UDP, FTP uses two ports, a data port and a control port

FTP has two modes: active mode and passive mode. Control port 21 is in active mode, the data port 20. Control port 21, the data port is an open passive mode 1024 or more high ports

Active mode:

         client(port n>1024)------>server(port=21)

         Open listening port n + 1

          client(port n>1024)<------server(port=20)

Passive mode:

         client(port n>1024)------>server(port=21)

           port n + 1

                                 Open the server listening port> 1024

          client(port n>1024)------>server(port>1024)

Control connection are the same, except that the data connection, the server port 20 from the active mode to the high port connected to the client, the client passive mode by the high upper port is connected to a port of the server

Status response code

The second number is the classification of the type of response, such as the connection with the relevant represents response represents the user authentication.

 

Packet capture analysis

1, three-way handshake

2, the user authentication process

Four waving

Published 18 original articles · won praise 1 · views 665

Guess you like

Origin blog.csdn.net/wj2555111/article/details/104752240