NMAP - Commands | Shahul Hameed
Scanning Methodology — A Roadmap
This guide gives you a quick end-to-end roadmap of pen-test activity using nmap.
To Whom It Concern: This article is for beginners in the cybersecurity domain who wants to get a quick practical guide on Pen Testing systems via the nmap.
First thing first, you will need a Network exploration tool and security/port scanner. We will be using the nmap tool. If you don’t have Nmap installed, you can get it from here. It’s free…!
We can use both Graphical version or via terminal.
Methodology
- Look for Live Systems
- Check for Open Ports
- Banner Grabbing
- Vulnerability Scan
- Penetration Test Report
1. Check for Live Systems
We have to search for any alive systems present in our scope environment. We will perform a sweep over a network.
nmap -sP 192.168.205.1/24
Now, we have a total of 6 hosts that are Up out of 256 IP address sweep.
2. Check for Open Ports
The next task to be done would be to do a port scanning to obtain information about open ports running on the system. Choose a specific host. We will get to know the port details and services running over them.
nmap 192.168.254.249
Total of 6 open ports are found, and we can see service running on them also.
3. Perform Banner Grabbing
Banner Grabbing is one of the several techniques used to discover the type and/or version of the software in use.
Version Detection
To enable version detection the “-sV” switch is used.
nmap -sV 192.168.254.249
It’s getting interested now, we got to know the Application names and their version also.
Operating System Detection:
To enable operating system detection the “-O” switch is used.
nmap -O 192.168.205.249
The operating system on this host is found to as Windows 10.
Alternatively, you can use the -A argument to perform an aggressive scan. It enables OS detection, version detection, and other services.
nmap -A 192.168.205.249
4. Vulnerability Scan
The next step is to determine the vulnerability that exists in host.
nmap --script vuln 192.168.205.249
Nmap Scripting Engine (NSE) Script is one of the most popular and powerful capabilities of Nmap. These Nmap vulnerability scan scripts are used by penetration testers and hackers to examine common known vulnerabilities.
NSE scripts are classified according to a set of predetermined categories to which each script belongs. Authentication, broadcast, brute force, intrusive, malware, safe, version, and vuln are some of the categories. You can find all the category types of NSE scripts and their phases here.
It makes your life easier since you can find an existing vulnerability from the Common Vulnerabilities and Exploits (CVE) database for a particular version of the service.
So we can see several vulnerability codes: CVE-2012–1182, CVE-2007–6750.
The running application/services are prone to those vulnerabilities. Further details can be found over vulnerability databases.
Vulnerability Databases:
https://cve.mitre.org/cve/search_cve_list.html
https://www.cvedetails.com/
https://nvd.nist.gov/vuln/search
https://vuldb.com/?search
5. Penetration Testing Report
It’s time to write down the findings. Few headings to be addressed in a Pen test reports are as follows;
- Summary:
Summaries the report content in small paragraph; statement of tasks accomplished, methodology used, high level findings and recommendation. - Scope of Work:
Includes IP addresses tested, type of pen test performed. Duration in which activity was carried. - Project Objective:
What organization can achieve after knowing the risk and mitigating it. - Details of Finding:
Count of discovered risks, based on priorities. For each finding, describe the threat level, vulnerability rating, impact. - Recommendations:
Present the solutions, mitigations, or other suggestions for reducing/eliminating the vulnerability.
You can find out several sample penetration testing reports online. Details for pen-test report content can be found on SANS “https://www.sans.org/white-papers/33343/”.
Comments
Post a Comment