2024年9月

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

1.OpenSSL版本升级

https://computingforgeeks.com/how-to-install-openssl-1-1-on-centos-rhel-7/

1.1 安装依赖

$ sudo yum -y groupinstall "Development Tools"

1.2 下载openssl且编译

$ wget https://www.openssl.org/source/openssl-1.1.1w.tar.gz
$ tar xvf openssl-1.1.1w.tar.gz
$ cd openssl-1.1.1w
$ ./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl
Operating system: x86_64-whatever-linux2
Configuring OpenSSL version 1.1.1w (0x1010117fL) for linux-x86_64
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile

**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL file first)         ***
***                                                                ***
**********************************************************************

- 阅读剩余部分 -

拉取容器

docker-compose pull

运行容器

docker-compose up -d

关闭容器

docker-compose stop

移除容器

docker-compose down

重启容器(当容器卡死时使用)

docker-compose restart

更新容器

先停止并移除旧容器,再拉取并运行新容器
docker-compose stop
docker-compose down
docker-compose pull
docker-compose up -d
您是第 67927 位访客