如何修复Debian 6.0 (挤压)上的Shellshock Bash漏洞?
发布于 2014-09-27 07:02:43
我不得不添加LTS存储库来更新Bash,它修复了Debian 6.0 (Squeeze)上的Shellshock漏洞。我希望其他人能发现这个有用的东西:
首先,检查你的机器是否易受攻击。将以下内容剪切/粘贴到命令行:
env x='() { :;}; echo "WARNING: SHELLSHOCK DETECTED"' \
bash --norc -c ':' 2>/dev/null;
如果您得到类似如下的响应:
WARNING: SHELLSHOCK DETECTED
正如我在Squeeze中所做的,您有这个漏洞。您必须将您的存储库更新到LTS版本才能获得更新,方法是在/etc/apt/sources.list
文件中注释掉以'deb‘开头的当前存储库行,然后添加以下内容:
deb http://http.debian.net/debian/ squeeze main contrib non-free
deb-src http://http.debian.net/debian/ squeeze main contrib non-free
deb http://security.debian.org/ squeeze/updates main contrib non-free
deb-src http://security.debian.org/ squeeze/updates main contrib non-free
deb http://http.debian.net/debian squeeze-lts main contrib non-free
deb-src http://http.debian.net/debian squeeze-lts main contrib non-free
现在你应该更新你的本地缓存并安装升级的Bash (他们的服务器现在很慢,因为每个人都在更新,所以为了带宽的原因,只需关闭Bash one ):
apt-get update && apt-get install --only-upgrade bash
您可以稍后进行完整的系统升级。现在运行上面的漏洞检查脚本,您应该不会得到任何文本输出,这意味着您被修补了:)
https://stackoverflow.com/questions/26069490
复制相似问题