Wednesday, September 4, 2019

Nping - ICMP Types

Nping, one of the utility that comes with nmap.  Today, I will give some info on ICMP types that it supports.  It may not be complete list of ICMP types, but a few.

References:
I have a Fedora Linux machine connected to a wireless router through ethernet cable.

Basic Ping

1
2
3
4
5
6
7
8
9
$nping --icmp -c 1 --dest-ip 192.168.1.1

Starting Nping 0.6.45 ( http://nmap.org/nping ) at 2019-09-02 09:23 EDT
SENT (0.0225s) ICMP [192.168.1.10 > 192.168.1.1 Echo request (type=8/code=0) id=13299 seq=1] IP [ttl=64 id=18670 iplen=28 ]
RCVD (0.0232s) ICMP [192.168.1.1 > 192.168.1.10 Echo reply (type=0/code=0) id=13299 seq=1] IP [ttl=64 id=9377 iplen=28 ]
 
Max rtt: 0.651ms | Min rtt: 0.651ms | Avg rtt: 0.651ms
Raw packets sent: 1 (28B) | Rcvd: 1 (46B) | Lost: 0 (0.00%)
Nping done: 1 IP address pinged in 1.04 seconds

'c' refers to number of requests to be sent.


Some other stuff we can do like:


Time Stamp

1
2
3
4
5
6
7
8
9
$nping --icmp -c 1 --icmp-type 13 --dest-ip 192.168.1.1

Starting Nping 0.6.45 ( http://nmap.org/nping ) at 2019-09-02 11:29 EDT
SENT (0.0176s) ICMP [192.168.1.10 > 192.168.1.1 Timestamp request (type=13/code=0) id=24214 seq=1 orig=0 recv=0 trans=0] IP [ttl=64 id=14849 iplen=40 ]
RCVD (0.0183s) ICMP [192.168.1.1 > 192.168.1.10 Timestamp reply (type=14/code=0) id=24214 seq=1 orig=0 recv=3463577600 trans=3463577600] IP [ttl=64 id=65252 iplen=40 ]
 
Max rtt: 0.675ms | Min rtt: 0.675ms | Avg rtt: 0.675ms
Raw packets sent: 1 (40B) | Rcvd: 1 (46B) | Lost: 0 (0.00%)
Nping done: 1 IP address pinged in 1.03 seconds


There are other types of ICMP that are not widely used.  You may try to experiment and end up disappointed because many would not have been configured.  For understanding purpose you can go through wiki. https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol