免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: ztj2247
打印 上一主题 下一主题

LINUX 普通用户提权ROOT (完整版)SHELL版首发!!! [复制链接]

论坛徽章:
0
11 [报告]
发表于 2009-04-25 18:01 |只看该作者
原帖由 greendays 于 2009-4-25 17:44 发表
我的系统测试也没有通过。红帽企业版5.1的。
bash-3.1$ id
uid=5501(test) gid=5501(test) groups=5501(test)
bash-3.1$ cat /proc/net/netlink
sk       Eth Pid    Groups   Rmem     Wmem     Dump      ...



一看你就没仔细看 我发的内容 A 是有内容滴  你连文件都没找到

论坛徽章:
0
12 [报告]
发表于 2009-04-25 18:02 |只看该作者
原帖由 枫影谁用了 于 2009-4-25 17:22 发表
另外方法也不完全,随便个用户就ok...

也不用跟什么test用户。。随便 sh a 11111111
随意数字都可以。


随便跟111 就行? 实验过?

[ 本帖最后由 ztj2247 于 2009-4-25 18:05 编辑 ]

论坛徽章:
0
13 [报告]
发表于 2009-04-25 18:54 |只看该作者
测试了好几台,都没有通过,一样的报错
as4  as 5
[test@localhost ~]$ ps aux |grep udev
root       469  0.0  0.0   2660  1136 ?        S<s  Apr16   0:00 /sbin/udevd -d
test     12770  0.0  0.0   4996   684 pts/0    S+   18:53   0:00 grep udev
[test@localhost ~]$ sh a 468
a: line 1: syntax error near unexpected token `<'
a: line 1: `<html><head><title>Linux Kernel 2.6 UDEV Local Privilege Escalation Exploit</title></head><pre>#!/bin/sh'
[test@localhost ~]$ id
uid=501(test) gid=501(test) groups=501(test) context=root:system_r:unconfined_t:s0-s0:c0.c1023

论坛徽章:
0
14 [报告]
发表于 2009-04-25 19:06 |只看该作者

回复 #1 ztj2247 的帖子

另一台as5测试通过,可以提升权限。。

[test2@localhost ~]$ ps aux |grep udev
root       533  0.0  0.0   2380   808 ?        S<s  Jan08   0:00 /sbin/udevd -d
test2    16111  0.0  0.0   1808   528 pts/0    S+   19:05   0:00 grep udev
[test2@localhost ~]$ sh a 532
suid.c: In function 'main':
suid.c:3: warning: incompatible implicit declaration of built-in function 'execl'
/usr/bin/ld: cannot open output file /tmp/suid: Permission denied
collect2: ld returned 1 exit status

sh-3.1#
sh-3.1#
sh-3.1#
sh-3.1# id
uid=0(root) gid=0(root) groups=500(test2)

论坛徽章:
0
15 [报告]
发表于 2009-04-25 19:44 |只看该作者

刚刚没有看清楚,现在测试通过,红帽5.1上也有这个bug .

[test@Greendays ~]$ id
uid=5514(test) gid=5514(test) groups=5514(test)
[test@Greendays ~]$ cat /proc/net/netlink
sk       Eth Pid    Groups   Rmem     Wmem     Dump     Locks
c0c94a00 0   0      00000000 0        0        00000000 2
ed5e8000 0   2960   00000111 0        0        00000000 2
c0384200 6   0      00000000 0        0        00000000 2
c0e35600 7   0      00000000 0        0        00000000 2
ed5e1c00 9   1974   00000000 0        0        00000000 2
ed79e000 9   0      00000000 0        0        00000000 2
c07fea00 10  0      00000000 0        0        00000000 2
c0c62200 11  0      00000000 0        0        00000000 2
c0d1ac00 12  0      00000000 0        0        00000000 2
c0d94000 15  447    ffffffff 0        0        00000000 2
c0c94800 15  0      00000000 0        0        00000000 2
c0c62000 16  0      00000000 0        0        00000000 2
c03f9800 18  0      00000000 0        0        00000000 2
[test@Greendays ~]$ ps aux | grep udev
root       448  0.0  0.0   2416   892 ?        S<s  Apr23   0:00 /sbin/udevd -d
test     18146  0.0  0.0   3912   792 pts/1    S+   19:43   0:00 grep udev
[test@Greendays ~]$ id
uid=5514(test) gid=5514(test) groups=5514(test)
[test@Greendays ~]$ sh a 447
suid.c: In function ‘main’:
suid.c:3: warning: incompatible implicit declaration of built-in function ‘execl’
sh-3.1$ id
uid=5514(test) gid=5514(test) groups=5514(test)

sh-3.1$ sh a 447
suid.c: In function ‘main’:
suid.c:3: warning: incompatible implicit declaration of built-in function ‘execl’
sh-3.1# id   (大变脸!!)
uid=0(root) gid=0(root) groups=5514(test)
sh-3.1# uname  -rp
2.6.18-53.el5xen athlon
sh-3.1# cat /etc/issue | head -n 1
Red Hat Enterprise Linux Server release 5.1 (Tikanga)


[ 本帖最后由 greendays 于 2009-4-25 19:50 编辑 ]

论坛徽章:
0
16 [报告]
发表于 2009-04-25 20:38 |只看该作者

回复 #12 ztj2247 的帖子 随便跟111 就行? 实验过?

[Tim@Greendays ~]$ whoami
Tim
[Tim@Greendays ~]$ id
uid=5515(Tim) gid=5515(Tim) groups=5515(Tim)
[Tim@Greendays ~]$ sh a 111111111111111
/usr/bin/ld: cannot open output file /tmp/udev: Permission denied
collect2: ld returned 1 exit status
suid.c: In function ‘main’:
suid.c:3: warning: incompatible implicit declaration of built-in function ‘execl’
/usr/bin/ld: cannot open output file /tmp/suid: Permission denied
collect2: ld returned 1 exit status
cp: cannot create regular file `/tmp/libno_ex.so.1.0': Permission denied
sh-3.1# id
uid=0(root) gid=0(root) groups=5515(Tim)

[ 本帖最后由 greendays 于 2009-4-25 20:55 编辑 ]

论坛徽章:
0
17 [报告]
发表于 2009-04-25 20:48 |只看该作者
原帖由 枫影谁用了 于 2009-4-25 17:22 发表
另外方法也不完全,随便个用户就ok...

也不用跟什么test用户。。随便 sh a 11111111
随意数字都可以。


哥们你说的对,实验过了。

论坛徽章:
0
18 [报告]
发表于 2009-04-25 21:03 |只看该作者
[test@localhost ~]$ sh a 982y3098yasdfasdfasdf
suid.c: In function 'main':
suid.c:3: warning: incompatible implicit declaration of built-in function 'execl'
/usr/bin/ld: cannot open output file /tmp/suid: Permission denied
collect2: ld returned 1 exit status
sh-3.1#

论坛徽章:
0
19 [报告]
发表于 2009-04-25 21:09 |只看该作者
确实能够提升权限

但是,我升级一下系统后,就不能提升权限了

论坛徽章:
0
20 [报告]
发表于 2009-04-25 23:14 |只看该作者

回复 #19 springwind426 的帖子

怎么升级?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP