# About Me 葉柏毅 Alex Contact: alrex5401@gmail.com Linkedin:https://www.linkedin.com/in/alrex5401/ 虛擬環境建置 --- # Apple M1安裝Kali ## 安裝虛擬機軟體Vmware Fusion 13 個人版,可以免費註冊使用 https://www.vmware.com/products/fusion/fusion-evaluation.html ## 下載Kali 現成VM版,不支援ARM,請下載ISO檔自行安裝 https://www.kali.org/get-kali/#kali-arm kali-linux-2022.3-installer-arm64.iso ## 建立VM主機 請參考原廠教學,但使用默認值(雷:更改CD-Rom driver會卡在找不到光碟機) https://www.kali.org/docs/virtualization/install-vmware-guest-vm/ ## 安裝Kali 請參考原廠教學 https://www.kali.org/docs/installation/hard-disk-install/ 記得安裝Vmware tools https://www.kali.org/docs/virtualization/install-vmware-guest-tools/ # Window版Workstation Player和Kali安裝 ## 1.Download VMware Workstation Player https://www.vmware.com/tw/products/workstation-player/workstation-player-evaluation.html ![](https://i.imgur.com/ErB9Gjc.png) ## 2.安裝VMWare Player(需重啟作業系統) ![](https://i.imgur.com/LuRGWFX.png) ![](https://i.imgur.com/kVPvS48.png) *此選項需開啟Windows的Hyper-V功能(裝完需重啟作業系統) ![](https://i.imgur.com/pOgcV4z.png) ![](https://i.imgur.com/83Qt8mV.png) ![](https://i.imgur.com/9jCL8kt.png) ![](https://i.imgur.com/doDFMXR.png) ![](https://i.imgur.com/xcz9IYL.png) *裝完VMWARE需重啟作業系統 ## 3.下載 kali for VMware https://www.kali.org/get-kali/#kali-virtual-machines ![](https://i.imgur.com/VINJvMA.png) ## 4.安裝Kali 從這裡我們需要選擇“Open a Vitual Machine”。然後我們導航到我們的 VM 下載的位置並找到該.vmx文件: ![](https://i.imgur.com/NLsyy5w.png) ![](https://i.imgur.com/3D1z4xy.png) 我們選擇這個然後我們可以繼續前進: ![](https://i.imgur.com/mE7WjE7.png) 若需驗證將在此處設置的設置,或需要更改任何設置,可以先執行”Edit vitual machine settings”。 ![](https://i.imgur.com/YPM8fsD.png) 一旦滿意了,我們就可以選擇啟動虛擬機並正常使用它。請記住,默認登錄用戶為 kali,密碼為 kali 。 ![](https://i.imgur.com/puJhuEm.png) ![](https://i.imgur.com/JBiUVpZ.png) # Windows Docker版Kali安裝 ## 1.下載 Docker Desktop https://www.docker.com/products/docker-desktop ![](https://i.imgur.com/2JD6msS.png) 執行 Docker Desktop Installer.exe 需勾選Install required Windows component for WSL 2 ![](https://i.imgur.com/TUjgYql.png) ![](https://i.imgur.com/RDb8bhp.png) 重新啟動作業系統。 系統重啟後,會出現對話方塊,提示您需先安裝下一步驟下載的WSL2 Linux kernel update再按對話方塊的Restart鍵。 ![](https://i.imgur.com/zTne0cN.png) 安裝WSL2 Linux kernel update https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi ## 2.下載並安裝Git https://git-scm.com/downloads ![](https://i.imgur.com/uWQUrdZ.png) ![](https://i.imgur.com/tl7edbE.png) ## 3.執行 Docker Desktop ![](https://i.imgur.com/hBcJ92I.png) ## 4.下載並執行Kali Linux 下載 GitCMD docker pull iphoneintosh/kali-docker:large ![](https://i.imgur.com/v3l4oyI.png) ![](https://i.imgur.com/HXNnDsk.png) 執行 GitCMD docker run --name my-kali --rm -it -p 9020:8080 -p 9021:5900 iphoneintosh/kali-docker:large ![](https://i.imgur.com/3NsKAkq.png) ## 5.登入Kali Linux https://localhost:9020/vnc.html ![](https://i.imgur.com/Mvmw7aL.png) ![](https://i.imgur.com/5Jlmynt.png) 密碼:changeme ![](https://i.imgur.com/QJCPAUF.png) # Container版OWASP Mutillidae II和WebGoat安裝 ## 1.下載OWASP Mutillidae II GitCmd git clone https://github.com/webpwnized/mutillidae-docker.git 啟動OWASP Mutillidae II 在命令提示字元中輸入 ipconfig 找到乙太網路卡 Ethernet(WSL)的IPv4 Address 如: 10.0.1.2 ![](https://i.imgur.com/sUSAELw.png) 編輯檔案路徑在 使用者/\<UserName\>/mutillidae-docker/docker-compose.yml設定檔 ![](https://i.imgur.com/v8vu0Zy.png) 在WWW的ports啟動參數中加入前步驟取出的IP ports: - 127.0.0.1:80:80 - 127.0.0.1:443:443 - 192.168.1.91:80:80 - 192.168.1.91:443:443 ![](https://i.imgur.com/8LPLs04.png) 在GitCmd命令提示字元中輸入以下指令啟用mutillidae cd mutillidae-docker docker-compose up ![](https://i.imgur.com/gMgo7ho.png) 使用noVNC kali的Firefox測試是否連線成功 ![](https://i.imgur.com/e7PSEKJ.png) ![](https://i.imgur.com/zuV4PQ8.png) 啟用WebServer ![](https://i.imgur.com/Mn5wHJq.png) 檢視 phpMyAdmin: http://127.0.0.1:81/ ![](https://i.imgur.com/hjEQkfZ.png) ## 2.設定OWASP Mutillidae II LDAP 登入LDAP Admin: http://127.0.0.1:82/ 輸入帳號密碼 Login DN: cn=admin,dc=mutillidae,dc=localhost Password: mutillidae 複製GITHUB的LDAP設定檔 https://github.com/webpwnized/mutillidae/tree/master/configuration/openldap 的mutillidae.ldif 匯入mutillidae.ldif設定檔(如果匯入失敗,可以直接貼上文字) ![](https://i.imgur.com/FFKhbBA.png) 檢視LDAP 進入OWASP Mutillidae WWW http://192.168.1.91/ 或http://mutillidae.localhost/ ![](https://i.imgur.com/cyB0lZD.png) ![](https://i.imgur.com/pduhKJY.png) ## 3.下載並執行WebGoat Container GitCmd docker pull webgoat/goatandwolf docker run --name Webgoat -p 192.168.1.91:8080:8080 -p 192.168.1.91:9090:9090 -e TZ=Asia/Taipei webgoat/goatandwolf WebGoat 將位於:http://192.168.1.91:8080/WebGoat WebWolf 將位於:http://192.168.1.91:9090/WebWolf 重要事項: 選擇正確的時區,以便 docker 容器和主機位於同一時區。因為它對於某些練習中使用的JWT令牌的有效性很重要 ![](https://i.imgur.com/d6Tyizj.png) 檢視PORT Windows CMD resmon.exe ![](https://i.imgur.com/n4mlsyq.png) --- ## 4.Standalone 安裝WebGoat WebGoat Standalone 安裝 https://jerrywu-3165.medium.com/security-webgoat-%E5%AE%89%E8%A3%9D-%E6%BC%8F%E6%B4%9E%E6%BC%94%E7%B7%B4-30ea49e15b23 --- # 啟用Ec-council ASPEN 1.至https://aspen.eccouncil.org/ 網站,輸入Subscription Code啟用BTC Lab (*1) to active my . ![](https://i.imgur.com/U2RYrpW.png) 2.檢視MyCourse及BTC LAB. ![](https://i.imgur.com/Lg00waF.png) ![](https://i.imgur.com/WORowRi.png) 3.第一次啟動BTC LAB ,提示您90天內使用BTC LAB ![](https://i.imgur.com/gz8mof6.png) 4.在VMWare的KALI 使用Firefox, 開啟在BTC LAB第一個練習,下載連結檔 ![](https://i.imgur.com/1RI96Bl.png) 5.在VMWare的KALI使用OPENVPN client ![](https://i.imgur.com/7YTc8sr.png) 6.選擇Import a Saved VPN Configuration… ![](https://i.imgur.com/2gUFAiT.png) ![](https://i.imgur.com/StOGVVX.png) 7.儲存 VPN設定並命名為BreakTheCode ![](https://i.imgur.com/xmRFV0e.png) 8.使用 VPN Connection ![](https://i.imgur.com/gmUxFYp.png) 下載Java https://www.oracle.com/java/technologies/downloads/#java11