(N times) ufida icc website customer service system Arbitrary File Upload Vulnerability

Source: Internet
Author: User
Tags sendmsg

Previous Article:

Ufida icc website Customer Service System Remote Code Execution Vulnerability and repair
Ufida icc website customer service system Arbitrary File Upload Vulnerability
Arbitrary File Upload Vulnerability in the customer service system of ufida icc website

The ufida icc website's customer service system's arbitrary file upload vulnerability has been cracked many times. The last time I tried it, I checked the code and found that there was another place for arbitrary upload. The official repair is indeed incomplete !!
Detailed Description: vulnerability file:/5107/include/sendmsg. class. php


Function saveAttach (){
Global $ errorMsg, $ lang, $ CONFIG, $ COMMON, $ basePath;

If (empty ($ _ FILES ["attach"] ["name"]) return '';

// Generate a message attachment to save the directory. www.2cto.com
$ Path = 'data/leavewordfile/'. date ("Ymd ").'/';
If (! Is_dir ($ CONFIG-> basePath. $ path )){
$ COMMON-> createDir ($ CONFIG-> basePath. $ path );
}

// File name.
$ FileName = date ('ymdhis '). rand (100000,999 999). strrchr ($ _ FILES ['Attach'] ['name'], '.');
$ SysFileName = $ CONFIG-> basePath. $ path. $ fileName;
$ UrlFileName = $ CONFIG-> baseUrl. $ path. $ fileName;

If (! Empty ($ _ FILES ['Attach '] ['name']) {
// Check whether the file is legal when the attachment file is not empty.
If ($ this-> checkFileType (strrchr ($ _ FILES ['Attach '] ['name'],'. ') {
// The attachment file type is invalid //
$ ErrorMsg. = $ lang ['Attach _ type'];
} Else if ($ _ FILES ['Attach '] ['SIZE']> = 5242880 | $ _ FILES ['Attach'] ['SIZE'] <= 0 ){
// The attachment file size is invalid/
$ ErrorMsg. = $ lang ['Attach _ size'];
}
}

// Upload an attachment //
Move_uploaded_file ($ _ FILES ["attach"] ["tmp_name"], $ sysFileName );
Chmod ($ sysFileName, 0444 );
Return $ urlFileName;
}

Not filtered .. As a result, php files can be uploaded directly.

Specific use:

Open: http://www.2cto.com/5107/msg/sendmsg. php attachment where directly transfer php

The uploaded address will be in/data/leavewordfile/date/the file name. php

The file name is displayed immediately. But you can use a tool to guess. Basically, it's just a matter of time!

 


 


Solution: Filter and pull.

I hope I won't try to find your vulnerabilities again ..
Author: ghost Brother

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.