Shell升级 /bin/bash版本4.1到4.3

本文发布时间: 2019-Mar-21
bash环境变量存在任意代码执行漏洞:“通过CGI请求方式可以导致远程代码执行,进而导致服务器被入侵,危害严重,且官方公布补丁也被绕过”,【漏洞影响】:1)bash受影响版本:3.0 ~ 4.3,小于3.0的bash版本也可能受影响,2)入侵方式:结合CGI方式可以导致远程代码执行,入侵服务器;了解系统当前bash的版本[root@image01 ~]# /bin/bash -versionGNU 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/安装升级bashwget http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gztar zxvf bash-4.3.tar.gzcd bash-4.3./configuremakemake install因为bash默认是安装在/usr/local/bin/目录下,所以需要创建一个链接到 /bin/目录下,安装完毕后需要重启生效!mv /bin/bash /bin/bash.bak; ln -s /usr/local/bin/bash /bin/bash[root@mail ~]# /bin/bash -versionGNU 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漏洞完全控制目标系统并发起攻击,为了避免您Linux服务器受影响,建议您尽快完成漏洞修补,修复方法如下:漏洞检测方法可以使用如下命令来检查系统存在此漏洞:env -i X='() { (a)=>\' bash -c 'echo date'; cat echo修复前输出:当前系统时间使用修补方案修复后date特别提示:该修复不会有任何影响,如果您的脚本使用以上方式定义环境变量,修复后您的脚本执行会报错。输出结果中包含date字符串就修复成功了。修补方案centos:yum clean allyum makecacheyum -y update bashubuntu:apt-cache gencachesapt-get -y install --only-upgrade bashdebian 7.5 64bit && 32bit :apt-cache gencachesapt-get -y install --only-upgrade bashdebian 6.0.x 64bitwget http://mirrors.aliyun.com/debian/pool/main/b/bash/bash_4.1-3+deb6u2_amd64.deb && dpkg -i bash_4.1-3+deb6u2_amd64.debdebian 6.0.x 32bitwget http://mirrors.aliyun.com/debian/pool/main/b/bash/bash_4.1-3+deb6u2_i386.deb && dpkg -i bash_4.1-3+deb6u2_i386.debopensuse: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.rpm5.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


(以上内容不代表本站观点。)
---------------------------------
本网站以及域名有仲裁协议。
本網站以及域名有仲裁協議。

2024-Mar-04 02:08pm
栏目列表