0x0:靶場介紹

靶場名稱:DC: 3

靶場發布時間:2019-4-25

靶場地址:https://www.vulnhub.com/entry/dc-32,312/

靶場描述:

DC-3 is another purposely built vulnerable lab with the intent of gaining experience in the world of penetration testing.

As with the previous DC releases, this one is designed with beginners in mind, although this time around, there is only one flag, one entry point and no clues at all.

Linux skills and familiarity with the Linux command line are a must, as is some experience with basic penetration testing tools.

For beginners, Google can be of great assistance, but you can always tweet me at @DCAU7 for assistance to get you going again. But take note: I won't give you the answer, instead, I'll give you an idea about how to move forward.

For those with experience doing CTF and Boot2Root challenges, this probably won't take you long at all (in fact, it could take you less than 20 minutes easily).

If that's the case, and if you want it to be a bit more of a challenge, you can always redo the challenge and explore other ways of gaining root and obtaining the flag.

1x0:環境搭建

使用VMware(NAT)會出現沒有IP的情況,下面使用virtualBox(NAT模式)

在更新完win10最新版本后會出現打開不virtualBox的情況

在安裝目錄中cmd 輸入(就可以解決Hyper-v和vurtualBox共存的情況)

#指定vbox下的虛擬系統開啟這個功能
VBoxManage setextradata "<虛擬機名字>" "VBoxInternal/NEM/UseRing0Runloop" 0
#或指定vbox所有虛擬系統開啟
VBoxManage setextradata global "VBoxInternal/NEM/UseRing0Runloop" 0

2x0:靶機滲透

獲取靶機的IP

nmap -sn 192.168.3.0/24(靶機在virtualbox上,攻擊機在VMware使用橋接網絡)

使用nmap來查看靶機的端口信息和系統信息等等

首先去查看80端口的web服務

沒有什么明顯的信息使用dirb掃描一下目錄

掃描到后臺地址:http://192.168.3.30/administrator/

看見就知道是joomla的cms,但是版本沒有辦法判斷,在嘗試一下說明文件README.txt 發現版本說明

在kali中去搜索joomla 3.7的漏洞

sql注入

漏洞點地址:http://192.168.3.30/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml%27

單引號嘗試:存在sql注入

sqlmap 走起!

跑數據 格式有點問題。

獲取到管理員加密后的密碼

$2y$10$DpfpYjADpejngxNh9GnmCeyIHCWpL97CVRnGeZsVJwR0kWFlfB1Zu

使用john 來破解

john pwd --wordlist=/usr/share/wordlist/rockyou.txt (我直接出來了密碼)

admin/snoopy 登錄后臺

3x0:后臺篇

在后臺查找一番發現 類似于模板的頁面

可以利用模板的信息

在結合上面的端口信息沒有ssh應該是從web端進入 webshell? 來嘗試一下

直接創建一個php的文件msf的反彈shell (可以使用msf來接接收,我使用nc)

要選擇這個模板

反彈shell

地址:http://192.168.3.30//templates/protostar//A1.php(地址找半天)

在做靶機的時候,我的終端出現一些問題,不能用python升級

我也不知道為什么。。。就接著用了

4x0:提權篇

查看系統的內核版本

啟動kali上的apache,把exp上傳到服務器

把exp下載到靶機

解壓exp

授權腳本

使用exp

報錯不影響使用

獲取到root權限

5x0:flag獲得