Ubuntu Server – Using NMAP to scan your server for vulnerabilities.

Configuring Ubuntu, LAMP, Open Source, P.C. Linux, Ubuntu, Ubuntu Server

There may be other ways to install and configure this, but this is how I did it!

First install ubuntu, if you are not logged in as root you may need to add “sudo” in front of your command.

apt-get update
apt-get upgrade
apt-get install nmap

Now here is an example of scanning ports randomized (-r) with verbose output (-v) and os detection (-O) for further enumeration/scanning.

nmap -r -v -O putyourdomainhere.com

You should see output similar to this:


Starting Nmap 4.62 ( http://nmap.org ) at 2008-12-08 12:18 EST
Initiating Parallel DNS resolution of 1 host. at 12:18
Completed Parallel DNS resolution of 1 host. at 12:18, 0.04s elapsed
Initiating SYN Stealth Scan at 12:18
Scanning putyourdomainhere.com (xx.xxx.xx.xx) [1715 ports]
Discovered open port 80/tcp on xx.xxx.xx.xx
Completed SYN Stealth Scan at 12:18, 0.05s elapsed (1715 total ports)
Initiating OS detection (try #1) against putyourdomainhere.com (xx.xxx.xx.xx)
Host putyourdomainhere.com (xx.xxx.xx.xx) appears to be up ... good.
Interesting ports on putyourdomainhere.com (xx.xxx.xx.xx):
Not shown: 1714 closed ports
PORT   STATE SERVICE
80/tcp open  http
Device type: general purpose
Running: Linux 2.6.X
OS details: Linux 2.6.17 - 2.6.23
Uptime: 2.854 days (since Fri Dec  5 15:49:01 2008)
Network Distance: 0 hops
TCP Sequence Prediction: Difficulty=205 (Good luck!)
IP ID Sequence Generation: All zeros

Read data files from: /usr/share/nmap
OS detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 1.721 seconds
           Raw packets sent: 1734 (77.058KB) | Rcvd: 3472 (147.004KB)

NMAP is really that simple!

3 Comments

3 Comments

  1. freedom_is_chaos  •  Dec 10, 2008 @11:40 am

    Nmap doesn’t scan for vulnerabilities, it scans for open/closed/filtered ports. Nessus scans for vulnerabilities.

  2. Nick  •  Dec 10, 2008 @1:49 pm

    nessus? hmm would you be willing to elaborate……..maybe a “how to” is in order here.

  3. Nick  •  Dec 12, 2008 @11:10 pm

    ….no how to for me?

Leave a Reply

You must be logged in to post a comment.