HackTheBox Jerry:writeup




又是台windows靶機,這次是打 Apache tomcat

nmap

照慣例用nmap掃,發現只開一個8080 port
如果沒找到東西還會再掃所有port 

enter image description here

目錄爆破

拿dirb掃,然後沒有找到任何有用的東西
enter image description here

Research and Enumeration

知道這台機器跑 Apache Tomcat 7.0.88 跟 Apache Coyote 1.1
上網查有沒有公開漏洞
Exploit DB 沒找到什麼可以用的RCE
但看了一下hacktricks (https://book.hacktricks.xyz/network-services-pentesting/pentesting-web/tomcat)
發現有辦法登入Tomcat 的管理介面,就能透過上傳WAR檔放個webshell
enter image description here

管理者帳密爆破

tomcat 使用HTTP basic auth
有個metasploit模組可以用來爆破:
enter image description here
讓它跑一下,就成功猜到帳密了
enter image description here

RCE

登入管理介面後,就能傳webshell達成RCE。
這邊我懶一點,繼續用 metasploit
enter image description here
enter image description here

然後就拿到shell了~ 

enter image description here

開 shell 馬上就是最高權限 

enter image description here

留言

這個網誌中的熱門文章

TOTOLINK N200RE_v5 Telnet Backdoor

我的第一個 CVE