What is a PORTSCAN?

PORTSCAN

or

PORTSCANNING

Portscan or portscanning is a operation that is done by using a portscanner. A port scanner is a piece of software that searches a network host for open ports. The tool is often used by administrators to check the security of their networks and also used by hackers to compromise it. To portscan a host is to scan for listening ports on a single target host (one ip). To portsweep is to scan multiple hosts (ip range or just specific ips) for a specific listening port. Portsweeping is typically used in searching for a specific service, for example, a SPAM computer worm may port sweep looking for hosts listening on TCP/UDP port 25 (SMTP mail server default port).
The simplest port scanners use the operating system's network functions (connect system call) and is generally the next option to go to when SYN is not an option. Nmap is one of the most widely used portscanner and is available for UNIX-like and Windows operating systems. The simple port scanning in Nmap is called connect scan, named after the Unix connect() system call. If a port is open the operating system completes the TCP three-way handshake then the port scanner immediately closes the connection and marks the port open. Otherwise an error code is returned and the port is marked closed. This scan mode is popular because of the fact that the user doesn't require special privileges. However, using the OS network functions prevents low-level control (and it's quite slow), so this scan type is less commonly used.
Our portscanner will check for the next ports: 21, 22, 23, 25, 53, 80, 110, 145 and 443.