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 portsEx: -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 ofdirectories, 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 orscript-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>: Specifiesprobe 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.orgnmap -v -sn 192.168.0.0/16 10.0.0.0/8nmap -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/PM | ICMP 回显、时间戳和网络掩码请求发现探测器 |
-PO[protocol list] | IP 协议 Ping |
-n/-R | 从不执行 DNS 解析/始终解析 [默认:有时] |
–dns-servers <serv1[,serv2],…> | 指定自定义 DNS 服务器 |
–system-dns | 使用操作系统的 DNS 解析程序 |
–traceroute | 跟踪到每个主机的跃点路径 |
4、SCAN TECHNIQUES
参数 | 说明 |
---|---|
-sS/sT/sA/sW/sM | TCP SYN/Connect()/ACK/Window/Maimon 扫描 |
-sU | UDP 扫描 |
-sN/sF/sX | TCP Null, FIN, and Xmas 扫描 |
–scanflags < flags > | 自定义 TCP 扫描标志 |
-sI <zombie host[:probeport]> | Idle 扫描 |
-sY/sZ | SCTP INIT/COOKIE-ECHO 扫描 |
-sO | IP 协议扫描 |
-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
待完成
nmap:网络探测工具和安全/端口扫描器相关推荐
- nmap — 网络探测工具和安全/端口扫描器
简介: Nmap("网络映射器")是一个免费的开源(许可) 用于网络发现和安全审计的实用程序.许多系统和网络管理员还发现它对于网络库存.管理服务升级计划以及监控主机或服务正常运行时 ...
- 10.21 nmap:网络探测工具和安全/端口扫描器
nmap命令 是一款开放源代码的网络探测和安全审核工具,是Network Mapper的缩写.其设计目标是快速地扫描大型网络.nmap可以发现网络上有哪些主机,主机提供了什么服务(应用程序名称和版本号 ...
- Linux centos7 NMAP网络探测工具安装过程以及使用示例!
NMAP网络探测工具 1.nmap安装 RZ上传! 解压: tar jxvf nmap-7.60.tar.bz2 配置: ./configure 出现了一个小火龙! 编译: make 再安装gcc-c ...
- NMAP网络扫描工具的安装与使用
简介 NMAP是一款流行的网络扫描和嗅探工具也是一个强大的端口扫描类安全测评工具,被广泛应用在黑客领域做漏洞探测以及安全扫描,更多的nmap是一个好用的网络工具,在生产和开发中也经常用到,主要做端口开 ...
- 网络探测工具(二)——traceroute
简述 搭建网络环境的时候,经常有想要知道报文从源到目的所经历的所有路由节点这样的需要.此时,traceroute小程序,后续简称为tracert,就有用武之地了. 功能 tracert,最初由大神Va ...
- 探测工具nmap简介及使用说明
1. 前言: 在前一遍Jmeter模拟多IP访问中,提到当前网络中可用ip,如何查找查看当前可用ip,nmap就是一个不错的开源免费的探测主机是否在网的工具. 另外当我们在构建环境或排查问题时,常常是 ...
- 网络扫描工具Nmap使用教程(1)
http://blog.sina.com.cn/s/blog_a1790a3701012tmo.html 1.简介 是什么:Nmap ("Network Mapper") 是一个免 ...
- 网络安全nmap扫描端口命令详解linux网络探测
简介: nmap是一个网络连接端扫描软件,用来扫描网上电脑开放的网络连接端.确定哪些服务运行在哪些连接端,并且推断计算机运行哪个操作系统(这是亦称 fingerprinting).它是网络管理员必用的 ...
- Linux笔记 No.24---(curl、ip、nmcli、网卡/主机名/DNS配置文件、常见网络问题诊断、网络诊断工具:ping/nmap/tcpdump)
文章目录 一.curl 二.ip 三.nmcli 四.网络相关文件 (一)网络配置文件 (二)主机名配置文件 (三)DNS配置文件 五.常见网络问题诊断 六.网络诊断常用工具 (一)ping (二)n ...
最新文章
- 创建UITextField对象
- MongoDb注意事项
- react 子传参父_React 子组件给父组件传值、整个组件、方法
- php网站灰颜色代码,css取消Safari浏览器链接点击颜色变灰-webkit-tap-highlight-color_html/css_WEB-ITnose...
- 文件包含和文件上传结合
- 通过示例休眠–第2部分(DetachedCriteria)
- springmvc源码阅读3--dispatcherServlet reqeust的执行流程
- clover更新驱动 后不能开机_黑苹果笔记本电池模式下省电驱动,延长笔记本续航...
- everything如何搜索文件内容?(这软件搜索文件可以,搜索文件内容不行)
- 将Matlab换成Pycharm风格
- 程序猿郭小喵过去的大学故事,致迷茫的你我
- 8255A并行 I/O 接口芯片
- mysql停止修复_浅析MySQL 8.0崩溃恢复
- 医疗在线质控系统 资料收集
- 宋体能力从业的一些感悟
- int const, const int *,int *const,int const *const 区别
- 在ubuntu16.04下测试ffplay程序
- ODBC数据源:没有ORACLE用户DSN,也没有驱动程序?
- 资源采集网php源码,YK影视聚合资源采集无需数据库PHP源码V2.3-完全开源
- 增加b格的win10快捷键(入门)入门增加效率