ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Bash漏洞检测及解决方案

Bash漏洞检测及解决方案

原创 Linux操作系统 作者:xikunyun 时间:2020-12-23 12:31:25 0 删除 编辑

一、检测方法

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

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


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69971605/viewspace-2744627/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
西昆云 计算服务器提供商

注册时间:2020-04-17

  • 博文量
    36
  • 访问量
    38974