标签 运维 下的文章

1.需要修改ssh源文件 version.h 中 define SSH_VERSION的内容

#define SSH_VERSION     "OpenSSH_Welcome"

#define SSH_PORTABLE    "p1"
#define SSH_RELEASE     SSH_VERSION SSH_PORTABLE

2.编译源码安装Openssh
3.重启sshd服务

$ systemctl daemon-reload
$ systemctl restart sshd.service

4.验证是否成功

$ telnet localhost 22
Trying ::1...
Connected to localhost.
Escape character is '^]'.
SSH-2.0-OpenSSH_Welcome

漏洞名称: ICMP timestamp请求响应漏洞

CVE编号: CVE-1999-0524

风险等级: 低 ,协议ICMP

详细描述: 远程主机会回复ICMP_TIMESTAMP查询并返回它们系统的当前时间。这可能允许攻击者攻击一些基于时间认证的协议。

解决办法: NSFOCUS建议您采取以下措施以降低威胁:在您的防火墙上过滤外来的ICMP timestamp(类型 13)报文以及外出的ICMP timestamp回复报文。

防火墙增加规则
iptables -A INPUT -p ICMP --icmp-type timestamp-request -j DROP
iptables -A INPUT -p ICMP --icmp-type timestamp-reply -j DROP

漏洞名称: 允许Traceroute探测

CVE编号: CVE-1999-0633

风险等级: 低 ,协议ICMP

详细描述: 本插件使用Traceroute探测来获取扫描器与远程主机之间的路由信息。攻击者也可以利用这些信息来了解目标网络的网络拓扑。

解决办法: 在防火墙出入站规则中禁用echo-reply(type 0)、time-exceeded(type 11)、destination-unreachable(type 3)类型的ICMP包。

防火墙增加规则
iptables -A INPUT -p ICMP --icmp-type echo-reply -j DROP  
iptables -A OUTPUT -p ICMP --icmp-type echo-reply -j DROP  
iptables -A INPUT -p ICMP --icmp-type time-exceeded -j DROP  
iptables -A OUTPUT -p ICMP --icmp-type time-exceeded -j DROP  
iptables -A INPUT -p ICMP --icmp-type destination-unreachable -j DROP  
iptables -A OUTPUT -p ICMP --icmp-type destination-unreachable -j DROP
查看防火墙策略
iptables -L -n
您是第 68099 位访客