Checking for Open Ports 111
TA B LE 5.1 TCP flags
Flag Use
SYN Initiates a connection between two hosts to facilitate communication.
ACK Acknowledges the receipt of a packet of information.
URG Indicates that the data contained in the packet is urgent and should be
processed immediately.
PSH Instructs the sending system to send all buffered data immediately.
FIN Tells the remote system that no more information will be sent. In essence
this gracefully closes a connection.
RST Resets a connection.
These flags will figure prominently in this section as well as on the CEH
exam in several areas such as sniffing and intrusion detection systems.
Study and memorize each of them.
FIGURE 5.1 The three-way handshake
Host A Host B
Send SYN seq=x In the Network
Receive SYN
Send SYN seq=y, ACK x+1
Receive ACK
Receive SYN + ACK
Send ACK y+1
Time