Arbitrary File Upload Vulnerability and repair in ruankosoft

Source: Internet
Author: User

The Arbitrary File Upload Vulnerability in ruankosoft can cause the shell to be uploaded, and the security configuration of the server in the service area is also very difficult. The root permission only controls the upload type through js during the upload, the server does not control or judge the file extension $ (document ). ready (function () {document. getElementById ("logo "). focus (); $ ("# uploadify "). uploadify ({'uploader ':' http://coolteam.ruanko.com:80/resources/uploadify.swf ', 'Script ':' http://coolteam.ruanko.com:80//doUpLoadToTemp.jsp ', 'Method': 'get', 'cancelim ':' http://coolteam.ruanko.com:80/resources/images/cancel.png ', 'Folder': 'uploads', 'buttonimg ':' http://coolteam.ruanko.com:80/resources/images/liulan.png ', 'Width': 63, 'height': 18, 'queueid': 'filequeue', 'auto': true, www.2cto.com 'multi': false, 'sizelimmit ': 409600, 'text ':'*. jpg ;*. jpeg ;*. gif ;*. bmp ;*. png ', 'filedesc': 'select A jpg jpeg gif bmp png file', 'scriptdata': {'uploadpath': 'uploadtemp', 'upperfilename ':''}, onComplete: function (event, queueID, fileObj, response, data) {var value = response; $ ("# logo "). val (value); document. getElementById ("logo "). focus (); $ ("# uploadify "). uploadifySettings ('scriptdata', {'uploadpath': 'uploadtemp ', 'upperfilename': value }); // $ ("# uploadLogoInfo" pai.html (" "); [here, we can deduce the shell address after upload]}, onError: function (event, queueID, fileObj, errorObj) {if (errorObj.info = 409600) {$ ('# uploadify' + queueID ). append ('file cannot exceed 400k ');}}});


Solution:

The File Upload Vulnerability renames a file on the server action side and controls the File Upload type, removing debugging information on the page. For server security configuration, set tomcat startup permission not to root. The administrator who starts Tomcat to join the www group, so that after Tomcat is started, logs can be written to the logs directory, and the cache is generated in the works directory. All WebApp directory settings cannot be written. For some directories that need to upload images, open the write operation and disable the operation.

Related Article

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.