This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
nmap [2019/09/15 18:36] acm |
nmap [2019/09/23 15:17] (current) acm |
||
---|---|---|---|
Line 1: | Line 1: | ||
==== NMap Network Mapper ==== | ==== NMap Network Mapper ==== | ||
- | Nmap is an opensource networking mapping tool frequently used in order to gain an accurate picture of how a network is a setup. It was written by Gordon Lyon and comes preinstalled on many Linux distros including Kali. | + | Nmap is an opensource networking mapping tool frequently used in order to gain an accurate picture of how a network is setup. It was written by Gordon Lyon and comes preinstalled on many Linux distros including Kali. |
- | == Port Scanning == | + | === Port Scanning |
The baseline functionality provided by Nmap is port scanning. This allows us to be able to tell what ports are open on our target machine. Nmap can conduct a basic port scan using | The baseline functionality provided by Nmap is port scanning. This allows us to be able to tell what ports are open on our target machine. Nmap can conduct a basic port scan using | ||
< | < | ||
- | nmap 192.168.1.1 | + | $nmap 192.168.56.3 |
</ | </ | ||
- | This command conducts an SYN scan of the 1000 most commonly used ports on the machine at 192.168.1.1. While this is useful often times you'll want to scan all the ports on the target machine, which can be done using | + | This command conducts an SYN scan of the 1000 most commonly used ports on the machine at 192.168.1.1. While this is useful often times you'll want to scan all the ports on the target machine, which can be done using(results of the scan are shown here) |
< | < | ||
- | nmap -p- 192.168.1.1 | + | $nmap -p- 192.168.56.3 |
+ | Starting Nmap 7.80 ( https:// | ||
+ | Nmap scan report for 192.168.56.3 | ||
+ | Host is up (0.00080s latency). | ||
+ | Not shown: 65505 closed ports | ||
+ | PORT STATE SERVICE | ||
+ | 21/ | ||
+ | 22/ | ||
+ | 23/ | ||
+ | 25/ | ||
+ | 53/ | ||
+ | 80/ | ||
+ | 111/ | ||
+ | 139/ | ||
+ | 445/ | ||
+ | 512/ | ||
+ | 513/ | ||
+ | 514/ | ||
+ | 1099/ | ||
+ | 1524/ | ||
+ | 2049/ | ||
+ | 2121/ | ||
+ | 3306/ | ||
+ | 3632/ | ||
+ | 5432/ | ||
+ | 5900/ | ||
+ | 6000/ | ||
+ | 6667/ | ||
+ | 6697/ | ||
+ | 8009/ | ||
+ | 8180/ | ||
+ | 8787/ | ||
+ | 34173/tcp open unknown | ||
+ | 34643/tcp open unknown | ||
+ | 38930/tcp open unknown | ||
+ | 40080/tcp open unknown | ||
</ | </ | ||
The ' | The ' | ||
< | < | ||
- | nmap -sU 192.168.1.1 | + | $nmap -sU 192.168.56.3 |
</ | </ | ||
conducts a UDP scan. Nmap can also conduct a version scan that allows us to identify what services are running on a specified port. This can be done using the ' | conducts a UDP scan. Nmap can also conduct a version scan that allows us to identify what services are running on a specified port. This can be done using the ' | ||
< | < | ||
- | nmap -sV 192.168.1.1 | + | $nmap -sV -p- 192.168.56.3 |
+ | Starting Nmap 7.80 ( https:// | ||
+ | Stats: 0:01:47 elapsed; 0 hosts completed (1 up), 1 undergoing Service Scan | ||
+ | Service scan Timing: About 96.67% done; ETC: 18:46 (0:00:03 remaining) | ||
+ | Nmap scan report for 192.168.56.3 | ||
+ | Host is up (0.00080s latency). | ||
+ | Not shown: 65505 closed ports | ||
+ | PORT STATE SERVICE | ||
+ | 21/ | ||
+ | 22/ | ||
+ | 23/ | ||
+ | 25/ | ||
+ | 53/ | ||
+ | 80/ | ||
+ | 111/ | ||
+ | 139/ | ||
+ | 445/ | ||
+ | 512/ | ||
+ | 513/ | ||
+ | 514/ | ||
+ | 1099/ | ||
+ | 1524/ | ||
+ | 2049/ | ||
+ | 2121/ | ||
+ | 3306/ | ||
+ | 3632/ | ||
+ | 5432/ | ||
+ | 5900/ | ||
+ | 6000/ | ||
+ | 6667/ | ||
+ | 6697/ | ||
+ | 8009/ | ||
+ | 8180/ | ||
+ | 8787/ | ||
+ | 34173/tcp open mountd | ||
+ | 34643/tcp open nlockmgr | ||
+ | 38930/tcp open java-rmi | ||
+ | 40080/tcp open status | ||
+ | </ | ||
+ | |||
+ | === Scripting Engine and Vulnerability Scanning === | ||
+ | One of the most powerful and important to learn parts of Nmap is its built-in scripting engine sometimes called NSE. NSE allows users to write scripts in Lua to help automate a wide variety of tasks. There are a number of built-in scripts that come with Nmap that allow it to implement some of its more advanced functionality, | ||
+ | < | ||
+ | nmap --script vuln 192.168.56.3 | ||
</ | </ | ||
=== References === | === References === | ||
- | *https:// | + | |
+ | | ||
+ | *The Basics of Hacking and Penetration Test by Patrick Engebreston | ||
+ | *https:// | ||
+ | *Nmap Official Book | ||
+ | *https:// | ||