| 关键词: sudo 漏洞 pwfeedback 版本 Linux 1.8 terminal 权限 version |
2020年1月30号,sudo官网爆出目前sudo工具的一个高危漏洞,漏洞编号为:CVE-2019-18634,黑客可通过工具获得Linux的root权限(root具有Linux操作系统的最高权限)。 Linux 漏洞 sudo 是Unix和Linux操作系统广泛使用的工具,这次漏洞是一个是一个堆栈缓冲溢出 bug,这个漏洞在启用了 pwfeedback 的系统中很容易利用,该漏洞让非特权用户很容易通过缓冲溢出获得 root 权限,不需要攻击者有 Sudo 使用权限。 在 Sudo 上游版本中,pwfeedback 没有默认启用,但在下游发行版如 Linux Mint 和 Elementary OS 中,pwfeedback 被默认启用了。主要影响的版本:从v1.7.1 到 1.8.25p1,ubuntu版本不受该漏洞影响,最新的1.8.31已修复了该漏洞,请大家及时更新到最新的版本。 ![]() 1.查看自己系统是否存在该漏洞1、先通过sudo --version命令查看当前sudo的版本信息。 2、通过sudo -l查看 pwfeedback是否启用,如果存在pwfeedback字样则说明已启用否则没有; 2.如何利用该漏洞1、在1.8.26之前的版本 利用该漏洞,不需要登录的用户有sudo权限,可以利用无法写入的伪终端,向sudo -k 传入超长字符串。原文为:The bug can be reproduced by passing a large input with embedded terminal kill characters to sudo from a pseudo-terminal that cannot be written to. 2.在1.8.26之后的版本,只要向sudo 传输一个超长字符串 For sudo versions prior to 1.8.26, and on systems with uni-directional pipes, reproducing the bug is simpler. Here, the terminal kill character is set to the NUL character (0x00) since sudo is not reading from a terminal. This method is not effective in newer versions of sudo due to a change in EOF handling introduced in 1.8.26. 3.解决方法1、临时解决方法: 修改/etc/sudoers 文件,关闭pwfeedback 功能,把该文件中下面这行: 改为 我们检查一下我们系统: 2、彻底解决方法: 升级系统的sudo,升级到最新的版本1.8.31以上即可. 为了保证安全,请大家尽快修复该漏洞! |
| 本文出处: https://www.toutiao.com/i6790201911883596292/ |
|
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系
[邮箱地址] 删除
|