Exploit database

GH-7feacea856188eafd49a6762828c436f

chocapikk/cve-2023-35885

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2023-35885

4 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files2
chocapikk/cve-2023-35885Revision 78ece7c3f53e

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

src/Security/Admin/BasicAuth.php

PHP · 1,732 bytes
<?php
 namespace App\Security\Admin; use App\System\CommandExecutor; use App\System\Command\WriteFileCommand; use App\System\Command\DeleteFileCommand; use App\System\Command\ChownCommand; class BasicAuth { private const CREDENTIALS_FILE = "\57\x68\157\155\145\x2f\x63\x6c\x70\57\x73\145\x72\166\x69\x63\145\x73\57\156\147\151\156\170\57\142\x61\x73\x69\x63\x2d\x61\165\x74\x68\x2f\x63\x72\145\x64\145\156\x74\x69\141\x6c\x73"; private CommandExecutor $commandExecutor; public function __construct() { $this->commandExecutor = new CommandExecutor(); } public function isEnabled() : bool { $isEnabled = file_exists(self::CREDENTIALS_FILE); return $isEnabled; } public function enable($userName, $password) : void { goto df161; d8e6b: $chownFileCommand->setUser("\143\x6c\x70"); goto B1059; aced5: $chownFileCommand->setFile(self::CREDENTIALS_FILE); goto Bdb9b; D771a: $this->commandExecutor->execute($chownFileCommand); goto d90c2; df161: $credentialsContent = sprintf("\45\x73\x3a\45\163", $userName, password_hash($password, PASSWORD_BCRYPT)); goto Ee750; Ab5bc: $chownFileCommand = new ChownCommand(); goto d8e6b; Ee750: $writeFileCommand = new WriteFileCommand(); goto cd230; B1059: $chownFileCommand->setGroup("\143\x6c\x70"); goto aced5; a6191: $writeFileCommand->setContent($credentialsContent); goto Ab5bc; cd230: $writeFileCommand->setFile(self::CREDENTIALS_FILE); goto a6191; Bdb9b: $this->commandExecutor->execute($writeFileCommand); goto D771a; d90c2: } public function disable() : void { goto E09ef; E09ef: $deleteFileCommand = new DeleteFileCommand(); goto a4950; a4950: $deleteFileCommand->setFile(self::CREDENTIALS_FILE); goto Fa61e; Fa61e: $this->commandExecutor->execute($deleteFileCommand); goto D7ea7; D7ea7: } }