Linux 系统 Bash 漏洞修复方法
Linux官方内置Bash中新发现一个非常严重安全漏洞(点击查看漏洞参考),黑客可以利用该Bash漏洞完全控制目标系统并发起攻击。建议各位Linux使用者尽快修复这个漏洞!
受影响的系统
- CentOS
- Debian
- Redhat
- Ubuntu
检测方法
使用此命令:
env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
若输出
vulnerable
this is a test
则表示存在此漏洞。
修复后则会输出
bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x'
this is a test
解决方案
红帽系
可通过更新 bash 并重启系统来解决这个问题:
yum update bash
更新后需要重启。
Ubuntu
apt-get update
apt-get install bash
Ubuntu 无需重启。
All good