---
title: Introduction to Hacking - Banner Grabbing
show-content: 1
layout: console
---

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:

```bash
sudo pacman -S netcat
```

On a Debian-based distro:

```bash
sudo apt install netcat
```

On a Gentoo-based distro:

```bash
emerge netcat
```

On a Void-based distro:

```bash
sudo xbps-install netcat
```

Once it is installed, you can execute it by issuing a command like the
following:

```bash
nc <url> <port number>
```

For example:

```bash
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:

```bash
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.
```

[Index](/blog/intro_hacking/index)
