天天看點

搭建Metasploitable靶機搭建Metasploitable靶機

搭建Metasploitable靶機

開始本機下載下傳後來解壓直接報毒,上虛拟機操作(windows10)

https://github.com/rapid7/metasploitable3

下載下傳好壓縮包後通過共享檔案傳到虛拟機上

下載下傳packer(推薦1.35,報錯更換版本)

https://releases.hashicorp.com/packer/

安裝好你想要的版本後将exe檔案放在想要的地方,然後添加上環境變量

搭建Metasploitable靶機搭建Metasploitable靶機

例如虛拟機中是如下位置

在環境變量path裡添加上即可

搭建Metasploitable靶機搭建Metasploitable靶機

然後cmd packer -version

搭建Metasploitable靶機搭建Metasploitable靶機

出現版本号即可

接着安裝Vagrant(推薦2.1.0,如果有問題同理)和vagrant-reload,把下載下傳下來的msi檔案輕按兩下運作就可以,安裝完成後電腦會自動重新開機

https://www.vagrantup.com/downloads

搭建Metasploitable靶機搭建Metasploitable靶機
搭建Metasploitable靶機搭建Metasploitable靶機
搭建Metasploitable靶機搭建Metasploitable靶機

直接安裝好在想要的位置即可,安裝好之後yes重新開機一下

然後輸入cmd輸入指令安裝vagrant-reload

vagrant plugin install vagrant-reload

搭建Metasploitable靶機搭建Metasploitable靶機

提示{Installed the plug ‘vagrant-reload (0.0.1)’!},安裝成功,否則請重新輸入上面的指令重新安裝

git以及VMware的安裝就不贅述了,下面開始正式的安裝

使用Packer建構

管理者權限打開Powershell

在Powershell裡面cd到metasploitable3目錄下,輸入

搭建Metasploitable靶機搭建Metasploitable靶機

這裡看自己的位置,cd進去即可

packer build --only=vmware-iso ./packer/templates/windows_2008_r2.json
           

報錯了發現少了個目錄

搭建Metasploitable靶機搭建Metasploitable靶機
搭建Metasploitable靶機搭建Metasploitable靶機

運作後發現還是報錯,是沒安裝虛拟機導緻的,因為這是我的一台全新虛拟機

在虛拟機安裝好後再運作上面的指令

失敗了

然後搞來了網上的Metasploitable2版本先玩一下

一、需要的工具

1.VM虛拟機,其他虛拟機也可以

2.Metasploitable2 下載下傳位址:https://sourceforge.net/projects/metasploitable/

3、百度雲位址

連結:https://pan.baidu.com/s/1eVUWBkvw0WMYzbplzd74-Q

提取碼:1234

二. 安裝步驟

1、直接解壓到對應檔案夾

2、直接虛拟機打開vmk檔案

搭建Metasploitable靶機搭建Metasploitable靶機

看到這個界面的話就說明我們已經成功安裝了,輸入預設的使用者名和密碼 msfadmin

如下成功登陸:

搭建Metasploitable靶機搭建Metasploitable靶機

輸入ifconfig檢視位址(linux指令)

搭建Metasploitable靶機搭建Metasploitable靶機

接着在同一網段上通路

kali

搭建Metasploitable靶機搭建Metasploitable靶機

windows

搭建Metasploitable靶機搭建Metasploitable靶機

同一網段就其實相當于你所有的虛拟機,會共同處于同一網段,類似于内網中有多台主機了。

如我搭建好的兩台虛拟機

windows:192.168.89.131

搭建Metasploitable靶機搭建Metasploitable靶機

kali linux:192.168.89.130

搭建Metasploitable靶機搭建Metasploitable靶機

至此一個簡陋的内網滲透環境搭建好了

繼續閱讀