一、简单概念
1、UDP协议简介
- UDP(用户数据报)协议,是传输层的协议。
- 不需要建立连接,直接发送数据,不会重新排序,不需要确认。
2、UDP报文字段
3、常见的UDP端口号
- 53? ? ? ? UDP用户数据包协议
- 69? ? ? ? TFTP简单文件传输协议
- 111? ? ? RPC远程过程调用协议
- 123? ? ? NTP网络时间协议
- 161? ? ? SNMP简单网络管理协议
二、UDP 协议抓包
1、实验说明
使用到了基于UDP协议的NTP网络时间协议,更改系统时间,打开winshark抓包并打开自动更新时间/时区设置。
2、实验步骤


- 打开winshark抓包工具并开启自动更新时间、自动更新时区


三、UDP Flood攻击
1、实验环境
2、网络拓扑

3、实验配置
- kali IP配置,windows server 2016 IP地址配置、GNS3路由器配置
- kali? 192.168.10.1
- windows server? 2016 192.168.100.1
- GNS3路由器R1 f0/0 192.168.10.254? ?f1/0? ? 192.168.100.254
- ping测试
- windwos server 2016部署DNS服务器

netstat -anop udp

4、实施过程
这里生成了好多IPV4的报文时因为经过了路由器
产生很多随机IP向目标发起了DNS请求
- 正常的DNS报文Queries里面会有字段,没有域名的畸形的DNS报文Queries里面什么都没有,所以直接标识为畸形的DNS报文。







5、攻击命令
hping3 -q -n --rand-source --udp -p 53 --flood 192.168.100.1 -100000
开四五个终端去攻击:

6、实施攻击后

- nslookup解析的时候会出现time out.

- 也可以从UDP的连接数查看连接情况netstat -anop udp,关注随机IP地址的UDP连接。
四、 UDP Flood的防御
?抓取流量找流量特征:如何把畸形数据包拆包查出来,在服务器前面加一个设备,数据到了这个设备后把数据提过来,把数据全给它拆开,有能力的话可以把它全部转换成二进制,然后找到里面的特征,针对这一类的特征把它拒绝。
UDP其实很难防。