A P2P online lending system foreground getshell and Arbitrary File Deletion Vulnerability (may involve a large amount of financial security)

Source: Internet
Author: User

A P2P online lending system foreground getshell and Arbitrary File Deletion Vulnerability (may involve a large amount of financial security)

Boom ~

Detailed description:

/Www/Public/uploadify. php

/* Uploadify background processing * // sets the upload directory error_reporting (E_ALL &~ E_NOTICE &~ E_DEPRECATED); $ path = "uploads /". $ _ GET ['folder']. "/"; if ($ _ GET ['file _ delete']) {// delete if (file_exists ('. '. $ _ GET ['file _ delete']) {// The image unlink ('. '. $ _ GET ['file _ delete']); // delete it} if (! Empty ($ _ FILES) {// get the uploaded temporary file stream $ tempFile = $ _ FILES ['filedata'] ['tmp _ name']; // allowed file suffixes $ fileTypes = array ('jpg ', 'jpeg', 'gif', 'png '); // obtain the file name $ fileParts = pathinfo ($ _ FILES ['filedata'] ['name']); $ ftype = $ fileParts ['extension']; $ fileName = microtime (true ). ". ". $ fileParts ['extension']; // name it in microseconds // Save the server address if (! Is_dir ($ path) mkdir ($ path); if (move_uploaded_file ($ tempFile, $ path. $ fileName) {echo $ fileName;} else {echo $ fileName. $ _ FILES ['filedata'] ['tmp _ name']. "Upload Failed! ";}}?>

No permission settings, and $ fileTypes does not see the call.

Submit $ _ GET ['file _ delete'] to delete any file.

Construct a form locally

 

Getshell.

Proof of vulnerability:

Case 1:

Http://www.pjzx123.com/

1.3 billion .. I don't know .. Reject water meter query --

Http://www.pjzx123.com/Public/uploadify/uploads/201509/1442254529.7142.php

Case 2:

Http://hm.bjdjyx.com/

Millions.

Http://hm.bjdjyx.com//Public/uploadify/uploads/1442254710.5383.php

Case 3:

Http://www.yunzew.com/

More than 0.1 million.

Http://www.yunzew.com//Public/uploadify/uploads/1442254745.36.php

4:

Http://www.aft-sunnyit.com//Public/uploadify/uploads/1442254784.43.php

5:

Http://www.fangdaibao.cc/Public/uploadify/uploads/1442254831.3598.php

Solution:

Determine permissions. Check suffix!

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.