CentOS7 ICMP漏洞修復
一、 系統(tǒng)為CentOS7.6
二蹋辅、漏洞修復
1.ICMP timestamp請求響應漏洞
描述:
遠程主機會回復ICMP_TIMESTAMP查詢并返回它們系統(tǒng)的當前時間。 這可能允許者一些基于時間認證的協(xié)議
修復:
firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -p ICMP --icmp-type timestamp-request -m comment --comment "deny ICMP timestamp" -j DROP
firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -p ICMP --icmp-type timestamp-request -m comment --comment "deny ICMP timestamp" -j DROP
2.允許Traceroute探測漏洞
描述:
本插件使用Traceroute探測來獲取掃描器與遠程主機之間的路由信息肥橙∪的或者也可以利用這些信息來了解目標網(wǎng)絡的網(wǎng)絡拓撲
修復:
firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -p ICMP --icmp-type 11 -m comment --comment "deny traceroute" -j DROP
防火墻命令生效
firewall-cmd --reload
查看添加的規(guī)則
firewall-cmd --direct --get-all-rules
iptables 修復:
sudo iptables -A INPUT -p ICMP --icmp-type timestamp-request -j DROP
sudo iptables -A INPUT -p ICMP --icmp-type timestamp-reply -j DROP
sudo iptables -A INPUT -p ICMP --icmp-type time-exceeded -j DROP
sudo iptables -A OUTPUT -p ICMP --icmp-type time-exceeded -j DROP
systemctl enable iptables.service