nmap:网络探测工具和安全/端口扫描器

一、语法

onlylove@ubuntu:~$ nmap -help
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 <inputfilename>: Input from list of hosts/networks
  -iR <num hosts>: Choose random targets
  --exclude <host1[,host2][,host3],...>: Exclude hosts/networks
  --excludefile <exclude_file>: 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 <serv1[,serv2],...>: 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 <flags>: Customize TCP scan flags
  -sI <zombie host[:probeport]>: Idle scan
  -sY/sZ: SCTP INIT/COOKIE-ECHO scans
  -sO: IP protocol scan
  -b <FTP relay host>: FTP bounce scan
PORT SPECIFICATION AND SCAN ORDER:
  -p <port ranges>: Only scan specified ports
    Ex: -p22; -p1-65535; -p U:53,111,137,T:21-25,80,139,8080,S:9
  --exclude-ports <port ranges>: 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 <number>: Scan <number> most common ports
  --port-ratio <ratio>: Scan ports more common than <ratio>
SERVICE/VERSION DETECTION:
  -sV: Probe open ports to determine service/version info
  --version-intensity <level>: 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=<Lua scripts>: <Lua scripts> is a comma separated list of
           directories, script-files or script-categories
  --script-args=<n1=v1,[n2=v2,...]>: 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=<Lua scripts>: Show help about scripts.
           <Lua scripts> is a comma-separated list of script-files or
           script-categories.
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 <time> are in seconds, or append 'ms' (milliseconds),
  's' (seconds), 'm' (minutes), or 'h' (hours) to the value (e.g. 30m).
  -T<0-5>: Set timing template (higher is faster)
  --min-hostgroup/max-hostgroup <size>: Parallel host scan group sizes
  --min-parallelism/max-parallelism <numprobes>: Probe parallelization
  --min-rtt-timeout/max-rtt-timeout/initial-rtt-timeout <time>: Specifies
      probe round trip time.
  --max-retries <tries>: Caps number of port scan probe retransmissions.
  --host-timeout <time>: Give up on target after this long
  --scan-delay/--max-scan-delay <time>: Adjust delay between probes
  --min-rate <number>: Send packets no slower than <number> per second
  --max-rate <number>: Send packets no faster than <number> per second
FIREWALL/IDS EVASION AND SPOOFING:
  -f; --mtu <val>: fragment packets (optionally w/given MTU)
  -D <decoy1,decoy2[,ME],...>: Cloak a scan with decoys
  -S <IP_Address>: Spoof source address
  -e <iface>: Use specified interface
  -g/--source-port <portnum>: Use given port number
  --proxies <url1,[url2],...>: Relay connections through HTTP/SOCKS4 proxies
  --data <hex string>: Append a custom payload to sent packets
  --data-string <string>: Append a custom ASCII string to sent packets
  --data-length <num>: Append random data to sent packets
  --ip-options <options>: Send packets with specified ip options
  --ttl <val>: Set IP time-to-live field
  --spoof-mac <mac address/prefix/vendor name>: Spoof your MAC address
  --badsum: Send packets with a bogus TCP/UDP/SCTP checksum
OUTPUT:
  -oN/-oX/-oS/-oG <file>: Output scan in normal, XML, s|<rIpt kIddi3,
     and Grepable format, respectively, to the given filename.
  -oA <basename>: Output in the three major formats at once
  -v: Increase verbosity level (use -vv or more for greater effect)
  -d: Increase debugging level (use -dd or more for greater effect)
  --reason: Display the reason a port is in a particular state
  --open: Only show open (or possibly open) ports
  --packet-trace: Show all packets sent and received
  --iflist: Print host interfaces and routes (for debugging)
  --append-output: Append to rather than clobber specified output files
  --resume <filename>: Resume an aborted scan
  --stylesheet <path/URL>: XSL stylesheet to transform XML output to HTML
  --webxml: Reference stylesheet from Nmap.Org for more portable XML
  --no-stylesheet: Prevent associating of XSL stylesheet w/XML output
MISC:
  -6: Enable IPv6 scanning
  -A: Enable OS detection, version detection, script scanning, and traceroute
  --datadir <dirname>: Specify custom Nmap data file location
  --send-eth/--send-ip: Send using raw ethernet frames or IP packets
  --privileged: Assume that the user is fully privileged
  --unprivileged: Assume the user lacks raw socket privileges
  -V: Print version number
  -h: Print this help summary page.
EXAMPLES:
  nmap -v -A scanme.nmap.org
  nmap -v -sn 192.168.0.0/16 10.0.0.0/8
  nmap -v -iR 10000 -Pn -p 80
SEE THE MAN PAGE (https://nmap.org/book/man.html) FOR MORE OPTIONS AND EXAMPLES
onlylove@ubuntu:~$ 

二、参数说明

1、用法

nmap [Scan Type(s)] [Options] {target specification}

2、TARGET SPECIFICATION

可以传递主机名,IP地址,网络等。

参数说明
Ex
-iL < inputfilename >来自主机/网络列表的输入
-iR < num hosts >选择随机目标
–exclude <host1[,host2] [,host3],…>排除主机/网络
–excludefile < exclude_file >从文件中排除列表

3、HOST DISCOVERY

参数说明
-sL只需列出要扫描的目标
-sn禁用端口扫描
-Pn将所有主机视为在线 – 跳过主机发现
-PS/PA/PU/PY[portlist]TCP SYN/ACK、UDP 或 SCTP 发现到给定端口
-PE/PP/PMICMP 回显、时间戳和网络掩码请求发现探测器
-PO[protocol list]IP 协议 Ping
-n/-R从不执行 DNS 解析/始终解析 [默认:有时]
–dns-servers <serv1[,serv2],…>指定自定义 DNS 服务器
–system-dns使用操作系统的 DNS 解析程序
–traceroute跟踪到每个主机的跃点路径

4、SCAN TECHNIQUES

参数说明
-sS/sT/sA/sW/sMTCP SYN/Connect()/ACK/Window/Maimon 扫描
-sUUDP 扫描
-sN/sF/sXTCP Null, FIN, and Xmas 扫描
–scanflags < flags >自定义 TCP 扫描标志
-sI <zombie host[:probeport]>Idle 扫描
-sY/sZSCTP INIT/COOKIE-ECHO 扫描
-sOIP 协议扫描
-b < FTP relay host >FTP反弹扫描

5、PORT SPECIFICATION AND SCAN ORDER

参数说明
-p < port ranges >仅扫描指定的端口
–exclude-ports < port ranges >从扫描中排除指定的端口
-F快速模式 - 扫描的端口数少于默认扫描
-r连续扫描端口 - 不要随机化
–top-ports < number >扫描< number >最常见的端口
–port-ratio < ratio >扫描端口比< ratio >

6、SERVICE/VERSION DETECTION

参数说明
-sV探测打开的端口以确定服务/版本信息
–version-intensity < level >从 0(浅色)设置为 9(尝试所有探头)
–version-light限制到最可能的探头(强度 2)
–version-all尝试每一个探针(强度9)
–version-trace显示详细的版本扫描活动(用于调试)

7、SCRIPT SCAN

参数说明
-sC等效于 --script=default
–script=< Lua scripts >< Lua scripts >是以逗号分隔的目录、脚本文件或脚本类别列表
–script-args=<n1=v1,[n2=v2,…]>为脚本提供参数
–script-args-file=filename在文件中提供 NSE 脚本参数
–script-trace显示发送和接收的所有数据
–script-updatedb更新脚本数据库。
–script-help=< Lua scripts >显示有关脚本的帮助。

8、OS DETECTION

参数说明
-O启用操作系统检测
–osscan-limit将操作系统检测限制为有前途的目标
–osscan-guess更积极地猜测操作系统

9、TIMING AND PERFORMANCE

取的选项< time >以秒为单位,或将"ms"(毫秒)、“s”(秒)、“m”(分钟)或"h"(小时)附加到值(例如 30m) 中。

参数说明
-T< 0-5 >设置计时模板(越高越快)
–min-hostgroup/max-hostgroup < size >并行主机扫描组大小
–min-parallelism/max-parallelism < numprobes >探头并行化
–min-rtt-timeout/max-rtt-timeout/initial-rtt-timeout < time >指定探测器往返时间。
–max-retries < tries >端口扫描探测重新传输的上限数量。
–host-timeout < time >在这么长时间之后放弃目标
–scan-delay/–max-scan-delay < time >调整探头之间的延迟
–min-rate < number >发送速度不低于< number >每秒的数据包
–max-rate < number >发送数据包的速度不超过< number >每秒

10、FIREWALL/IDS EVASION AND SPOOFING

参数说明
-f; --mtu < val >分片数据包(可选的MTU)
-D <decoy1,decoy2[,ME],…>用诱饵掩盖扫描件
-S < IP_Address >欺骗源地址
-e < iface >使用指定的接口
-g/–source-port < portnum >使用给定的端口号
–proxies <url1,[url2],…>通过 HTTP/SOCKS4 代理进行中继连接
–data < hex string >将自定义负载附加到发送的数据包
–data-string < string >将自定义 ASCII 字符串追加到发送的数据包
–data-length < num >将随机数据附加到发送的数据包
–ip-options < options >发送具有指定 IP 选项的数据包
–ttl < val >设置 IP 生存时间字段
–spoof-mac <mac address/prefix/vendor name>欺骗您的 MAC 地址
–badsum使用伪造的 TCP/UDP/SCTP 校验和发送数据包

11、OUTPUT

参数说明
-oN/-oX/-oS/-oG < file >将扫描分别以正常、XML、s|<rIpt kIddi3 和 Grepable 格式输出到给定文件名。
-oA < basename >同时以三种主要格式输出
-v增加详细级别(使用 -vv 或更多以获得更大的效果)
-d提高调试级别(使用 -dd 或更多以获得更大的效果)
–reason显示端口处于特定状态的原因
–open仅显示打开(或可能打开)的端口
–packet-trace显示发送和接收的所有数据包
–iflist打印主机接口和路由(用于调试)
–append-output追加到指定的输出文件而不是阻塞指定的输出文件
–resume < filename >恢复中止的扫描
–stylesheet <path/URL>用于将 XML 输出转换为 HTML 的 XSL 样式表
–webxml引用 Nmap.Org 的样式表,以获得更可移植的 XML
–no-stylesheet防止关联带有 XML 输出的 XSL 样式表

12、MISC

参数说明
-6启用 IPv6 扫描
-A启用操作系统检测、版本检测、脚本扫描和跟踪路由
–datadir < dirname >指定自定义 Nmap 数据文件位置
–send-eth/–send-ip使用原始以太网帧或 IP 数据包发送
–privileged假定用户具有完全特权
–unprivileged假定用户缺少原始套接字权限
-V打印版本号
-h打印此帮助摘要页。

13、EXAMPLES

nmap -v -A scanme.nmap.org
nmap -v -sn 192.168.0.0/16 10.0.0.0/8
nmap -v -iR 10000 -Pn -p 80

三、man nmap

待完成

“天眼”软件使用说明: 本软件功能: 1、查找指定扫描范围主机上开放服务的所有端口。 2、检测同一网段上所有电脑的数据流。对于IP数据,解析出具体的数据流信息内容。如在“系统配置”中选择  “保存监测内容”,则在mytool.exe同目录下产生log.txt,保存监测的数据流内容。 3、检测指定IP地址的电脑的数据流。对于IP数据,解析出具体的数据流信息内容。如在“系统配置”中选择  “保存监测内容”,则在mytool.exe同目录下产生log.txt,保存监测的数据流内容。 4、Ping指定扫描范围所有主机,检测主机是否已开机。 5、显示本机的IP、以及本机在注册表中的主机名。 6、检测同一网段上数据流中包含的影音文件地址。包括swf,rm,ram,asf,mov,mpg,mpeg,mp4,flv,wmv,avi十一种 主流视频格式。如在“系统配置”中选择 “保存影音内容”,则在mytool.exe同目录下产生yinglog.txt,保存检测到的影音文件地址链接。 7、检测同一网段上数据流中包含的QQ号码,以及QQ行为。点击右键可拷贝密钥值及密文。 如有问题请与作者联系:cs200110614@sina.com,QQ:576256654 官方网站:http://www.kukustat.com 使用方法: 1、新建任一个目录 2、将mytool.rar解压到在新建的目录下。 3、运行winpcap_3_0.exe进行安装。 4、安装完winpcap_3_0.exe后,运行mytool.exe即可。 注:如果程序运行提示缺少文件,将mytool.rar解压出来的include、lib两个目录中的对应的文件拷贝到 mytool.exe所在目录下。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值