目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2024-35584 PoC — Open Solutions For Education openSIS 安全漏洞

来源
关联漏洞
标题: Open Solutions For Education openSIS 安全漏洞 (CVE-2024-35584)
Description:Open Solutions For Education openSIS是美国Open Solutions For Education公司的一套开源的学生信息管理系统。 Open Solutions For Education openSIS Community Edition 9.1版本和8.0及之前版本存在安全漏洞,该漏洞源于缺乏清理,存在SQL注入漏洞,经过身份验证的用户可以执行SQL注入。
Description
OpenSIS SQLi Injection
介绍
# CVE-2024-35584
OpenSIS Authenticated SQL Injection

## Description
There exists a SQL injection vulnerability in Ajax.php, ForWindow.php, ForExport.php, Modules.php, functions/HackingLogFnc.php. This finding affects OpenSis Community Edition 9.1 to 8.0 and possibly versions below.

## Proof of Concept

In one of the example, Ajax.php, it can be seen that IPs can be logged and inserted into the database if malicious activities are encountered. One thing to note is that if the “X-Forwarded-For” header is sent, the application will take that value instead of ```$_SERVER['REMOTE_ADDR']``` value. As ```$ip``` is concatenated directly into the SQL statement without any form of sanitization, it is possible to perform SQL Injection.

![image](https://github.com/user-attachments/assets/31a052fa-e14b-4f5b-ab20-c9f3f83637bc)

In the proof of concept below, injecting the payload, ```' AND SLEEP(7) AND '1'='1```, caused the application to sleep for 7 seconds, indicating that the SQL injection was successfully.
![image](https://github.com/user-attachments/assets/cbe12211-04ce-4315-a735-653aa825e1c4)

Checking the database log further proves this vulnerability.
![image](https://github.com/user-attachments/assets/fcc0d932-ed81-4539-a11a-65cc130d75b9)

Lastly, utilising SQLMap, an automated SQL Injection tool, confirmed the vulnerability.
![image](https://github.com/user-attachments/assets/36496339-22d7-4a7b-a5da-744ebcd9be8c)

## Affected files
The affected line of codes were found to directly append the value from ```$_SERVER['HTTP_X_FORWARDED_FOR']``` into a SQL statement.  

•	Ajax.php (Line 260 to 275)  
•	Modules.php (Line 1005 to 1023)  
•	ForExport.php (Line 135 to 147)  
•	ForWindow.php (Line 124 to 136)  
•	functions/HackingLogFnc.php (Line 47 to 68)  

## Recommendation

•	Instead of dynamically constructing SQL queries by concatenating user input directly into the SQL statement, utilise parameterised queries (also known as prepared statements) instead. Parameterised queries separate SQL code from user input, significantly reducing the risk of SQL injection attacks.  
•	Implement robust input validation and sanitization techniques to ensure that user-supplied data conforms to expected formats and does not contain malicious SQL code. Validate input data types, length, and format, and sanitize inputs by escaping special characters or using whitelists to allow only specific characters or patterns.  
•	Do not use ```$_SERVER[‘HTTP_X_FORWARDED_FOR’]``` to log IPs.

文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →