安全等保漏洞修復之OpenSSH漏洞修復

2021-10-01 17:29:20 字數 1746 閱讀 7786

先看下ssh的版本,

ssh -v

我們公司用的模版是centos6.6的,版本是openssh_5.3p1

openssh_5.3p1, openssl 1.0.1e-fips 11 feb 2013

測評的公司給我們掃出5個高危,9個中危

公升級到 openssh-7.7p1後,只有1個中危了

rpm -e `rpm -qa | grep openssh` --nodeps

yum install -y gcc openssl-devel pam-devel rpm-build pam-devel

cd /usr/local/src/

wget

tar -zxvf openssh-7.7p1.tar.gz

./configure --prefix=/usr/ --sysconfdir=/etc/ssh/ --with-ssl --with-md5-passwords mandir=/usr/share/man/

make && make install

cp /usr/local/src/openssh-7.7p1/contrib/redhat/sshd.init /etc/init.d/sshd

#允許root登陸

echo "permitrootlogin yes" >> /etc/ssh/sshd_config

#開機自啟動

cp -p contrib/redhat/sshd.init /etc/init.d/sshd

chmod +x /etc/init.d/sshd

chkconfig --add sshd

chkconfig sshd on

chkconfig --list sshd

rm -f /etc/ssh/ssh_host_*

vim /etc/init.d/sshd

vim /etc/ssh/sshd_config

/etc/init.d/sshd start

ssh-keygen -r 10.0.***

ssh-copy-id [email protected]

rpm -e `rpm -qa | grep openssh` --nodeps

yum install -y gcc openssl-devel pam-devel rpm-build pam-devel

cd /usr/local/src/

wget

tar -zxvf openssh-7.7p1.tar.gz

cd openssh-7.7p1

./configure --prefix=/usr/ --sysconfdir=/etc/ssh/ --with-ssl --with-md5-passwords mandir=/usr/share/man/

make && make install

cp /usr/local/src/openssh-7.7p1/contrib/redhat/sshd.init /etc/init.d/sshd

echo "permitrootlogin yes" >> /etc/ssh/sshd_config

chmod +x /etc/init.d/sshd

chkconfig --add sshd

chkconfig sshd on

chkconfig --list sshd

/etc/init.d/sshd start

ssh -v

appscan 安全漏洞修復

1.會話標識未更新 登入頁面加入以下 request.getsession true invalidate 清空session cookie cookie request.getcookies 0 獲取cookie cookie.setmaxage 0 讓cookie過期 不是很明白session的...

Linux Bash安全漏洞修復

1.影響的系統包括 centos debian redhat ubuntu 2.檢查系統是否要修復 root mysql env x echo vulnerable bash c echo this is a test vulnerable this is a test root mysql 如果輸...

Appscan安全漏洞修復

1.會話標識未更新 登入頁面加入以下 request.getsession true invalidate 清空session cookie cookie request.getcookies 0 獲取cookie cookie.setmaxage 0 讓cookie過期 request.getse...