一次UDP DDOS的自查过程

xiaohai 2021-05-17 20:44:21 1279人围观 标签: Linux 
简介一次UDP DDOS的自查过程

事件描述:检测该异常事件意味着您服务器上开启了”Chargen/DNS/NTP/SNMP/SSDP”这些UDP端口服务,黑客通过向该ECS发送伪造源IP和源端口的恶意UDP查询包,迫使该ECS向受害者发起了UDP DDOS攻击

源IP: xx.xx.xx.xx 源PORT: 111 目的PORT: 963

攻击类型: SunRPC反射攻击

扫描IP频数: 3

扫描TCP包频数: 11480

持续时间(分钟): 55

事件说明: 检测该异常事件意味着您服务器上开启了”Chargen/DNS/NTP/SNMP/SSDP”这些UDP端口服务,黑客通过向该ECS发送伪造源IP和源端口的恶意UDP查询包,迫使该ECS向受害者发起了UDP DDOS攻击。

解决方案: 自查ECS中19、53、123、161、1900 UDP端口是否处于监听状态,若开启就关闭

自查步骤:

netstat -anp|grep :19
netstat -anp|grep :53
netstat -anp|grep :123
netstat -anp|grep :161
netstat -anp|grep :1900

处理方法:

[root@localhost frp]# netstat -anp|grep :111
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1/systemd           
tcp6       0      0 :::111                  :::*                    LISTEN      13946/rpcbind       
udp        0      0 0.0.0.0:111             0.0.0.0:*                           13946/rpcbind       
udp6       0      0 :::111                  :::*                                13946/rpcbind  

[root@localhost frp]# ps -ef|egrep "rpc|nfs"
root     12807 10395  0 16:24 pts/0    00:00:00 grep -E --color=auto rpc|nfs
rpc      13946     1  0 Mar31 ?        00:02:26 /sbin/rpcbind -w

[root@localhost frp]# kill -9 13946 #杀死rpcbind进程


[root@localhost frp]# netstat -anp|grep :111 #但是还存在一个进程,监听了111端口
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1/systemd   


[root@localhost frp]# systemctl stop rpcbind.service  #关闭rpcbind服务,但是提示会rpcbind.socket被激活
Warning: Stopping rpcbind.service, but it can still be activated by:
  rpcbind.socket


[root@localhost frp]# systemctl stop rpcbind.socket  #使用该命令来停止服务,成功了,再没有111端口被监听
[root@localhost frp]# netstat -anp|grep :111 #没有111端口被监听