1. 程式人生 >實用技巧 >其它 >CVE-1999-0634漏洞-sshd版本號隱藏

CVE-1999-0634漏洞-sshd版本號隱藏


技術標籤:sshd安全漏洞ssh運維linux

SSH服務允許遠端攻擊者獲得ssh的具體資訊,如版本號等等。這可能為攻擊者發動進一步攻擊提供幫助。

修復方法:

#查詢sshd的位置
[[email protected] ~]# which sshd
/usr/sbin/sshd

#備份
[[email protected] ~]# cp /usr/sbin/sshd /usr/sbin/sshd.bak

#檢視版本的關鍵字元
[[email protected] ~]# strings /usr/sbin/sshd |grep OpenSSH_
OpenSSH_8.3p1
OpenSSH_8.3  #次為版本號
OpenSSH_2.*,OpenSSH_3.0*,OpenSSH_3.1*
OpenSSH_2*,OpenSSH_3*,OpenSSH_4*
OpenSSH_7.0*,OpenSSH_7.1*,OpenSSH_7.2*,OpenSSH_7.3*,OpenSSH_7.4*,OpenSSH_7.5*,OpenSSH_7.6*,OpenSSH_7.7*
OpenSSH_3.*
OpenSSH_5*
OpenSSH_6.6.1*
OpenSSH_6.5*,OpenSSH_6.6*

#修改成你需要的版本號
sed -i '#OpenSSH_8.3#OpenSSH_9.9#' /usr/sbin/sshd

#重啟測試sshd是否正常,能正常重啟代表成功設定
[[email protected] ~]# /etc/init.d/sshd restart
Restarting sshd (via systemctl):                           [  OK  ]

CVE-1999-0634漏洞-sshd版本號隱藏


最後telnet測試顯示為自己修改的版本號

YYQ運維技術部落格_運維的工作學習之路
飛翔沫沫情部落格_一隻運維狗的升級打怪之旅
https://www.yeyouqing.top