网络安全-端口扫描神器Nmap使用详解与参数指导

闲聊 闲聊 1370 人阅读 | 0 人回复

<
目次




简介

Nmap是一个免费的开源用于收集发明战宁静审计的适用程序。很多体系战收集办理员借发明它关于收集库存、办理效劳晋级谋划和监控主机或效劳一般运转工夫等使命很有效。Nmap 以别致的方法利用本初 IP 数据包去肯定收集上可用的主机、那些主机供给的效劳(使用程序称号战版本)、它们运转的​​操纵体系(战操纵体系版本)、数据包过滤器/防水墙的范例正正在利用中,和其他数十种特征。它旨正在快速扫描年夜型收集,但对单个主机也能一般事情。Nmap 运转正在局部次要的计较机操纵体系上,民圆两进造包合用于 Linux、Windows 战 Mac OS X。 除典范的命令止 Nmap 可施行文件,Zenmap),一个灵敏的数据传输、重定背战调试东西(Ncat),一个用于比较扫描结果的适用程序(Ndiff),和一个数据包天生战响应阐发东西(Nping)。
灵敏:撑持数十种初级手艺,用于画造布满 IP 过滤器、防水墙、路由器战其他停滞的收集。那包罗很多端心扫描机造(TCP 战 UDP)、操纵体系检测、版本检测、ping 扫描等。
功用强大:Nmap 已被用于扫描由数十万台机械构成的宏大收集。
便携:撑持年夜大都操纵体系,包罗 Linux、 Microsoft Windows、 FreeBSD、 OpenBSD、 Solaris、 IRIX、 Mac OS X、 HP-UX、 NetBSD、 Sun OS、 Amiga等。
简朴:当然 Nmap 为初级用户供给了丰硕的初级功用,但您能够像“nmap -v -A targethost ”一样简朴天开端 。供给传统命令止战图形 (GUI) 版本以满意您的爱好。那些没有念从源代码编译 Nmap 的人可使用两进造文件。
免费:Nmap 项目的次要目的是协助使 Internet 愈加宁静,并为办理员/审计员/乌客供给用于探究其收集的初级东西。Nmap 可免费下载,借附带完整的源代码,您能够按照答应条目修正战从头分收。
有据可查:我们正在片面战最新的脚册页、利剑皮书、教程以至整本书中投进了大批精神!正在那里能够找到多种言语版本。
命令参数

<blockquote>  
Nmap 7.80 ( https://nmap.org )
Usage: nmap [Scan Type(s)] [Options] {target specification}
TARGET SPECIFICATION:
Can pass hostnames, IP addresses, networks, etc.
Ex: scanme.nmap.org, microsoft.com/24, 192.168.0.1; 10.0.0-255.1-254
-iL : Input from list of hosts/networks
-iR : Choose random targets
–exclude : Exclude hosts/networks
–excludefile : Exclude list from file
HOST DISCOVERY:
-sL: List Scan - simply list targets to scan
-sn: Ping Scan - disable port scan
-Pn: Treat all hosts as online – skip host discovery
-PS/PA/PU/PY[portlist]: TCP SYN/ACK, UDP or SCTP discovery to given ports
-PE/PP/PM: ICMP echo, timestamp, and netmask request discovery probes
-PO[protocol list]: IP Protocol Ping
-n/-R: Never do DNS resolution/Always resolve [default: sometimes]
–dns-servers : Specify custom DNS servers
–system-dns: Use OS’s DNS resolver
–traceroute: Trace hop path to each host
SCAN TECHNIQUES:
-sS/sT/sA/sW/sM: TCP SYN/Connect()/ACK/Window/Maimon scans
-sU: UDP Scan
-sN/sF/sX: TCP Null, FIN, and Xmas scans
–scanflags : Customize TCP scan flags
-sI : Idle scan
-sY/sZ: SCTP INIT/COOKIE-ECHO scans
-sO: IP protocol scan
-b : FTP bounce scan
PORT SPECIFICATION AND SCAN ORDER:
-p : Only scan specified ports
Ex: -p22; -p1-65535; -p U:53,111,137,T:21-25,80,139,8080,S:9
–exclude-ports : Exclude the specified ports from scanning
-F: Fast mode - Scan fewer ports than the default scan
-r: Scan ports consecutively - don’t randomize
–top-ports : Scan  most common ports
–port-ratio : Scan ports more common than
SERVICE/VERSION DETECTION:
-sV: Probe open ports to determine service/version info
–version-intensity : Set from 0 (light) to 9 (try all probes)
–version-light: Limit to most likely probes (intensity 2)
–version-all: Try every single probe (intensity 9)
–version-trace: Show detailed version scan activity (for debugging)
SCRIPT SCAN:
-sC: equivalent to --script=default
–script=:  is a comma separated list of
directories, script-files or script-categories

–script-args=: provide arguments to scripts
–script-args-file=filename: provide NSE script args in a file
–script-trace: Show all data sent and received
–script-updatedb: Update the script database.
–script-help=: Show help about scripts.
OS DETECTION:
-O: Enable OS detection
–osscan-limit: Limit OS detection to promising targets
–osscan-guess: Guess OS more aggressively
TIMING AND PERFORMANCE:
Options which take  are in seconds, or append ‘ms’ (milliseconds),
‘s’ (seconds), ‘m’ (minutes), or ‘h’ (hours) to the value (e.g. 30m).
-T: Set timing template (higher is faster)
–min-hostgroup/max-hostgroup : Parallel host scan group sizes
–min-parallelism/max-parallelism : Probe parallelization
–min-rtt-timeout/max-rtt-timeout/initial-rtt-timeout : Specifies
probe round trip time.
–max-retries : Caps number of port scan probe retransmissions.
–host-timeout : Give up on target after this long
–scan-delay/–max-scan-delay : Adjust delay between probes
–min-rate : Send packets no slower than  per second
–max-rate : Send packets no faster than  per second
FIREWALL/IDS EVASION AND SPOOFING:
-f; --mtu : fragment packets (optionally w/given MTU)
-D : Cloak a scan with decoys
-S : Spoof source address
-e : Use specified interface
-g/–source-port : Use given port number
–proxies : Relay connections through HTTP/SOCKS4 proxies
–data : Append a custom payload to sent packets
–data-string : Append a custom ASCII string to sent packets
–data-length : Append random data to sent packets
–ip-options : Send packets with specified ip options
–ttl : Set IP time-to-live field
–spoof-mac : Spoof your MAC address
–badsum: Send packets with a bogus TCP/UDP/SCTP checksum
OUTPUT:
<strong>-oN/-oX/-oS/-oG : Output scan in normal, XML, s|
1、本网站属于个人的非赢利性网站,转载的文章遵循原作者的版权声明,如果原文没有版权声明,按照目前互联网开放的原则,我们将在不通知作者的情况下,转载文章;如果原文明确注明“禁止转载”,我们一定不会转载。如果我们转载的文章不符合作者的版权声明或者作者不想让我们转载您的文章的话,请您发送邮箱:Cdnjson@163.com提供相关证明,我们将积极配合您!
2、本网站转载文章仅为传播更多信息之目的,凡在本网站出现的信息,均仅供参考。本网站将尽力确保所提供信息的准确性及可靠性,但不保证信息的正确性和完整性,且不对因信息的不正确或遗漏导致的任何损失或损害承担责任。
3、任何透过本网站网页而链接及得到的资讯、产品及服务,本网站概不负责,亦不负任何法律责任。
4、本网站所刊发、转载的文章,其版权均归原作者所有,如其他媒体、网站或个人从本网下载使用,请在转载有关文章时务必尊重该文章的著作权,保留本网注明的“稿件来源”,并自负版权等法律责任。
回复 关闭延时

使用道具 举报

 
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则