Linux 再爆提权漏洞

10 十二
2010
# 作者: riku / 本文采用CC BY-NC-SA 2.5协议授权,转载请注明本文链接

原文来自于 Vpsee: 利用 Linux 内核的多个安全漏洞获得 root 权限

系统安全高手 Dan Rosenberg 发布了一段 C 程序,这段200多行的程序利用了 Linux Econet 协议的3个安全漏洞,可以导致本地帐号对系统进行拒绝服务或特权提升,也就是说一个普通用户可以通过运行这段程序后轻松获得 root shell,以下在 update 过的 Ubuntu 10.04 Server LTS 上测试通过:

$ sudo apt-get update
$ sudo apt-get upgrade
$ uname -r
2.6.32-21-server
$ gcc full-nelson.c -o full-nelson
$ ./full-nelson
[*] Resolving kernel addresses...
[+] Resolved econet_ioctl to 0xffffffffa0131510
[+] Resolved econet_ops to 0xffffffffa0131600
[+] Resolved commit_creds to 0xffffffff8108b820
[+] Resolved prepare_kernel_cred to 0xffffffff8108bc00
[*] Calculating target...
[*] Failed to set Econet address.
[*] Triggering payload...
[*] Got root!
#

由于 RHEL/CentOS 默认不支持 Econet 协议,所以测试没有通过:

# yum update
$ uname -r
2.6.18-194.26.1.el5
$ gcc full-nelson.c -o full-nelson
$ ./full-nelson
[*] Failed to open file descriptors.

如果在企业环境用 Ubuntu 的话可能会比较杯具了,几百个帐号里总可以找到一两个帐号被内部或外部人员通过上面这段程序拿到 root,这对服务器的危害是毁灭性的。前天还在说 Ubuntu 在内核方面无作为,现在想起来还有点后怕。VPSee 提醒正在使用多个普通帐号登录 Ubuntu VPS 的朋友及时升级或打内核补丁,出售 VPN/SSH 帐号、提供免费 SSH 的商家尤其要小心 “客户” 捣乱,使用其他 Linux 发行版的朋友也最好检查一下自己的 VPS 有没有这些高危漏洞。

PS:另外,我在 Ubuntu 10.10 , Ubuntu 11.04 及一台 ArchLinux VPS 上分别进行了测试, 10.10 和 ArchLinux 提权失败,而 11.04 则提权成功。

PS2: Ubuntu 已修复此漏洞,请尽快更新你的系统。

作者:riku

Bio: 关注新网络、Web2.0、移动应用;Nexus S/Andorid,iPad,FreeBSD,Ubuntu 用户;伪设计师,好推墙运动。
链接:Blog - Twitter - Facebook - 此作者的更多文章

16 Responses to Linux 再爆提权漏洞

Avatar

YOTERYE

Firefox 3.6.10 Firefox 3.6.10 Ubuntu 10.10 Ubuntu 10.10

十二月 10th, 2010 at 9:51 上午

毕竟经济实力没有RH强大。。。所以总归会有欠人意的地方

[Reply]

Avatar

Leos

Google Chrome 9.0.597.10 Google Chrome 9.0.597.10 GNU/Linux GNU/Linux

十二月 10th, 2010 at 9:57 上午

Linux leos-desktop 2.6.32-26-generic #48-Ubuntu SMP Wed Nov 24 09:00:03 UTC 2010 i686 GNU/Linux
Ubuntu10.04

leos@leos-desktop:~ $ ./a.out
[*] Resolving kernel addresses...
[+] Resolved econet_ioctl to 0xfd023350
[+] Resolved econet_ops to 0xfd023440
[+] Resolved commit_creds to 0xc016e080
[+] Resolved prepare_kernel_cred to 0xc016e3c0
[*] Calculating target...
[*] Triggering payload...
[*] Exploit failed to get root.
leos@leos-desktop:~ $

Linux leos-laptop 2.6.35-23-generic #41-Ubuntu SMP Wed Nov 24 10:18:49 UTC 2010 i686 GNU/Linux
ubuntu10.10

leos@leos-laptop:~$ ./a.out
[*] Resolving kernel addresses...
[+] Resolved econet_ioctl to 0xf8701340
[+] Resolved econet_ops to 0xf8701440
[+] Resolved commit_creds to 0xc016c8d0
[+] Resolved prepare_kernel_cred to 0xc016cd20
[*] Calculating target...
[*] Triggering payload...
[*] Exploit failed to get root.
leos@leos-laptop:~$

[Reply]

Avatar

shily

Google Chrome 6.0.472.55 Google Chrome 6.0.472.55 GNU/Linux GNU/Linux

十二月 10th, 2010 at 10:33 上午

shily@5M1SQ2X:~$lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid
shily@5M1SQ2X:~$cc -o root root.c
shily@5M1SQ2X:~$./root
[*] Resolving kernel addresses...
[+] Resolved econet_ioctl to 0xf8188350
[+] Resolved econet_ops to 0xf8188440
[+] Resolved commit_creds to 0xc016e080
[+] Resolved prepare_kernel_cred to 0xc016e3c0
[*] Calculating target...
[*] Failed to set Econet address.
[*] Triggering payload...
[*] Exploit failed to get root.

没有成功,:)

[Reply]

Google Chrome 6.0.472.55 Google Chrome 6.0.472.55 GNU/Linux GNU/Linux

shily Reply:

@shily,

shily@5M1SQ2X:~$ uname -r
2.6.32-26-generic

[Reply]

Google Chrome 9.0.597.10 Google Chrome 9.0.597.10 GNU/Linux GNU/Linux

riku Reply:

@shily, 看来 10.04 已经修复此漏洞了。

[Reply]

Avatar

coreyu

Chromium 9.0.575.0 Chromium 9.0.575.0 Ubuntu 10.04 Ubuntu 10.04

十二月 10th, 2010 at 10:44 上午

[*] Resolving kernel addresses...
[+] Resolved econet_ioctl to 0xfafea2d0
[+] Resolved econet_ops to 0xfafea3c0
[+] Resolved commit_creds to 0xc016dcc0
[+] Resolved prepare_kernel_cred to 0xc016e000
[*] Calculating target...
[*] Triggering payload...
[*] Got root!
sh-4.1# ls
ubuntu 10.04.1,看来是真的,做服务器的话还是把GCC灭了好

[Reply]

Avatar

darkkgg

Google Chrome 8.0.552.215 Google Chrome 8.0.552.215 GNU/Linux GNU/Linux

十二月 10th, 2010 at 11:00 上午

昨天或者今天的安全更新已经修复了...

[Reply]

Avatar

lh

Firefox 3.6.12 Firefox 3.6.12 GNU/Linux GNU/Linux

十二月 10th, 2010 at 12:42 下午

archlinux失败,自己编译内核的话是不是没有这个问题。

[Reply]

Avatar

vmlinz

Google Chrome 9.0.597.10 Google Chrome 9.0.597.10 GNU/Linux x64 GNU/Linux x64

十二月 10th, 2010 at 1:42 下午

这个既然是内核协议的漏洞,那和ubuntu发行商有什么关系。。。
再说它的内核应该是上游debian的内核。ubuntu的内核把需要的模块都打开了,所以有漏洞的机会也大些。

[Reply]

Avatar

happyaron

Firefox 4.0b8pre Firefox 4.0b8pre GNU/Linux GNU/Linux

十二月 10th, 2010 at 5:45 下午

Ubuntu kernel 2.6.37-8-generic 不受影响,但是漏洞利用程序本身会出现 Uninterruptable 的问题。

[Reply]

Avatar

Mucid

Firefox 3.6.12 Firefox 3.6.12 Ubuntu 10.10 Ubuntu 10.10

十二月 10th, 2010 at 7:06 下午

呐,我还是不试了……

[Reply]

Avatar

fanhe

Firefox 3.6.12 Firefox 3.6.12 Ubuntu 10.04 Ubuntu 10.04

十二月 10th, 2010 at 8:23 下午

我自编译内核有这个问题……
看来得把这个协议干掉

[Reply]

Avatar

fanhe

Firefox 3.6.12 Firefox 3.6.12 Ubuntu 10.04 Ubuntu 10.04

十二月 10th, 2010 at 8:38 下午

是econet模块的问题,我特意打开内核配置看了看,这个模块本来就标记着“试验”
安全的做法是肯定不会编译这个模块的,我blacklist econet后就没问题了

[Reply]

Avatar

zach

Google Chrome 8.0.552.215 Google Chrome 8.0.552.215 GNU/Linux GNU/Linux

十二月 10th, 2010 at 9:30 下午

看到arch不能被提权感到很欣慰 ~^-^~

[Reply]

Avatar

夏客行 » Linux 再爆提权漏洞

WordPress 3.0.1 WordPress 3.0.1

十二月 13th, 2010 at 3:16 下午

[...] 本文采用CC协议进行授权,转载本文请注明本文链接。/ 9 分类: Ubuntu 标签: 评论 (0) [...]

Avatar

simonsun007

Firefox 3.6.12 Firefox 3.6.12 openSUSE openSUSE

十二月 14th, 2010 at 5:52 下午

opensuse 11.3 测试报告:

simonsun@linux-czxp:~/桌面> uname -ra
Linux linux-czxp.site 2.6.34-12-desktop #1 SMP PREEMPT 2010-06-29 02:39:08 +0200 i686 i686 i386 GNU/Linux
simonsun@linux-czxp:~/桌面> vim full-nelson.c
simonsun@linux-czxp:~/桌面> vim full-nelson.c
simonsun@linux-czxp:~/桌面> gcc full-nelson.c -o full-nelson
simonsun@linux-czxp:~/桌面> ./full-nelson
[*] Failed to open file descriptors.

[Reply]

Comment Form

top

无觅相关文章插件,快速提升流量