bash shell漏洞及测试

1.bash shell是大多数linux发行版本的默认shell命令解释器,但是最近爆出bash shell存在漏洞。

2.如果Bash是默认的系统shell,网络攻击者可以通过发送Web请求、secure shell、telnet会话或其它使用Bash执行脚本的程序攻击服务器和其它Unix和Linux设备。该漏洞在影响范围上与Heartbleed漏洞相当,在危险程度上也许没有Heartbleed高。

3.漏洞影响GNU Bash v1.14到v4.3,主要Linux发行版如Red Hat Enterprise Linux (v4到7)、Fedora、CentOS、Ubuntu和Debian都已经发布了补丁。但补丁尚未完全修复问题。你可以输入命令env x='() { :;}; echo vulnerable' bash -c "echo this is a test"测试你的系统是否存在漏洞,如果存在漏洞会返回“vulnerable this is a test”。

4.自己测试如下,可惜的是我的机器也存在漏洞,因为我的bash版本是4.1.2:

[tansheng@localhost ~]$ env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
vulnerable
this is a test
[tansheng@localhost ~]$ /bin/sh --version
GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
[tansheng@localhost ~]$ 
原文地址:https://www.cnblogs.com/ttss/p/4195487.html