41
Bash漏洞检测及解决方案

一、检测方法

1、redhat、centos 运行命令: $ env x='() { :;}; echo vulnerable' bash -c "echo this is a test"

2.debian、ubuntu 运行命令: $ sudo env x='() { :;}; echo vulnerable' bash -c "echo this is a test"

如果返回以下内容:则请尽快升级。 vulnerable this is test

二、解决方案—升级bash

1、redhat、centos 运行:

1.  #yum clean all
2.  #yum -y update bash

2.debian、ubuntu 运行: $sudo apt-get update $sudo apt-get upgrade

最后测试(以ubuntu为例):

1.  test@bogon:~$ sudo env x="() { :;}; echo vulnerable" bash -c "echo this is test"
2.  bash: warning: x: ignoring function definition attempt
3.  bash: error importing function definition for `x'
4.  this is test

返回以上内容表示已升级成功

 


这条帮助是否解决了您的问题? 已解决 未解决

提交成功!非常感谢您的反馈,我们会继续努力做到更好! 很抱歉未能解决您的疑问。我们已收到您的反馈意见,同时会及时作出反馈处理!