"Network security and penetration tests" class notes --- 10

2019/4/26 - - -
on target with the host explained Wang nmap scan of kali linux found to explain part of the (host discovery)

nmap: can be used to scan a network, network monitoring service, lists the active hosts on the network.
Enter nmap, nmap can see what the options are. .
Here Insert Picture Description
TARGET SPECIFICATION (target specification):
Here Insert Picture Description
iL description:

-iL:可以把扫描的目标写在一个文件中。
举例说明:
1、我先创建了一个带有ip地址的文件,名为ip.txt

Here Insert Picture Description
And then execute the command

nmap -sn -iL ip.txt
sn:是简单的ping扫描,不做端口扫描,速度较快。
现在发现是有4台主机开启的。

Here Insert Picture Description
iR description:

iR:随机挑选指定的主机进行扫描

For example:

nmap -v -iR 10
v 做详细扫描,可以加多个。

Here Insert Picture Description
- -exdclude description:

--exdclude 排除某个地址,或某个范围的地址。

For example:

	nmap -v -sn 192.168.247.0/24 --exclude  192.168.247.1,192.168.247.100-254

Here Insert Picture Description
- -excludefile description:

--excludefile: 排除文件中的地址

For example:

nmap -v -sn --excludefile ip2.txt 192.168.247.0-255
文件中有几个ip地址,扫描时会排除在外。。

Here Insert Picture Description
HOST DISCOVERY host discovery:

-sL description:

-sL 列表扫描,仅将指定的目标ip列举出来,不进行主机发现

For example:

nmap -sL 192.168.247.0/24

Here Insert Picture Description
-sn, -sP description:

-sn 和-sP一样,只利用ping扫描进行主机发现,不扫描目标主机的端口

For example:

nmap -sn 192.168.247.0/24
nmap -sP 192.168.247.0/24

Here Insert Picture Description
-Pn description:

-Pn 将所有指定的主机视为已开启状态,跳过主机发现过程

For example:

nmap -Pn 192.168.247.0/24

Here Insert Picture Description
-PS Introduction

-PS TCP SYN ping,发送一个设置了SYN标志位的空TCP报文,默认端口为80,也可指定端口

For example:

nmap -PS 192.168.247.0/24

Here Insert Picture Description
-PA Introduction

-PA TCP ACK ping,发送一个设置了ACK标志位的TCP报文,默认端口为80,也可指定端口

For example:

nmap -PA 192.168.247.0/24

Here Insert Picture Description
-PU Introduction

-PU UDP ping,发送一个空的udp报文到指定端口,可穿透只过滤tcp的防火墙

For example:

nmap -PU 192.168.247.0/24

Here Insert Picture Description
-PY Introduction

-PY SCTP的探测,SCTP可以看作是TCP协议的改进,它改进了tcp的一些不足,
	通过向目标发送INIT包,根据目标主机的相应判断目标主机是否存活。

For example:

nmap -PY 192.168.247.0/24

Here Insert Picture Description

-PE Introduction

-PE:使用ICMP echo Ping扫描方式发现主机。echo 回显请求

For example:

nmap -PE -v 192.168.247.0/24

Here Insert Picture Description
-PP Introduction

-PP: 使用ICMP timestamp Ping扫描方式发现主机。时间戳

For example:

nmap -PP -v 192.168.247.0/24

Here Insert Picture Description
-PM Introduction

-PM: 使用ICMP netmask Ping扫描方式发现主机。地址掩码查询

For example:

nmap -PM -v 192.168.247.0/24

Here Insert Picture Description
-PO Introduction

-PO 使用ip协议ping

For example:

nmap -PO 192.168.247.0/24

Here Insert Picture Description
-PR Introduction

-PR 使用ARP ping
-n/-R :
		-n不用域名解析,加速扫描,-R为目标ip做反向域名解析,扫描较慢一些

For example:

nmap -PR -n 192.168.247.0/24
nmap -PR -R 192.168.247.0/24

Here Insert Picture Description
-dns-servers introduced

-dns-servers 自定义域名解析服务器地址,

For example:

nmap -dns-servers 8.8.8.8 192.168.247.0/24

Here Insert Picture Description
-traceroute Introduction

-traceroute 目标主机路由追踪,使用路由追踪功能可以帮助用户了解网络的同行情况.
通过此选项可以轻松地查出从计算机到目标之间所经过的网络节点,并可以看到通过各个节点的时间.

For example:

nmap -traceroute  -v www.163.com

Here Insert Picture Description
-system-dns Introduction

--system-dns Nmap通过直接发送查询到您主机上配置的域名服务器来解析域名,
默认情况下,Nmap通过直接发送查询到您的主机上配置的域名服务器 来解析域名。
为了提高性能,许多请求 (一般几十个 ) 并发执行。
如果您希望使用系统自带的解析器,就指定该选项 (通过getnameinfo()调用一次解析一个IP)。

For example:

nmap --system-dns -v 192.168.247.0/24

Here Insert Picture Description
ok,see youO(∩_∩)O

Guess you like

Origin blog.csdn.net/zhaotiannuo_1998/article/details/89550992