如何使用Nmap扫描TCP和UDP端口?

本文详细介绍了如何使用Nmap工具进行TCP和UDP端口扫描,包括TCP同步扫描、TCP确认扫描、UDP端口扫描、端口扫描范围、多端口扫描、最常用的端口扫描以及不同速度的端口扫描方法。
摘要由CSDN通过智能技术生成

Nmap is very popular tool among pentester and system/network administrators. We have all ready provided different nmap tutorials and cheat sheet but TCP and UDP port scan is important part of the scan. We will dive in detail in this tutorial.

Nmap是在pentester和系统/网络管理员中非常流行的工具。 我们已经准备好提供不同的nmap教程和备忘单,但是TCP和UDP端口扫描是扫描的重要部分。 我们将在本教程中详细介绍。

开始端口扫描 (Start Port Scan)

The most simple usage without any parameter for a port scan is just providing the target. The target can be a single IP or hostname or multiple targets. In this example we will scan IP address 192.168.1.1 with most common 1000 ports by default.

没有任何参数进行端口扫描的最简单用法就是提供目标。 目标可以是单个IP​​或主机名,也可以是多个目标。 在此示例中,默认情况下,我们将使用最常见的1000个端口扫描IP地址192.168.1.1

$ nmap 192.168.1.1
Start Port Scan
Start Port Scan
开始端口扫描

TCP同步扫描(TCP Syn Scan)

As we know TCP connection is initiated with 3-way handshake. The first step in 3-way handshake is sending Syn TCP packets. We can only send Syn packets to the target to scan and get status of the remote port without establishing connection. We will use -sS for this. This option requires Administrator or root privileges

众所周知,TCP连接是通过3次握手来启动的。 三向握手的第一步是发送Syn TCP数据包。 我们只能在不建立连接的情况下将Syn数据包发送到目标进行扫描并获取远程端口的状态。 我们将为此使用-sS 。 此选项需要管理员或root特权

$ nmap -sS 192.168.1.1
TCP Syn Scan
TCP Syn Scan
TCP同步扫描
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值