下面狀況為安裝完成後,更新系統後,設定登入帳號使用OPENVAS掃描的狀況
1.修正Kernel
其實在作yum update時,已將kernel更新,但是由於舊的版本還存在,
所以系統掃描還是會有風險出現,所以手動刪除舊的Kernel,請先重開機將Kernel改為最新版
yum install yum-utils #安裝套件 package-cleanup --oldkernels --count 1 #使用套件移除Kernel |
2.修改SSH加密機制(CentOS8不支援 2020/8/10修改)
修改/etc/ssh/sshd_config 檔案
最後一行加入(2021/12/13修正)
KexAlgorithms diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1 Ciphers aes128-ctr,aes192-ctr,aes256-ctr MACs hmac-sha1,hmac-ripemd160,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160@openssh.com |
2-1 CENTOS8 修改方式
修改 /etc/crypto-policies/back-ends/opensshserver.config
將不安全的加密方式重啟動文件中移除
重新啟動SSH
3.修改/etc/sysctl.conf
最後一行加入
net.ipv4.tcp_timestamps = 0 |
重新載入設定
重新掃描後已無風險