修复linux bash的ShellShock系列漏洞

检查是否有 linux bash的ShellShock系列漏洞

ShellShock系列漏洞包含有

CVE-2014-6271

CVE-2014-7169

CVE-2014-7186

CVE-2014-7187

CVE-2014-6277

CVE-2014-6278

 

检查是否有ShellShock系列漏洞

wget --no-check-certificate  https://github.com/hannob/bashcheck/raw/master/bashcheck;sh bashcheck

有漏洞显示为

shellshock20141011151023

 

检查方式任选1

检查方式1

在 bash 中输入如下命令可以检测是否受影响:如果显示You are vulnerable,很遗憾,必须立即打上安全补丁修复

env t='() { :;}; echo You are vulnerable.' bash -c "true"

检查方式2

在 bash 中输入如下命令可以检测是否受影响:如输出 vulnerable,很遗憾,必须立即打上安全补丁修复

env x='() { :;}; echo vulnerable' bash -c "echo this is a test"

 

修复bash ShellShock系列漏洞

包管理器更新bash版本即可

yum -y update bash;/sbin/ldconfig;rpm -qa -changelog bash  | grep "2014"

修复后检查

sh bashcheck

 

shellshock20141011151102

参考

Bash Code Injection Vulnerability via Specially Crafted Environment Variables (CVE-2014-6271)

Resolution for Bash Code Injection Vulnerability via Specially Crafted Environment Variables (CVE-2014-6271) in Red Hat Enterprise Linux

CVE-2014-6271: remote code execution through bash

Bash 远程任意代码执行安全漏洞(最严重漏洞)

发表回复