Port scanning is a process that is done to determine what services are available or running on a computer system. Port scanning may be done by an attacker or by a network administrator to be sure a computer is properly hardened and reasonably secure. The port number that responds to a scan will indicate what service is running on the target system. Once services that run on the system are determined, then any available vulnerabilities of those services may be exploited to gain access or deny service.
Port numbers range in value from 1 to 65535.