Proving Grounds Play : Dawn Walkthrough
Proving Grounds Play : Dawn Walkthrough
Foothold :
- SMB 發現可以寫入與枚舉到使用者帳號,但後續沒有甚麼用,主要是發現 ITDEPT 路徑
- 80 Web 發現 management.log 會定期執行 /bin/sh -c /home/dawn/ITDEPT/product-control
- 這個路徑在 ITDEPT 底下就是 SMB 的路徑但沒有找到 product-control 檔案
- 自己做一個 product-control 檔案寫入 RM Reverse Shell 指令再透過 SMB 上傳
- 等一會後直接拿到 Reverse Shell
PE :
- SUID 發現 zsh 可以利用,直接利用後成功 root
Rustscan,└─$ rustscan -a 192.168.151.11 --scripts none --ulimit 5000 | tee rustscan
snmp,└─$ sudo nmap -sU -p 161 192.168.151.11 | tee snmp
nmap
MySQL 測試常用密碼失敗
enum4linux,└─$ enum4linux -a 192.168.151.11 | tee enum4linux
有個資料夾 ITDEPT
沒舉出兩個使用者帳號 dawn、ganimedes
└─$ smbclient \\\\192.168.151.11\\ITDEPT,寫入 test.txt 成功
crackmapexec └─$ crackmapexec smb 192.168.151.11 -u ./usernames.txt -p ./passwords.txt
找到一個憑證 dawn:dawn
80 /
80 /robots.txt
80 /test.txtgobuster 80 /
80 /logs
management.log 看到每分鐘會去執行
/bin/sh -c /home/dawn/ITDEPT/product-control
/bin/sh -c /home/dawn/ITDEPT/web-control
使用 rm 建立 Reverse Shell 建立 product-control 檔案
SMB 上傳 product-control
4444 Reverse Shell 進來了
cat /etc/passwd
cat /etc/crontab
sudo -l
參考 GTFO MySQL sudo 指令
執行之後失敗
SUID check 發現 zsh
參考 GTFO
直接執行成功 root
留言
張貼留言