What are the commonly used commands of the network security tool Nmap?

Nmap:

Nmap is a network connection end scanning software, used to scan the open network connection end of the computer on the Internet. Determine which services are running on which connections, and infer which operating system the computer is running. It is one of the necessary software for network administrators and is used to evaluate network system security.

Like most tools used for network security, nmap is also a favorite tool for many hackers and hackers (also known as script kiddies). System administrators can use nmap to detect unapproved servers in the work environment, but *** will use nmap to collect the network settings of the target computer, so as to plan *** methods. Although non-technical executives occasionally complain about port scanning companies, nmap itself is completely legal, like knocking on the door of everyone nearby to see if anyone is home.

Features of Nmap:

1. Detect whether a group of hosts are online

2. Scan the host port and sniff the network service provided

3. Infer the operating system used by its host

4. Simple vulnerability scanning and firewall evasion

Common Nmap commands:

The most commonly used commands:

1.探测主机:-sn 192.168.0.1-100#表示使用SYN半开放扫描192.168.0.1-192.168.0.100之间哪些主机在线。

2.探测端口:-sS#表示使用SYN半开放方式,扫描TCP端口-sU#表示扫描开放了UDP端口的设备

3.版本侦测:-sV#指定让Nmap进行探测主机服务号版本

4.OS侦测:-O#探测目标主机操作系统类型

Port status prompt:

open:端口是开放的。

closed:端口是关闭的。

filtered:端口被防火墙IDS/IPS屏蔽,无法确定其状态。

unfiltered:端口没有被屏蔽,但是否开放需要进一步确定。

open|filtered:端口是开放的或被屏蔽。

closed|filtered:端口是关闭的或被屏蔽。

Other common Nmap scans:

-sP主机IP地址#通过ping的方式探测主机存活数

-PD主机IP地址#跳过ping的方式探测,加快扫描速度

-sL主机IP地址#仅列出指定网段上的每台主机,不发送任何报文给到目标主机

-PS22,80,443主机IP地址#用SYN方式,探测目标主机开放的端口,可以用“,”分隔端口列表

-PU主机IP地址#用UDP方式,探测目标主机开放的端口,可以用“,”分隔端口列表

-sT主机IP地址#扫描开放了TCP端口的设备

-sO主机IP地址#探测目标主机支持哪些IP协议

-iL文件名#从一个文件导入IP地址,并进行扫描。#cat文件名(查看文件包含哪些IP)

localhost主机IP地址#查看主机当前开放的端口

-p 1024-65535 localhost主机IP地址#查看主机端口(1024-65535)中开放的端口

-PS主机IP地址#探测目标主机开放的端口

-PS22,80,3306主机IP地址#探测所列出的目标主机端口

-A主机IP地址#探测目标主机操作系统类型

Namp command line complete:

Namp host discovery:

-sP#Ping扫描

-P0#无Ping扫描

-PS#TCP SYN Ping扫描

-PA#TCP ACK Ping扫描

-PU#UDPPing扫描

-PE;-PP;-PM#ICMP Ping Types扫描

-PR#ARP Ping扫描

-n#禁止DNS反向解析

-R#反向解析域名

--system-dns#使用系统域名解析器

-sL#扫描列表

-6#扫描IPv6地址

--traceroute#路由跟踪

-PY#SCTP INIT Ping扫描

Namp port discovery:

-T#时序选项

-p#端口扫描顺序

-sS#TCP SYN扫描

-ST#TCP连接扫描

-sU#UDP扫描

-SN;-SF;-sX#隐蔽扫描

-SA#TCPACK扫描

-sW#TCP窗口扫描

-sM#TCPMaimon扫描

--scanflags#自定义TCP扫描

-sI#空闲扫描

-sO#IP协议扫描

-b#FTPBounce扫描

Namp operating system detection:

-sV#版本探测

--allports#全端口版本探测

--version-intensity#设置扫描强度

--version-light#轻量级扫描

--version-all#重量级扫描

--version-trace#获取详细版本信息

-sR#RPC扫描

-O#启用操作系统探测

--osscan-limit#对指定的目标进行操作系统检测

--oscan-guess;--fuzzy#推测系统识别

Namp information collection:

--script ip-geolocation-*#IP信息搜集

whois#WHOIS查询

http-email-harvest#搜集E-mail信息

hostmap-ip2hosts#IP反查

dns-brute#DNS信息搜集

membase-http-info#检索系统信息

smb-security-mode.nse#后台打印机服务漏洞

smb-check-vulns.nse#系统漏洞扫描

http-stored-xss.nse#扫描Web漏洞

snmp-win32-services#通过Snmp列举indows服务账户

dns-brute#枚举DNS服务器的主机名

http-headers/http-sitemap-generator#HTTP信息搜集

ssl-enum-ciphers#枚举SSL密钥

ssh-hostkey#SSH服务密钥信息探测

Namp firewall bypass:

-f#报文分段

--mtu#指定偏移大小

-D#IP欺骗

-sl#源地址欺骗

--source-port#源端口欺骗

--data-length#指定发包长度

--randomize-hosts#目标主机随机排序

--spoof-mac#MAC地址欺骗

Namp is waiting for an opportunity:

--min-hostgroup#调整并行扫描组的大小

--min-parallelism#调整探测报文的并行度

--max-parallelism

--min-rtt-timeout#调整探测报文超时

--max-rt-timeout

--initial-rtt-timeout

--host-timeout#放弃低速目标主机

--scan-delay#调整探测报文的时间间隔

--max-scan-delay

Namp save:

-oN#标准保存

-oX#XML保存

-oS#133t保存

-oG#Grep保存

-oA#保存到所有格式

--append-output#补充保存文件

-oX#转换XML保存

-oX#忽略XML声明的XSL样式表

Namp tips:

--send-eth#发送以太网数据包

--send-ip#网络层发送

--privileged#假定拥有所有权

--interactive#在交互模式中启动

-V#查看Nmap版本号

-d#设置调试级别

--packet-trace#跟踪发送接受的报文

--iflist#列举接口和路由

-e#指定网络接口

-oG#继续中断扫描

firewalk#探测防火墙

vmauthd-brute#VWare认证破解

Guess you like

Origin blog.51cto.com/7681914/2573139