zoukankan      html  css  js  c++  java
  • ICMP timestamp请求响应漏洞 防火墙上过滤外来的ICMP timestamp(类型 13)报文以及外出的ICMP timestamp回复报文

    ICMP timestamp请求响应漏洞 防火墙上过滤外来的ICMP timestamp(类型 13)报文以及外出的ICMP timestamp回复报文


      

     ICMP timestamp请求响应漏洞
    详细描述 远程主机会回复ICMP_TIMESTAMP查询并返回它们系统的当前时间。

    这可能允许攻击者攻击一些基于时间认证的协议。
    解决办法 NSFOCUS建议您采取以下措施以降低威胁:

    * 在您的防火墙上过滤外来的ICMP timestamp(类型 13)报文以及外出的ICMP timestamp回复报文。
    威胁分值 2.1
    危险插件
    发现日期 1997-08-01
    CVE编号 CVE-1999-0524
    CNNVD编号 CNNVD-199708-003
    CNCVE编号 CNCVE-19990524
    CVSS评分 2.1

    解决步骤如下:

    (说明:如果 /etc/sysconfig/ 目录下没有 iptables 文件,需要安装 iptables,请参考:https://www.cnblogs.com/miracle-luna/p/13714709.html

    1、修改 iptables 文件

    /etc/sysconfig/iptables 文件中,增加如下内容:

    -A INPUT -p icmp --icmp-type timestamp-request -j DROP
    -A INPUT -p icmp --icmp-type timestamp-reply -j DROP

    修改后,iptables 文件内容如下:

    # sample configuration for iptables service
    # you can edit this manually or use system-config-firewall
    # please do not ask us to add additional ports/services to this default configuration
    *filter
    :INPUT ACCEPT [0:0]
    :FORWARD ACCEPT [0:0]
    :OUTPUT ACCEPT [0:0]
    
    -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
    -A INPUT -p icmp -j ACCEPT
    -A INPUT -i lo -j ACCEPT
    -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
    
    # 过滤外来的ICMP timestamp(类型 13)报文以及外出的ICMP timestamp回复报文
    -A INPUT -p icmp --icmp-type timestamp-request -j DROP
    -A INPUT -p icmp --icmp-type timestamp-reply -j DROP
    
    -A INPUT -j REJECT --reject-with icmp-host-prohibited
    -A FORWARD -j REJECT --reject-with icmp-host-prohibited
    COMMIT

    2、保存 iptables 文件

    service iptables save

    3、重载 iptables 文件

    systemctl reload iptables

    或者 

    service iptables reload

    4、重启 iptables 服务

    systemctl restart iptables

    或者

    service iptables restart

    5、查看 iptables 状态

    systemctl status iptables

    或者

    service iptables status
  • 相关阅读:
    Blue:贪心,单调队列
    建设城市(city):组合数,容斥原理
    [考试反思]0809NOIP模拟测试15:解剖
    [考试反思]0807NOIP模拟测试14:承认
    [考试反思]阶段性总结:NOIP模拟测试7~13
    [考试反思]0805NOIP模拟测试13:窒息
    [考试反思]0803NOIP模拟测试12:偿还
    [态度]关于博客
    差异:后缀数组(wzz模板理解),决策单调性
    [考试反思]0801NOIP模拟测试11
  • 原文地址:https://www.cnblogs.com/miracle-luna/p/13718017.html
Copyright © 2011-2022 走看看