Part 1: Getting started with Nmap | cpuinfo
Posts Part 1: Getting started with Nmap
Post
Cancel

Part 1: Getting started with Nmap

About nmap aka ‘Network Mapper’

  1. Tool for network discovery and security audit
  2. Port scanner
  3. OS detection
  4. Version detection
  5. Audit Webservers and Databases
  6. Audit mail servers
  7. Extend it with Nmap Scripting Engine (NSE)
  8. and much more

Jargon

Pre-requisite installations

Install the nmap tool

1
sudo apt-get install nmap

Exercises

Pre-requisite

Find the following for your host:

  1. IP Address
  2. Subnet Mask
  3. MAC address
  4. Interface Name

Use the following command:

1
ifconfig

Here is a snapshot of the output for one of the interfaces on my host. ifconfig

Here is a sample information filled for my host. You can note the details for your host. You can take up the quiz and fill the details here. Please mask the last two octets of the MAC address as xx as shown below.

NameMy host valueYour host value
IP Address192.168.1.13 
Subnet Mask255.255.255.0 
MAC address08:00:27:f0:xx:xx 
Interface Nameenp0s10 

Note: Many a times you may have number of interfaces and hence you may see multiple interfaces enumerated after you give the ifconfig command.

Exercise #1: Scan all devices connected to network aka network reconnaissance

Objective of the exercise is to find what are the other devices that are connected on the network. These could PCs, laptops, routers, switches, IoT devices including smart bulbs, smart switches, Alexa enabled device, Google Home device etc.

Fire the following command to scan devices in your network. The option -sn is for performing a ping scan and disable port scan.

1
nmap -sn 192.168.1.1/24 

ifconfig

As you see there are seven hosts (with corresponding IP addresses) that are connected on the network.

This post is licensed under CC BY 4.0 by the author.