Shell升级,/bin/bash版本号4.1到4.3
bash环境变量存在随意代码运行漏洞:“通过CGI请求方式能够导致远程代码运行,进而导致server被入侵。危害严重。且官方发布补丁也被绕过”,
【漏洞影响】:
1)bash受影响版本号:3.0 ~ 4.3,小于3.0的bash版本号也可能受影响。
2)入侵方式:结合CGI方式能够导致远程代码运行,入侵server。
了解系统当前bash的版本号
[root@image01 ~]# /bin/bash -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>
bash下载地址:http://ftp.gnu.org/gnu/bash/
安装升级bash
wget http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz
tar zxvf bash-4.3.tar.gz
cd bash-4.3
./configure
make
make install
由于bash默认是安装在/usr/local/bin/文件夹下,所以须要创建一个链接到 /bin/文件夹下,安装完成后须要重新启动生效!
mv /bin/bash /bin/bash.bak; ln -s /usr/local/bin/bash /bin/bash
[root@mail ~]# /bin/bash -version
GNU bash, version 4.3.0(1)-release (x86_64-unknown-linux-gnu)
Copyright (C) 2011 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.
Linux Bash严重漏洞修复紧急通知(2014年9月25日更新)
日前Linux官方内置Bash中新发现一个很严重安全漏洞。黑客能够利用该Bash漏洞全然控制目标系统并发起攻击,为了避免您Linuxserver受影响。建议您尽快完毕漏洞修补。修复方法例如以下:
漏洞检測方法
能够使用例如以下命令来检查系统存在此漏洞:
env -i X='() { (a)=>\' bash -c 'echo date'; cat echo
修复前输出:当前系统时间
使用修补方案修复后
date
特别提示:该修复不会有不论什么影响,假设您的脚本使用以上方式定义环境变量,修复后您的脚本运行会报错。
输出结果中包括date字符串就修复成功了。
修补方案
centos:
yum clean all
yum makecache
yum -y update bash
ubuntu:
apt-cache gencaches
apt-get -y install --only-upgrade bash
debian 7.5 64bit && 32bit :
apt-cache gencaches
apt-get -y install --only-upgrade bash
debian 6.0.x 64bit
wget http://mirrors.aliyun.com/debian/pool/main/b/bash/bash_4.1-3+deb6u2_amd64.deb && dpkg -i bash_4.1-3+deb6u2_amd64.deb
debian 6.0.x 32bit
wget http://mirrors.aliyun.com/debian/pool/main/b/bash/bash_4.1-3+deb6u2_i386.deb && dpkg -i bash_4.1-3+deb6u2_i386.deb
opensuse:
13.1 64bit
wget http://mirrors.aliyun.com/fix_stuff/bash-4.2-68.4.1.x86_64.rpm && rpm -Uvh bash-4.2-68.4.1.x86_64.rpm 13.1 32bit
wget http://mirrors.aliyun.com/fix_stuff/bash-4.2-68.4.1.i586.rpm && rpm -Uvh bash-4.2-68.4.1.i586.rpm
aliyun linux:
5.x 64bit
wget http://mirrors.aliyun.com/centos/5/updates/x86_64/RPMS/bash-3.2-33.el5.1.x86_64.rpm && rpm -Uvh bash-3.2-33.el5.1.x86_64.rpm 5.x 32bit
wget http://mirrors.aliyun.com/centos/5/updates/i386/RPMS/bash-3.2-33.el5.1.i386.rpm && rpm -Uvh bash-3.2-33.el5.1.i386.rpm
Shell升级,/bin/bash版本号4.1到4.3的更多相关文章
- 【解决】org.apache.hadoop.util.Shell$ExitCodeException: /bin/bash: line 0: fg: no job control
[环境信息] Hadoop版本:2.4.0 客户端OS:Windows Server 2008 R2 服务器端OS:CentOS 6.4 [问题现象] 在通过Windows客户端向Linux服务器提交 ...
- CentOS6 Shell脚本/bin/bash^M: bad interpreter错误解决方法
在windows下保存了一个脚本文件,用ssh上传到centos,添加权限执行nginx提示没有那个文件或目录.shell脚本放到/etc/init.d/目录下,再执行/etc/init.d/ngin ...
- Linux - Shell - #!/bin/bash
概述 简单解释一下 shell 脚本卡头的 #!/bin/bash 水一篇, 少一篇 背景 shell 脚本中的注释 通常是 以# 卡头的行 但是有时候执行 shell 的时候, 会有这种内容 #!/ ...
- /bin/bash: line 0: fg: no job control一般解决方法
測试版本号:CDH5.0,(Hadoop2.3) 在使用windows调用Hadoop yarn平台的时候,一般都会遇到例如以下的错误: 2014-05-28 17:32:19,761 WARN or ...
- 远程ssh登陆时报错:/bin/bash: Permission denied
远程普通用户ssh登录时,提示/bin/bash: Permission denied,用户名mas,密码正确. 首先上个图,用户远程登录步骤,转自http://www.tldp.org/LDP/LG ...
- 在使用windows调用Hadoop 错误 /bin/bash: line 0: fg: no job control一般解决方法
在使用windows调用Hadoop yarn平台的时候,一般都会遇到如下的错误: 2014-05-28 17:32:19,761 WARN org.apache.hadoop.yarn.server ...
- linux shell中的 #!/bin/bash
#!/bin/bash是指此脚本使用/bin/bash来解释执行. 其中,#!是一个特殊的表示符,其后,跟着解释此脚本的shell路径. bash只是shell的一种,还有很多其它shell,如:sh ...
- ./ . 和#!/bin/bash 辨析Linux如何选择当前执行脚本的shell
最近遇到一个有趣的问题,让我搞清楚Linux如何选择当前执行脚本的shell 执行cts的的 media stress test 需要安装 android-cts-media-1.0.zip 把这个文 ...
- Shell脚本报错:-bash: ./switch.sh: /bin/bash^M: bad interpreter: No such file or directory
在学习shell中测试case参数命令代码如下 #!/bin/bash #switch测试 case $1 in start) echo 'start' ;; ...
随机推荐
- PHP中的魔术方法和关键字
PHP中的魔术方法总结 :__construct, __destruct , __call, __callStatic,__get, __set, __isset, __unset , __sleep ...
- js完成密码输入为空,和两次输入不一致
<!DOCTYPE html><html><body> <script language="javascript"> functio ...
- C# 中DateTime的各种使用
获得当前系统时间: DateTime dt = DateTime.Now; Environment.TickCount可以得到“系统启动到现在”的毫秒值 DateTime now = DateTime ...
- Mysql查询语句的运行流程
我们先看一下MYsql的基本架构示意图: 大体来说,MySQL 可以分为 Server 层和存储引擎层两部分. Server 层包括连接器.查询缓存.分析器.优化器.执行器等,涵盖 MySQL 的大多 ...
- css3 box-sizing属性值详解
box-sizing属性可以为三个值之一:content-box(default),border-box,padding-box. content-box,border和padding不计算入widt ...
- Codeforces Round #285 (Div. 1) B - Misha and Permutations Summation 康拓展开+平衡树
思路:很裸的康拓展开.. 我的平衡树居然跑的比树状数组+二分还慢.. #include<bits/stdc++.h> #define LL long long #define fi fir ...
- Java 如何调用 oracle 的存储过程
通过命令行创建存储过程 create or replace procedure emp_sal(eno emp.empno%type,esal out emp.sal%type) as begin s ...
- Vibrator震动
今天又学一招: Android手机中的震动由Vibrator实现.设置震动事件,需要知道其震动的时间长短.震动的周期等. 在 Android Vibrator中,震动的时间以毫秒计算(1/1000秒) ...
- MySQL几个特别语法示例
简单介绍MySQL中几种特殊语法的用法: 1.创建示例用表和数据: 创建employees表[注:与SQL Server示例数据库Northwind中的表employees相同的表结构]: CREAT ...
- web学习测试环境
ref:https://www.owasp.org/index.php/OWASP_Vulnerable_Web_Applications_Directory_Project/Pages/Offlin ...