title: Introduction to Hacking - Banner Grabbing show-content: 1
Now that the hacker has a full list of services running on the target system, to be able to exploit them, he has to first figure out what software and version the service is. One way the hacker can get this information is by using NetCat. First, you will need to install netcat, to do so, issue the following commands:
On an Arch-based distro:
sudo pacman -S netcat
On a Debian-based distro:
sudo apt install netcat
On a Gentoo-based distro:
emerge netcat
On a Void-based distro:
sudo xbps-install netcat
Once it is installed, you can execute it by issuing a command like the following:
nc <url> <port number>
For example:
nc blacktraining.com 21
Once that command is executed, there will be no output, you will need to press random keys and hopefully you will get an output telling the name of the service, version and some other useful information, for example:
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 4 of 50 allowed.
220-Local time is now 22:54. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.