多语言展示
当前在线:452今日阅读:2今日分享:38

Bash漏洞检测及解决方案

Bash漏洞检测及解决方案
工具/原料
1

小鸟云服务器

2

已连接网络的电脑

方法/步骤
1

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

2

2.debian、ubuntu运行命令:$ sudo   env x='() { :;}; echo vulnerable' bash -c 'echo this is a test'如果返回以下内容:则请尽快升级。vulnerablethis is test

3

二、解决方案--升级bash1、redhat、centos运行:#yum   clean  all#yum   -y  update  bash

4

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

5

最后测试(以ubuntu为例):test@bogon:~$ sudo env x='() { :;}; echo vulnerable' bash -c 'echo this is test'bash: warning: x: ignoring function definition attemptbash: error importing function definition for `x'this is test返回以上内容表示已升级成功

推荐信息