利用nmap进行信息收集

本文涉及的产品
云解析 DNS,旗舰版 1个月
全局流量管理 GTM,标准版 1个月
公共DNS(含HTTPDNS解析),每月1000万次HTTP解析
简介: 利用nmap对其进行端口扫描在Kali中默认安装了Nmap,可以在终端中输入nmap查看其详细用法```┌──(kali㉿kali)-[~]└─$ nmapNmap 7.92 ( 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

利用nmap进行信息收集

利用nmap对其进行端口扫描
在Kali中默认安装了Nmap,可以在终端中输入nmap查看其详细用法

┌──(kali㉿kali)-[~]
└─$ nmap
Nmap 7.92 ( 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
  --noninteractive: Disable runtime interactions via keyboard
  --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

翻译

Nmap 7.92 (https://nmap.org)
用法:nmap [扫描类型] [选项] {目标规范}
目标规格:
  可以传递主机名、IP 地址、网络等。
  例如:scanme.nmap.org、microsoft.com/24、192.168.0.1; 10.0.0-255.1-254
  -iL <inputfilename>:来自主机/网络列表的输入
  -iR <num hosts>:选择随机目标
  --exclude <host1[,host2][,host3],...>:排除主机/网络
  --excludefile <exclude_file>:从文件中排除列表
主机发现:
  -sL:列表扫描 - 简单地列出要扫描的目标
  -sn:Ping 扫描 - 禁用端口扫描
  -Pn:将所有主机视为在线——跳过主机发现
  -PS/PA/PU/PY[portlist]:到给定端口的 TCP SYN/ACK、UDP 或 SCTP 发现
  -PE/PP/PM:ICMP 回显、时间戳和网络掩码请求发现探测
  -PO[协议列表]:IP 协议 Ping
  -n/-R:从不做 DNS 解析/总是解析 [默认:有时]
  --dns-servers <serv1[,serv2],...>:指定自定义 DNS 服务器
  --system-dns:使用操作系统的 DNS 解析器
  --traceroute:跟踪每个主机的跃点路径
扫描技术:
  -sS/sT/sA/sW/sM:TCP SYN/Connect()/ACK/Window/Maimon 扫描
  -sU:UDP 扫描
  -sN/sF/sX:TCP Null、FIN 和 Xmas 扫描
  --scanflags <flags>:自定义 TCP 扫描标志
  -sI <僵尸主机[:probeport]>:空闲扫描
  -sY/sZ:SCTP INIT/COOKIE-ECHO 扫描
  -sO:IP协议扫描
  -b <FTP 中继主机>:FTP 反弹扫描
端口规格和扫描顺序:
  -p <端口范围>:只扫描指定的端口
    例如:-p22; -p1-65535; -p U:53,111,137,T:21-25,80,139,8080,S:9
  --exclude-ports <端口范围>:从扫描中排除指定端口
  -F:快速模式 - 扫描比默认扫描更少的端口
  -r:连续扫描端口——不要随机化
  --top-ports <number>:扫描<number>个最常用的端口
  --port-ratio <ratio>:扫描比<ratio>更常见的端口
服务/版本检测:
  -sV:探测开放端口以确定服务/版本信息
  --version-intensity <level>:设置从 0(轻)到 9(尝试所有探针)
  --version-light:限制最可能的探测(强度 2)
  --version-all:尝试每一个探测(强度 9)
  --version-trace:显示详细的版本扫描活动(用于调试)
脚本扫描:
  -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 脚本>:显示有关脚本的帮助。
           <Lua scripts> 是以逗号分隔的脚本文件列表或
           脚本类别。
操作系统检测:
  -O:启用操作系统检测
  --osscan-limit:将操作系统检测限制为有希望的目标
  --osscan-guess:更积极地猜测操作系统
时间和性能:
  需要 <time> 的选项以秒为单位,或附加“ms”(毫秒),
  's'(秒)、'm'(分钟)或 'h'(小时)到值(例如 30m)。
  -T<0-5>:设置时序模板(越高越快)
  --min-hostgroup/max-hostgroup <size>:并行主机扫描组大小
  --min-parallelism/max-parallelism <numrobes>:探针并行化
  --min-rtt-timeout/max-rtt-timeout/initial-rtt-timeout <时间>:指定
      探测往返时间。
  --max-retries <tries>:限制端口扫描探测重传的次数。
  --host-timeout <time>: 这么长时间后放弃目标
  --scan-delay/--max-scan-delay <time>:调整探针之间的延迟
  --min-rate <number>:每秒发送数据包不低于 <number>
  --max-rate <number>:每秒发送数据包的速度不超过 <number>
防火墙/IDS 逃避和欺骗:
  -F; --mtu <val>: 分片数据包(可选地 w/给定的 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地址/前缀/供应商名称>:欺骗你的MAC地址
  --badsum:发送带有虚假 TCP/UDP/SCTP 校验和的数据包
输出:
  -oN/-oX/-oS/-oG <file>:输出扫描正常,XML,s|<rIpt kIddi3,
     和 Grepable 格式,分别为给定的文件名。
  -oA <basename>:一次输出三种主要格式
  -v:增加详细程度(使用 -vv 或更多以获得更好的效果)
  -d:增加调试级别(使用 -dd 或更多以获得更好的效果)
  --reason:显示端口处于特定状态的原因
  --open:仅显示打开(或可能打开)的端口
  --packet-trace:显示所有发送和接收的数据包
  --iflist:打印主机接口和路由(用于调试)
  --append-output:附加到而不是破坏指定的输出文件
  --resume <文件名>:恢复中止的扫描
  --noninteractive:通过键盘禁用运行时交互
  --stylesheet <path/URL>:将 XML 输出转换为 HTML 的 XSL 样式表
  --webxml:参考 Nmap.Org 的样式表以获得更便携的 XML
  --no-stylesheet:防止 XSL 样式表与 XML 输出相关联
杂项:
  -6:启用 IPv6 扫描
  -A:启用操作系统检测、版本检测、脚本扫描和跟踪路由
  --datadir <dirname>:指定自定义 Nmap 数据文件位置
  --send-eth/--send-ip:使用原始以太网帧或 IP 数据包发送
  --privileged:假设用户拥有完全特权
  --unprivileged:假设用户缺乏原始套接字权限
  -V:打印版本号
  -h:打印此帮助摘要页。
例子:
  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
有关更多选项和示例,请参见手册页 (https://nmap.org/book/man.html)
相关实践学习
通过Ingress进行灰度发布
本场景您将运行一个简单的应用,部署一个新的应用用于新的发布,并通过Ingress能力实现灰度发布。
容器应用与集群管理
欢迎来到《容器应用与集群管理》课程,本课程是“云原生容器Clouder认证“系列中的第二阶段。课程将向您介绍与容器集群相关的概念和技术,这些概念和技术可以帮助您了解阿里云容器服务ACK/ACK Serverless的使用。同时,本课程也会向您介绍可以采取的工具、方法和可操作步骤,以帮助您了解如何基于容器服务ACK Serverless构建和管理企业级应用。 学习完本课程后,您将能够: 掌握容器集群、容器编排的基本概念 掌握Kubernetes的基础概念及核心思想 掌握阿里云容器服务ACK/ACK Serverless概念及使用方法 基于容器服务ACK Serverless搭建和管理企业级网站应用
目录
相关文章
|
3月前
|
网络协议 Linux Windows
kali-信息收集
kali-信息收集
34 0
|
13天前
|
网络协议 网络安全
DNS信息收集详解
DNS信息收集详解
12 1
|
1月前
|
安全 网络协议 关系型数据库
【信息收集】 端口信息收集
网络通信依赖端口来区分不同的服务。这些逻辑端口范围从0到65535,其中0-1023为知名端口,常用于特定服务如FTP(20和21)、HTTP(80)、SSH(22)等;1024-49151为注册端口,49152-65535为动态或私有端口。端口分为TCP和UDP,分别对应面向连接和无连接的协议。开放端口可能带来安全风险,如弱口令、漏洞利用等,需注意防护。NMAP工具可用于端口扫描,识别网络上开放的服务。
26 5
|
1月前
|
域名解析 负载均衡 网络协议
【信息收集】 IP信息收集
IP信息收集、CDN、C段、DNS记录
22 3
|
3月前
|
Ubuntu 网络协议 网络安全
信息收集 -- 主机发现
信息收集 -- 主机发现
25 0
|
3月前
|
域名解析 前端开发 JavaScript
信息收集工具 -- weblive
信息收集工具 -- weblive
34 0
|
Python
python脚本基于端口开启服务识别信息收集
python脚本基于端口开启服务识别信息收集
220 0
|
安全 网络协议 网络安全
2021Kali系列 -- 信息收集(Nmap)
2021Kali系列 -- 信息收集(Nmap)
64 0
2021Kali系列 -- 信息收集(Nmap)
|
网络协议 网络安全
Metasploit信息收集
Metasploit信息收集
70 0
Metasploit信息收集
|
SQL 安全 网络协议
第二轮学习笔记: 扫描工具 -- nmap信息收集
第二轮学习笔记: 扫描工具 -- nmap信息收集
137 0
第二轮学习笔记: 扫描工具 -- nmap信息收集