当前位置:网站首页>信息收集-端口扫描工具-Nmap使用说明
信息收集-端口扫描工具-Nmap使用说明
2022-07-26 23:26:00 【徐记荣】
目录
0x01 安装
Mac os:
brew install nmap
Centos:
yum install nmap
Ubuntu:
apt-get install nmap
0x02 扫描命令
语法
nmap [scan type] [option] [target]
命令
| 命令 | 描述 |
|---|---|
| -sT | TCP,基本的TCP扫描方式。这种扫描很容易被检测到,在目标主机的日志中会记录大批的连接请求以及错误信息 |
| -sS | SYN,同步扫描, 仅发送SYN包,所以这项技术称为半开放扫描,好处是,不容易被检测,很少有系统能够把这记录入日志系统,不过需要root权限定制SYN包 |
| -sU | UDP,扫描开放了哪些UDP端口 |
| -sP | ICMP,ping扫描,探测哪些主机在线 |
| -P0 | 在扫描之前,不ping主机 |
| -PT | 在扫描之前,使用TCP ping确定哪些主机正在运行 |
| -PI | 设置这个选项,让namp使用真正的ping(ICMP echo请求)来扫描目标主机是否正在运行 |
| -p T:n1,n2… | 扫描开放了哪些TCP端口 |
| -PS | TCP ACK扫描 |
| -PA | TCP SYN扫描 |
| -sR | RPC扫描,和其它不同的端口扫描方法结合使用 |
| -sn | Disable Port Scan |
| -sA | ACK扫描,探测防火墙,这项高级的扫描方式通常可以用来穿过防火墙 |
| -PB | 这是默认的ping扫描选项,它使用 ACK(-PT) 和 ICMP(-PI) 两种扫描类型并行扫描。如果防火墙能够过滤其中一种包,使用这种方法,你就能够穿过防火墙 |
| -sW | 滑动窗口扫描,非常类似于ACK扫描 |
| -sN | TCP空扫描欺骗防火墙 |
| -PN | 探测防火墙 |
| -b | FTP反弹攻击,连接到防火墙后面的一台FTP服务器做代理,接着进行端口扫描 |
| -A | 扫描操作系统和路由跟踪 |
| -O | 探测操作系统 |
| -iflist | 显示接口和路由信息 |
| -sV | 查看服务的版本 |
| -p | 指定端口扫描 |
| -v | 加强扫描,给出扫描过程的详细信息 |
| -F | 快速扫描 |
| -r | 按顺序扫描 |
| -I | 打开nmap的反向标志扫描功能 |
| -f | 使用碎片 IP 数据包发送 SYN、FIN、XMAS、NULL。包增加包过滤、入侵检测系统的难度,使其无法知道你的企图。 |
| -S | 设置源IP |
| -g port | 设置源端口,如果攻击者把源端口修改为 20 或者 53,就可以摧毁防火墙的防护 |
| -M count | TCP扫描时,最多使用多少个套接字进行并行扫描 |
| -T4 | 指定扫描过程使用的时序,总有6个级别(0-5),级别越高,扫描速度越快,但也容易被防火墙或IDS检测并屏蔽掉,在网络通讯状况较好的情况下推荐使用T4 |
| -iR number | 对随机生成number个地址进行扫描 |
时间设置
| 参数 | 描述 |
|---|---|
| --host_timeout | 扫描一台主机的时间,毫秒为单位,通常选值:18000 |
| --scan-delay | 报文时间间隔,毫秒为单位,通常选值:1000 |
| --max_rtt_timeout | 设置每次探测等待的时间,毫秒为单位,超过就重传 |
| --min_rtt_timeout | 每次探测至少等待的时间,以毫秒为单位 |
文件导出
| 参数 | 描述 |
|---|---|
| -oN | 将结果导出到一个可读的文件logfilename |
| -oX test.xml | 将扫描结果生成 test.xml 文件,如果中断,则结果打不开 |
| -oA test.xml | 将扫描结果生成 test.xml 文件,中断后,结果也可保存 |
| -oG test.txt | 将扫描结果生成 test.txt 文件 |
多个扫描
| 命令 | 描述 |
|---|---|
| namp IP1 IP2… | 扫描多个IP |
| namp 192.168.0.1,3,5,7… | 扫描多个IP |
| namp 192.168.0.* | 扫描整个子网 |
| namp 192.168.1-10.* | 扫描多个子网 |
| nmap -iL xxx.txt | 根据文件扫描多个IP |
| namp 192.168.0.10-100 | 扫描范围内IP |
边栏推荐
- HCIP-第一天
- [brother Yang takes you to play with the linear table (4) - chain queue]
- OSPF summary (mind map)
- I wish you a happy Chinese Valentine's day and invite you to read the source code together
- How to judge whether a number is odd or even?
- OSPF总结(思维导图)
- Hcip the next day
- 多线程的具体使用
- JUC concurrent programming
- Prompt to leave the page
猜你喜欢

文章摘要智能提取【基于BERT技术】

Writing a pacesetter frequently -- yunxiaojing

hcip--ospf接口网络接口类型实验
![[C language] factorial implementation](/img/a1/9e603321d364c7f457116bd9e462aa.png)
[C language] factorial implementation

【降维打击,带你深度学习CPU(上)】
![[brother Yang takes you to play with the linear table (III) - two way linked list]](/img/64/5367ff4fb6797565cb1f9e1a8aee4e.png)
[brother Yang takes you to play with the linear table (III) - two way linked list]

【在Visual Studio 2019中使用SQLite3库实现学生信息管理系统】

【用C语言绘制直角坐标系】

HCIP-第五天-OSPF扩展配置实验

Hcip day 6 OSPF static experiment
随机推荐
HCIP-第三天-广域网拓扑实验
膜拜,阿里内部都在强推的321页互联网创业核心技术pdf,真的跪了
Prompt to leave the page
[draw rectangular coordinate system in C language]
通过ensp让静态路由实现全网可达
After ten years of testing, I want to say to my friends who are still confused: one thing is to do a good job in personal planning
Prometheus operation and maintenance tool promtool (III) debug function
Wechat applet: user wechat login process (attached: flow chart + source code)
[use SQLite3 library to realize student information management system in Visual Studio 2019]
【洋哥带你玩转线性表(三)——双向链表】
On the first day of staying in the blog [for 80000]!
Interesting C language
Hcip OSPF knowledge summary
Is it useful to lie down with your eyes closed when you can't sleep?
NAT network address translation protocol topology experiment
关于序列化变量保存的坑,加了索引器的数据不能序列化
【洋哥带你玩转线性表(一)——顺序表】
祝大家七夕快乐,邀你源码共读
php+swoole
Hcip day 5 OSPF extended configuration experiment