Banner grabbing is a technique used to gain information about a computer system on a network and the services running on its open ports.
However, an intruder can use banner grabbing in order to find network hosts that are running versions of applications and operating systems with known exploits.
Tools commonly used to perform banner grabbing are Telnet, Nmap and Netcat.
For example, one could establish a connection to a target web server using Netcat, then send an HTTP request.
Shodan is a search engine for banners grabbed from port scanning the Internet.