246 ◾ Network Attacks and Defenses: A Hands-on Approach
7.7.2 Active and Passive FTP Modes
FTP is a service that is based on TCP client/server archi-
tecture. FTP is an unusual service in that it uses two com-
munication channels, called the Command channel (also
known as the Control channel) and the Data channel.
FTP utilizes two ports at the server side: a Command port
(21) and a Data port (usually 20 or 1024-65535). In addi-
tion, FTP offers two connection modes, namely, the Active
FTP mode (also known as the Normal FTP mode) and the
Passive FTP mode. The following subsections describe the
two modes.
7.7.2.1 Active FTP Mode
In Active FTP mode, the FTP client connects from a random
port (X > 1023) to the FTP server’s command port, port 21 ...