bash 如何修复 Debian 6.0 (Squeeze) 上的 Shellshock 漏洞?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/26069490/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 11:25:31  来源:igfitidea点击:

How do you fix the Shellshock vulnerability on Debian 6.0 (Squeeze)?

bashshellshock-bash-bug

提问by batflaps

How do you fix the ShellshockBashvulnerability on Debian 6.0(Squeeze)?

如何修复Debian 6.0(Squeeze)上的Shellshock Bash漏洞?

回答by batflaps

I had to add LTS repositories to update Bash which fixes the Shellshock vulnerability on Debian 6.0 (Squeeze). I hope someone else finds this useful:

我不得不添加 LTS 存储库来更新 Bash,它修复了 Debian 6.0 (Squeeze) 上的 Shellshock 漏洞。我希望其他人觉得这很有用:

First, check to see if your box is vulnerable. Cut/paste this to your command line:

首先,检查您的盒子是否易受攻击。将其剪切/粘贴到命令行:

env x='() { :;}; echo "WARNING: SHELLSHOCK DETECTED"' \
bash --norc -c ':' 2>/dev/null;

If you get a response like:

如果您收到如下响应:

WARNING: SHELLSHOCK DETECTED

As I did in Squeeze, you have the vulnerability. You'll have to update your repositories to the LTS version to get the updates, by commenting out your current repository lines starting with 'deb' in your /etc/apt/sources.listfile and then adding these:

正如我在 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

Now you should update your local cache and install the upgraded Bash (their servers are slow now because everyone's updating, so just pull down the Bash one for bandwidth's sake):

现在你应该更新你的本地缓存并安装升级后的 Bash(他们的服务器现在很慢,因为每个人都在更新,所以为了带宽的缘故,只需拉下 Bash 一个):

apt-get update && apt-get install --only-upgrade bash

You can do a full system upgrade later. Now run the vulnerability check script above and you shouldn't get any text output, which means you're patched :)

您可以稍后进行完整的系统升级。现在运行上面的漏洞检查脚本,你不应该得到任何文本输出,这意味着你打了补丁:)