CVE-2024-33405
📋 TL;DR
This SQL injection vulnerability in campcodes Complete Web-Based School Management System 1.0 allows attackers to execute arbitrary SQL commands through the friend_index parameter in add_friends.php. This could lead to data theft, modification, or deletion. All users running version 1.0 of this software are affected.
💻 Affected Systems
- campcodes Complete Web-Based School Management System
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Complete database compromise including sensitive student/teacher data exfiltration, administrative account takeover, and potential remote code execution on the database server.
Likely Case
Unauthorized data access and modification, potentially exposing personally identifiable information (PII) and academic records.
If Mitigated
Limited impact with proper input validation and parameterized queries preventing SQL injection.
🎯 Exploit Status
Exploitation requires access to the add_friends.php endpoint, which may require authentication. SQL injection is well-understood with many available tools.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Unknown
Vendor Advisory: None known
Restart Required: No
Instructions:
No official patch available. Implement parameterized queries in add_friends.php and validate/sanitize all user inputs.
🔧 Temporary Workarounds
Web Application Firewall (WAF)
allDeploy WAF with SQL injection protection rules to block malicious requests.
Input Validation
allImplement strict input validation for friend_index parameter to accept only expected values.
🧯 If You Can't Patch
- Disable or restrict access to add_friends.php endpoint
- Implement network segmentation and restrict database access to application server only
🔍 How to Verify
Check if Vulnerable:
Test add_friends.php endpoint with SQL injection payloads in friend_index parameter. Check if error messages reveal database structure or if payloads execute.
Check Version:
Check software version in admin panel or configuration files. Look for version 1.0 in system files.
Verify Fix Applied:
Test with SQL injection payloads after implementing parameterized queries. Verify no database errors are returned and payloads are rejected.
📡 Detection & Monitoring
Log Indicators:
- SQL syntax errors in application logs
- Unusual database queries from web server
- Multiple failed login attempts followed by add_friends.php access
Network Indicators:
- HTTP requests to add_friends.php with SQL keywords in parameters
- Unusual database traffic patterns
SIEM Query:
source="web_logs" AND uri="/add_friends.php" AND (param="friend_index" AND value CONTAINS "UNION" OR value CONTAINS "SELECT" OR value CONTAINS "' OR '")
🔗 References
- https://github.com/E1CHO/cve_hub/blob/main/Complete%20Web-Based%20School%20Management%20System/Complete%20Web-Based%20School%20Management%20System%20-%20vuln%204.pdf
- https://github.com/E1CHO/cve_hub/blob/main/Complete%20Web-Based%20School%20Management%20System/Complete%20Web-Based%20School%20Management%20System%20-%20vuln%207.pdf
- https://github.com/E1CHO/cve_hub/blob/main/Complete%20Web-Based%20School%20Management%20System/Complete%20Web-Based%20School%20Management%20System%20-%20vuln%204.pdf
- https://github.com/E1CHO/cve_hub/blob/main/Complete%20Web-Based%20School%20Management%20System/Complete%20Web-Based%20School%20Management%20System%20-%20vuln%207.pdf