SlideShare a Scribd company logo
Nmap Commands
www.lucideus.com KAILASH KUMAR
NSIC Campus,Okhla PhaseIII Lucideus Grade2(5-7)
New Delhi-110020
Nmap Commands July 28, 2016
www.lucideus.com Page 1
INTRODUCTION TO NMAP
Nmap (Network Mapper) is a security scanner originally written by Gordon Lyon used to
discover hosts and services on a computer network, thus creating a "map" of the network. To
accomplish its goal, Nmap sends specially crafted packets to the target host and then analyzes the
responses.
The software provides a number of features for probing computer networks, including host
discovery and service and operating system detection. These features are extensible by scripts
that provide more advanced service detection,vulnerability detection, and other features. Nmap is
also capable of adapting to network conditions including latency and congestion during a scan.
Nmap is under development and refinement by its user community.
FEATURES AND USES OF NMAP
Nmap features include:
 Host discovery – Identifying hosts on a network. For example, listing the hosts that
respond to TCP and/or ICMP requests or have a particular port open.
 Port scanning – Enumerating the open ports on target hosts.
 Version detection – Interrogating network services on remote devices to determine
application name and version number.
 OS detection – Determining the operating system and hardware characteristics of
network devices.
 Scriptable interaction with the target – using Nmap Scripting Engine (NSE) and Lua
programming language.
Nmap can provide further information on targets, including reverse DNS names, device
types, and MAC addresses.
Typical uses of Nmap:
 Auditing the security of a device or firewall by identifying the network connections
which can be made to, or through it.
 Identifying open ports on a target host in preparation for auditing.
 Network inventory, network mapping, maintenance and asset management.
 Auditing the security of a network by identifying new servers.
 Generating traffic to hosts on a network, response analysis and response time
measurement.
 Find and exploit vulnerabilities in a network.
Nmap Commands July 28, 2016
www.lucideus.com Page 2
NMAP COMMANDS
1-Scan a Single Host or an IP Address
Scan a Single IP Address :
 $ nmap 192.168.159.128
Scan for Host Name:
 $ nmap server.shellhacks.com
Nmap Commands July 28, 2016
www.lucideus.com Page 3
2-Scan multiple IP Addresses
Scan multiple IP Addresses
 $nmap 192.168.159.1 192.168.159.2 192.168.159.3
 $nmap 192.168.159.1,2,3
Scan for Subnet:
 $ nmap 192.168.159.0/24
 $nmap 192.168.159.*
Scan for Ranges of IP(192.168.159.0-192.168.159.30)
Nmap Commands July 28, 2016
www.lucideus.com Page 4
3- Scan Network for Active computers
Scan Network for Active Host on a Network
 nmap -sn 192.168.159.1/24
4- Scan a List of Host From Input File
Scan hosts/networks from Input File:
create file using command
cat > ipfile.txt
 $ nmap -iL '/root/Desktop/ipfile.txt'
Nmap Commands July 28, 2016
www.lucideus.com Page 5
5.Exclude IP/Hosts/networks from Nmap Scan
Exclide targets from Nmap scan:
 $ nmap 192.168.159.0/24 --exclude 192.168.1.128
Exclude List of hosts from a file:
 $ nmap 192.168.159.0/24 --excludefile '/root/Desktop/ipfile.txt'
Nmap Commands July 28, 2016
www.lucideus.com Page 6
6.Scan for Specific ports
Scan for single Port:
 $ nmap -p 80 192.168.159.128
Scan for all Ports:
 $ nmap -p* 192.168.159.128
Scan for all Ports:
 $ nmap -p* 192.168.159.128
Scan for common ports:
 $ namp --top-ports 5 192.168.159.128
Nmap Commands July 28, 2016
www.lucideus.com Page 7
7.Determine Suppoeted IP Protocols
Determine Which IP protocols are supported by the target host:
 $ nmap -sO 192.168.159.128
8.Scan For TCP/UDP Ports
Scan for all TCP ports:
 $ nmap -sT 192.168.159.128
Scan for all TCP ports:
 $ nmap -sU 192.168.159.128
Nmap Commands July 28, 2016
www.lucideus.com Page 8
9-Perform a Fast Scan
Enable Fast Mode:
 $ nmap -F 192.168.159.128
10- Display the Reason a Port is in a Particular State
 $ nmap --reason 192.168.159.128
Nmap Commands July 28, 2016
www.lucideus.com Page 9
11-Show Only Open Ports
 $ namp --open 192.168.159.128
12-OS Detection
 $ namp -O 192.168.159.128
Nmap Commands July 28, 2016
www.lucideus.com Page 10
13- Service Version Detection
 $ nmap -sV 192.168.159.128
14- Firewall Detection.
 $nmap -sA 192.168.159.128
15- MAC Address Spoofing
 $ nmap --spoof-mac 00:11:22:33:44:55 192.168.159.128
Nmap Commands July 28, 2016
www.lucideus.com Page 11
 $nmap --spoof-mac 0 192.168.159.128
16- scan a firewall For Security vulnerabilities
TCP Null Scan:
 $ nmap -sN 192.168.159.128
TCP Fin Scan:
 $ nmap -sF 192.168.159.128
TCP Xmas Scan:
 $ nmap -sX 192.168.159.128
Nmap Commands July 28, 2016
www.lucideus.com Page 12
17-Stealth Scan
TCP SYN scan
 $ nmap -sS 192.168.159.128
18-Disable Host Discovery(No Ping)
 $ namp -Pn 192.168.159.128
Nmap Commands July 28, 2016
www.lucideus.com Page 13
19-Disable DNS Resolution
 $ namp -n 192.168.159.128
20- Save Output of Nmap scan to a File
save output of Nmap scan to TEXT File
 $ nmap 192.168.159.128 > output.txt
 $ nmap -oN output.txt 192.168.159.128
Nmap Commands July 28, 2016
www.lucideus.com Page 14
save output of Nmap scan to an xml
 $ nmap -oN output.txt 192.168.159.128
References
 http://www.shellhacks.com/en/20-Awesome-Nmap-Command-Examples
 https://nmap.org/

More Related Content

What's hot

Nmap basics
Nmap basicsNmap basics
Packet sniffers
Packet sniffers Packet sniffers
Packet sniffers
Ravi Teja Reddy
 
Nmap
NmapNmap
Wireshark ppt
Wireshark pptWireshark ppt
Wireshark ppt
bala150985
 
Packet sniffing
Packet sniffingPacket sniffing
Packet sniffing
Shyama Bhuvanendran
 
NMap
NMapNMap
Scanning with nmap
Scanning with nmapScanning with nmap
Scanning with nmap
commiebstrd
 
N map presentation
N map presentationN map presentation
N map presentation
ulirraptor
 
Packet sniffers
Packet sniffersPacket sniffers
Packet sniffers
Kunal Thakur
 
Honeypot ppt1
Honeypot ppt1Honeypot ppt1
Honeypot ppt1
samrat saurabh
 
Bettercap
BettercapBettercap
Nmap and metasploitable
Nmap and metasploitableNmap and metasploitable
Nmap and metasploitable
Mohammed Akbar Shariff
 
Firewall and Types of firewall
Firewall and Types of firewallFirewall and Types of firewall
Firewall and Types of firewall
Coder Tech
 
Wireshark Tutorial
Wireshark TutorialWireshark Tutorial
Wireshark Tutorial
Coursenvy.com
 
~Ns2~
~Ns2~~Ns2~
Nmap scripting engine
Nmap scripting engineNmap scripting engine
Nmap scripting engine
n|u - The Open Security Community
 
Packet Sniffer
Packet Sniffer Packet Sniffer
Packet Sniffer
vilss
 
Wireshark Basic Presentation
Wireshark Basic PresentationWireshark Basic Presentation
Wireshark Basic Presentation
MD. SHORIFUL ISLAM
 
Nessus-Vulnerability Tester
Nessus-Vulnerability TesterNessus-Vulnerability Tester
Nessus-Vulnerability Tester
Aditya Jain
 
Network Mapper (NMAP)
Network Mapper (NMAP)Network Mapper (NMAP)
Network Mapper (NMAP)
KHNOG
 

What's hot (20)

Nmap basics
Nmap basicsNmap basics
Nmap basics
 
Packet sniffers
Packet sniffers Packet sniffers
Packet sniffers
 
Nmap
NmapNmap
Nmap
 
Wireshark ppt
Wireshark pptWireshark ppt
Wireshark ppt
 
Packet sniffing
Packet sniffingPacket sniffing
Packet sniffing
 
NMap
NMapNMap
NMap
 
Scanning with nmap
Scanning with nmapScanning with nmap
Scanning with nmap
 
N map presentation
N map presentationN map presentation
N map presentation
 
Packet sniffers
Packet sniffersPacket sniffers
Packet sniffers
 
Honeypot ppt1
Honeypot ppt1Honeypot ppt1
Honeypot ppt1
 
Bettercap
BettercapBettercap
Bettercap
 
Nmap and metasploitable
Nmap and metasploitableNmap and metasploitable
Nmap and metasploitable
 
Firewall and Types of firewall
Firewall and Types of firewallFirewall and Types of firewall
Firewall and Types of firewall
 
Wireshark Tutorial
Wireshark TutorialWireshark Tutorial
Wireshark Tutorial
 
~Ns2~
~Ns2~~Ns2~
~Ns2~
 
Nmap scripting engine
Nmap scripting engineNmap scripting engine
Nmap scripting engine
 
Packet Sniffer
Packet Sniffer Packet Sniffer
Packet Sniffer
 
Wireshark Basic Presentation
Wireshark Basic PresentationWireshark Basic Presentation
Wireshark Basic Presentation
 
Nessus-Vulnerability Tester
Nessus-Vulnerability TesterNessus-Vulnerability Tester
Nessus-Vulnerability Tester
 
Network Mapper (NMAP)
Network Mapper (NMAP)Network Mapper (NMAP)
Network Mapper (NMAP)
 

Viewers also liked

[NCTU] [CCCA] Network Security I
[NCTU] [CCCA] Network Security I[NCTU] [CCCA] Network Security I
[NCTU] [CCCA] Network Security I
Xatierlike Lee
 
Ch 09 -- ARP & IP Analysis
Ch 09 -- ARP & IP AnalysisCh 09 -- ARP & IP Analysis
Ch 09 -- ARP & IP Analysis
Yoram Orzach
 
BSides Algiers - Nmap Scripting Engine - Hani Benhabiles
BSides Algiers - Nmap Scripting Engine - Hani BenhabilesBSides Algiers - Nmap Scripting Engine - Hani Benhabiles
BSides Algiers - Nmap Scripting Engine - Hani Benhabiles
Shellmates
 
Ch 07 -- The Expert System
Ch 07 -- The Expert SystemCh 07 -- The Expert System
Ch 07 -- The Expert System
Yoram Orzach
 
Wireshark course, Ch 05: Advanced statistics tools
Wireshark course, Ch 05: Advanced statistics toolsWireshark course, Ch 05: Advanced statistics tools
Wireshark course, Ch 05: Advanced statistics tools
Yoram Orzach
 
Wireshark course, Ch 03: Capture and display filters
Wireshark course, Ch 03: Capture and display filtersWireshark course, Ch 03: Capture and display filters
Wireshark course, Ch 03: Capture and display filters
Yoram Orzach
 
SSL basics and SSL packet analysis using wireshark
SSL basics and SSL packet analysis using wiresharkSSL basics and SSL packet analysis using wireshark
SSL basics and SSL packet analysis using wireshark
Al Imran, CISA
 
Ch 08 -- Ethernet & LAN Switching Troubleshooting
Ch 08 -- Ethernet & LAN Switching TroubleshootingCh 08 -- Ethernet & LAN Switching Troubleshooting
Ch 08 -- Ethernet & LAN Switching Troubleshooting
Yoram Orzach
 
Reconnaissance - For pentesting and user awareness
Reconnaissance - For pentesting and user awarenessReconnaissance - For pentesting and user awareness
Reconnaissance - For pentesting and user awareness
Leon Teale
 
OSTU - Quickstart Guide for Wireshark (by Tony Fortunato)
OSTU - Quickstart Guide for Wireshark (by Tony Fortunato)OSTU - Quickstart Guide for Wireshark (by Tony Fortunato)
OSTU - Quickstart Guide for Wireshark (by Tony Fortunato)
Denny K
 
Wireshark course, Ch 02: Introduction to wireshark
Wireshark course, Ch 02: Introduction to wiresharkWireshark course, Ch 02: Introduction to wireshark
Wireshark course, Ch 02: Introduction to wireshark
Yoram Orzach
 
Ch 06 -- Bandwidth Delay and Jitter Issues
Ch 06 -- Bandwidth Delay and Jitter IssuesCh 06 -- Bandwidth Delay and Jitter Issues
Ch 06 -- Bandwidth Delay and Jitter Issues
Yoram Orzach
 
Network Forensics: Packet Analysis Using Wireshark
Network Forensics: Packet Analysis Using WiresharkNetwork Forensics: Packet Analysis Using Wireshark
Network Forensics: Packet Analysis Using Wireshark
n|u - The Open Security Community
 
Wireshark
WiresharkWireshark
Wireshark
Deepika Ojha
 
Footprinting tools for security auditors
Footprinting tools for security auditorsFootprinting tools for security auditors
Footprinting tools for security auditors
Jose Manuel Ortega Candel
 
Wireshark
WiresharkWireshark
Wireshark
Kasun Madusanke
 
Packet analysis using wireshark
Packet analysis using wiresharkPacket analysis using wireshark
Packet analysis using wireshark
Basaveswar Kureti
 
Nmap not only a port scanner by ravi rajput comexpo security awareness meet
Nmap not only a port scanner by ravi rajput comexpo security awareness meet Nmap not only a port scanner by ravi rajput comexpo security awareness meet
Nmap not only a port scanner by ravi rajput comexpo security awareness meet
Ravi Rajput
 
Wireshark
WiresharkWireshark
Wireshark
ashiesh0007
 
DC612 Day - Hands on Penetration Testing 101
DC612 Day - Hands on Penetration Testing 101DC612 Day - Hands on Penetration Testing 101
DC612 Day - Hands on Penetration Testing 101
dc612
 

Viewers also liked (20)

[NCTU] [CCCA] Network Security I
[NCTU] [CCCA] Network Security I[NCTU] [CCCA] Network Security I
[NCTU] [CCCA] Network Security I
 
Ch 09 -- ARP & IP Analysis
Ch 09 -- ARP & IP AnalysisCh 09 -- ARP & IP Analysis
Ch 09 -- ARP & IP Analysis
 
BSides Algiers - Nmap Scripting Engine - Hani Benhabiles
BSides Algiers - Nmap Scripting Engine - Hani BenhabilesBSides Algiers - Nmap Scripting Engine - Hani Benhabiles
BSides Algiers - Nmap Scripting Engine - Hani Benhabiles
 
Ch 07 -- The Expert System
Ch 07 -- The Expert SystemCh 07 -- The Expert System
Ch 07 -- The Expert System
 
Wireshark course, Ch 05: Advanced statistics tools
Wireshark course, Ch 05: Advanced statistics toolsWireshark course, Ch 05: Advanced statistics tools
Wireshark course, Ch 05: Advanced statistics tools
 
Wireshark course, Ch 03: Capture and display filters
Wireshark course, Ch 03: Capture and display filtersWireshark course, Ch 03: Capture and display filters
Wireshark course, Ch 03: Capture and display filters
 
SSL basics and SSL packet analysis using wireshark
SSL basics and SSL packet analysis using wiresharkSSL basics and SSL packet analysis using wireshark
SSL basics and SSL packet analysis using wireshark
 
Ch 08 -- Ethernet & LAN Switching Troubleshooting
Ch 08 -- Ethernet & LAN Switching TroubleshootingCh 08 -- Ethernet & LAN Switching Troubleshooting
Ch 08 -- Ethernet & LAN Switching Troubleshooting
 
Reconnaissance - For pentesting and user awareness
Reconnaissance - For pentesting and user awarenessReconnaissance - For pentesting and user awareness
Reconnaissance - For pentesting and user awareness
 
OSTU - Quickstart Guide for Wireshark (by Tony Fortunato)
OSTU - Quickstart Guide for Wireshark (by Tony Fortunato)OSTU - Quickstart Guide for Wireshark (by Tony Fortunato)
OSTU - Quickstart Guide for Wireshark (by Tony Fortunato)
 
Wireshark course, Ch 02: Introduction to wireshark
Wireshark course, Ch 02: Introduction to wiresharkWireshark course, Ch 02: Introduction to wireshark
Wireshark course, Ch 02: Introduction to wireshark
 
Ch 06 -- Bandwidth Delay and Jitter Issues
Ch 06 -- Bandwidth Delay and Jitter IssuesCh 06 -- Bandwidth Delay and Jitter Issues
Ch 06 -- Bandwidth Delay and Jitter Issues
 
Network Forensics: Packet Analysis Using Wireshark
Network Forensics: Packet Analysis Using WiresharkNetwork Forensics: Packet Analysis Using Wireshark
Network Forensics: Packet Analysis Using Wireshark
 
Wireshark
WiresharkWireshark
Wireshark
 
Footprinting tools for security auditors
Footprinting tools for security auditorsFootprinting tools for security auditors
Footprinting tools for security auditors
 
Wireshark
WiresharkWireshark
Wireshark
 
Packet analysis using wireshark
Packet analysis using wiresharkPacket analysis using wireshark
Packet analysis using wireshark
 
Nmap not only a port scanner by ravi rajput comexpo security awareness meet
Nmap not only a port scanner by ravi rajput comexpo security awareness meet Nmap not only a port scanner by ravi rajput comexpo security awareness meet
Nmap not only a port scanner by ravi rajput comexpo security awareness meet
 
Wireshark
WiresharkWireshark
Wireshark
 
DC612 Day - Hands on Penetration Testing 101
DC612 Day - Hands on Penetration Testing 101DC612 Day - Hands on Penetration Testing 101
DC612 Day - Hands on Penetration Testing 101
 

Similar to Nmap commands

Christchurch ISIG 27 oct2015
Christchurch ISIG 27 oct2015Christchurch ISIG 27 oct2015
Christchurch ISIG 27 oct2015
Kevin Alcock
 
Nmap
NmapNmap
Lab-5 Scanning and Enumeration Reconnaissance and inform.docx
Lab-5 Scanning and Enumeration        Reconnaissance and inform.docxLab-5 Scanning and Enumeration        Reconnaissance and inform.docx
Lab-5 Scanning and Enumeration Reconnaissance and inform.docx
LaticiaGrissomzz
 
Nmap
NmapNmap
NMap 101 offline meetup by CyberForge Academy
NMap 101 offline meetup by CyberForge AcademyNMap 101 offline meetup by CyberForge Academy
NMap 101 offline meetup by CyberForge Academy
cyberforgeacademy
 
Contents namp
Contents nampContents namp
Contents namp
shwetha mk
 
Contents namp
Contents nampContents namp
Contents namp
shwetha mk
 
Nmap basics-1198948509608024-3
Nmap basics-1198948509608024-3Nmap basics-1198948509608024-3
Nmap basics-1198948509608024-3
Harsh Desai
 
Zen map
Zen mapZen map
Zen map
harisnaved
 
Null Delhi chapter - Feb 2019
Null Delhi chapter - Feb 2019Null Delhi chapter - Feb 2019
Null Delhi chapter - Feb 2019
Nikhil Raj
 
Practical White Hat Hacker Training - Active Information Gathering
Practical White Hat Hacker Training - Active Information GatheringPractical White Hat Hacker Training - Active Information Gathering
Practical White Hat Hacker Training - Active Information Gathering
PRISMA CSI
 
Namp
Namp Namp
01204427-scanner.ppt
01204427-scanner.ppt01204427-scanner.ppt
01204427-scanner.ppt
VarunBehere1
 
Nmap Discovery
Nmap DiscoveryNmap Discovery
Nmap Discovery
Tai Pan
 
Backtrack Manual Part3
Backtrack Manual Part3Backtrack Manual Part3
Backtrack Manual Part3
Nutan Kumar Panda
 
A REVIEW ON NMAP AND ITS FEATURES
A REVIEW ON NMAP AND ITS FEATURESA REVIEW ON NMAP AND ITS FEATURES
A REVIEW ON NMAP AND ITS FEATURES
IRJET Journal
 
NMAP1.ppt
NMAP1.pptNMAP1.ppt
NMAP1.ppt
DakshKhurana15
 
Nmap
NmapNmap
wireshark.pdf
wireshark.pdfwireshark.pdf
wireshark.pdf
ssuserafc27c
 
Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...
Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...
Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...
idsecconf
 

Similar to Nmap commands (20)

Christchurch ISIG 27 oct2015
Christchurch ISIG 27 oct2015Christchurch ISIG 27 oct2015
Christchurch ISIG 27 oct2015
 
Nmap
NmapNmap
Nmap
 
Lab-5 Scanning and Enumeration Reconnaissance and inform.docx
Lab-5 Scanning and Enumeration        Reconnaissance and inform.docxLab-5 Scanning and Enumeration        Reconnaissance and inform.docx
Lab-5 Scanning and Enumeration Reconnaissance and inform.docx
 
Nmap
NmapNmap
Nmap
 
NMap 101 offline meetup by CyberForge Academy
NMap 101 offline meetup by CyberForge AcademyNMap 101 offline meetup by CyberForge Academy
NMap 101 offline meetup by CyberForge Academy
 
Contents namp
Contents nampContents namp
Contents namp
 
Contents namp
Contents nampContents namp
Contents namp
 
Nmap basics-1198948509608024-3
Nmap basics-1198948509608024-3Nmap basics-1198948509608024-3
Nmap basics-1198948509608024-3
 
Zen map
Zen mapZen map
Zen map
 
Null Delhi chapter - Feb 2019
Null Delhi chapter - Feb 2019Null Delhi chapter - Feb 2019
Null Delhi chapter - Feb 2019
 
Practical White Hat Hacker Training - Active Information Gathering
Practical White Hat Hacker Training - Active Information GatheringPractical White Hat Hacker Training - Active Information Gathering
Practical White Hat Hacker Training - Active Information Gathering
 
Namp
Namp Namp
Namp
 
01204427-scanner.ppt
01204427-scanner.ppt01204427-scanner.ppt
01204427-scanner.ppt
 
Nmap Discovery
Nmap DiscoveryNmap Discovery
Nmap Discovery
 
Backtrack Manual Part3
Backtrack Manual Part3Backtrack Manual Part3
Backtrack Manual Part3
 
A REVIEW ON NMAP AND ITS FEATURES
A REVIEW ON NMAP AND ITS FEATURESA REVIEW ON NMAP AND ITS FEATURES
A REVIEW ON NMAP AND ITS FEATURES
 
NMAP1.ppt
NMAP1.pptNMAP1.ppt
NMAP1.ppt
 
Nmap
NmapNmap
Nmap
 
wireshark.pdf
wireshark.pdfwireshark.pdf
wireshark.pdf
 
Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...
Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...
Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...
 

Recently uploaded

Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Ashish Kohli
 
What is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptxWhat is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptx
christianmathematics
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
ArianaBusciglio
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 

Recently uploaded (20)

Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
 
What is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptxWhat is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptx
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 

Nmap commands

  • 1. Nmap Commands www.lucideus.com KAILASH KUMAR NSIC Campus,Okhla PhaseIII Lucideus Grade2(5-7) New Delhi-110020
  • 2. Nmap Commands July 28, 2016 www.lucideus.com Page 1 INTRODUCTION TO NMAP Nmap (Network Mapper) is a security scanner originally written by Gordon Lyon used to discover hosts and services on a computer network, thus creating a "map" of the network. To accomplish its goal, Nmap sends specially crafted packets to the target host and then analyzes the responses. The software provides a number of features for probing computer networks, including host discovery and service and operating system detection. These features are extensible by scripts that provide more advanced service detection,vulnerability detection, and other features. Nmap is also capable of adapting to network conditions including latency and congestion during a scan. Nmap is under development and refinement by its user community. FEATURES AND USES OF NMAP Nmap features include:  Host discovery – Identifying hosts on a network. For example, listing the hosts that respond to TCP and/or ICMP requests or have a particular port open.  Port scanning – Enumerating the open ports on target hosts.  Version detection – Interrogating network services on remote devices to determine application name and version number.  OS detection – Determining the operating system and hardware characteristics of network devices.  Scriptable interaction with the target – using Nmap Scripting Engine (NSE) and Lua programming language. Nmap can provide further information on targets, including reverse DNS names, device types, and MAC addresses. Typical uses of Nmap:  Auditing the security of a device or firewall by identifying the network connections which can be made to, or through it.  Identifying open ports on a target host in preparation for auditing.  Network inventory, network mapping, maintenance and asset management.  Auditing the security of a network by identifying new servers.  Generating traffic to hosts on a network, response analysis and response time measurement.  Find and exploit vulnerabilities in a network.
  • 3. Nmap Commands July 28, 2016 www.lucideus.com Page 2 NMAP COMMANDS 1-Scan a Single Host or an IP Address Scan a Single IP Address :  $ nmap 192.168.159.128 Scan for Host Name:  $ nmap server.shellhacks.com
  • 4. Nmap Commands July 28, 2016 www.lucideus.com Page 3 2-Scan multiple IP Addresses Scan multiple IP Addresses  $nmap 192.168.159.1 192.168.159.2 192.168.159.3  $nmap 192.168.159.1,2,3 Scan for Subnet:  $ nmap 192.168.159.0/24  $nmap 192.168.159.* Scan for Ranges of IP(192.168.159.0-192.168.159.30)
  • 5. Nmap Commands July 28, 2016 www.lucideus.com Page 4 3- Scan Network for Active computers Scan Network for Active Host on a Network  nmap -sn 192.168.159.1/24 4- Scan a List of Host From Input File Scan hosts/networks from Input File: create file using command cat > ipfile.txt  $ nmap -iL '/root/Desktop/ipfile.txt'
  • 6. Nmap Commands July 28, 2016 www.lucideus.com Page 5 5.Exclude IP/Hosts/networks from Nmap Scan Exclide targets from Nmap scan:  $ nmap 192.168.159.0/24 --exclude 192.168.1.128 Exclude List of hosts from a file:  $ nmap 192.168.159.0/24 --excludefile '/root/Desktop/ipfile.txt'
  • 7. Nmap Commands July 28, 2016 www.lucideus.com Page 6 6.Scan for Specific ports Scan for single Port:  $ nmap -p 80 192.168.159.128 Scan for all Ports:  $ nmap -p* 192.168.159.128 Scan for all Ports:  $ nmap -p* 192.168.159.128 Scan for common ports:  $ namp --top-ports 5 192.168.159.128
  • 8. Nmap Commands July 28, 2016 www.lucideus.com Page 7 7.Determine Suppoeted IP Protocols Determine Which IP protocols are supported by the target host:  $ nmap -sO 192.168.159.128 8.Scan For TCP/UDP Ports Scan for all TCP ports:  $ nmap -sT 192.168.159.128 Scan for all TCP ports:  $ nmap -sU 192.168.159.128
  • 9. Nmap Commands July 28, 2016 www.lucideus.com Page 8 9-Perform a Fast Scan Enable Fast Mode:  $ nmap -F 192.168.159.128 10- Display the Reason a Port is in a Particular State  $ nmap --reason 192.168.159.128
  • 10. Nmap Commands July 28, 2016 www.lucideus.com Page 9 11-Show Only Open Ports  $ namp --open 192.168.159.128 12-OS Detection  $ namp -O 192.168.159.128
  • 11. Nmap Commands July 28, 2016 www.lucideus.com Page 10 13- Service Version Detection  $ nmap -sV 192.168.159.128 14- Firewall Detection.  $nmap -sA 192.168.159.128 15- MAC Address Spoofing  $ nmap --spoof-mac 00:11:22:33:44:55 192.168.159.128
  • 12. Nmap Commands July 28, 2016 www.lucideus.com Page 11  $nmap --spoof-mac 0 192.168.159.128 16- scan a firewall For Security vulnerabilities TCP Null Scan:  $ nmap -sN 192.168.159.128 TCP Fin Scan:  $ nmap -sF 192.168.159.128 TCP Xmas Scan:  $ nmap -sX 192.168.159.128
  • 13. Nmap Commands July 28, 2016 www.lucideus.com Page 12 17-Stealth Scan TCP SYN scan  $ nmap -sS 192.168.159.128 18-Disable Host Discovery(No Ping)  $ namp -Pn 192.168.159.128
  • 14. Nmap Commands July 28, 2016 www.lucideus.com Page 13 19-Disable DNS Resolution  $ namp -n 192.168.159.128 20- Save Output of Nmap scan to a File save output of Nmap scan to TEXT File  $ nmap 192.168.159.128 > output.txt  $ nmap -oN output.txt 192.168.159.128
  • 15. Nmap Commands July 28, 2016 www.lucideus.com Page 14 save output of Nmap scan to an xml  $ nmap -oN output.txt 192.168.159.128 References  http://www.shellhacks.com/en/20-Awesome-Nmap-Command-Examples  https://nmap.org/