相关文章

Bash漏洞检测及解决方案

2019-05-27 07:02:52 4808

一、检测方法

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 运行:

#yum clean all
#yum -y update bash

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

最后测试(以ubuntu为例):

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

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


提交成功!非常感谢您的反馈,我们会继续努力做到更好!

这条文档是否有帮助解决问题?

非常抱歉未能帮助到您。为了给您提供更好的服务,我们很需要您进一步的反馈信息:

在文档使用中是否遇到以下问题: