Scanning and identifying services with Nmap
Nmap is probably the most used port scanner in the world. It can be used to identify live hosts, scan TCP and UDP open ports, detect firewalls, get versions of services running in remote hosts, and even, with the use of scripts, find and exploit vulnerabilities.
In this recipe, we will use Nmap to identify all the services running on our target application's server and their versions. We will do this in several calls to Nmap for learning purposes, but it can be done using a single command.
Getting ready
All we need is to have our vulnerable_vm running.
How to do it...
- First, we want to see if the server is answering to a ping or if the host is up:
nmap -sn 192.168.56.102
- Now that we know that it's up, let's see which ports are open:
nmap 192.168.56.102
- Now, we will tell Nmap to ask the server for the versions of services it is running and to guess the operating system based on that.
nmap -sV -O 192.168.56.102
- We can see that our vulnerable_vm...