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 files4
chocapikk/cve-2023-35885Revision 78ece7c3f53e

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

src/Log/Parser/NginxErrorLogParser.php

PHP · 3,956 bytes
<?php
 namespace App\Log\Parser; class NginxErrorLogParser { const GROK_PATTERN = "\x28\45\x7b\x4e\107\x49\x4e\x58\137\105\x52\x52\x4f\122\137\114\117\107\137\104\x41\x54\x45\x3a\x64\141\x74\x65\137\x72\x61\x77\175\51\x20\134\x5b\x25\x7b\x4c\x4f\x47\114\105\x56\x45\x4c\72\x73\145\166\x65\162\151\x74\171\x7d\134\x5d\x20\x25\173\x50\x4f\x53\x49\x4e\x54\x3a\x70\151\x64\175\43\45\173\x4e\125\115\x42\105\x52\72\164\x68\162\145\141\144\x5f\151\x64\175\134\x3a\40\x5c\x2a\45\173\116\x55\115\x42\x45\x52\x3a\x63\157\156\156\145\x63\164\x69\157\156\x5f\151\x64\x7d\40\45\173\107\122\x45\105\x44\131\104\x41\x54\x41\72\x65\x72\162\x6f\x72\x5f\x6d\145\x73\x73\141\147\145\x7d\x2c\40\x63\x6c\151\x65\x6e\164\72\40\x25\x7b\x49\x50\x3a\143\x6c\151\145\x6e\x74\x5f\x69\160\175\54\40\x73\x65\162\x76\145\x72\x3a\x20\45\x7b\107\x52\x45\x45\x44\131\x44\x41\124\x41\72\x73\145\x72\166\x65\x72\175\x2c\40\x72\x65\161\165\145\x73\164\72\40\45\x7b\107\x52\x45\x45\104\x59\x44\101\124\101\72\162\x65\161\165\145\x73\164\175"; private ?string $logFileContent = null; private array $parsedLogLines = []; private ?GrokParser $grokParser = null; public function __construct(string $logfileContent) { $this->logFileContent = $logfileContent; } public function parse() : array { goto a9008; c12e4: ebb91: goto Db23a; a9008: $logLines = explode(PHP_EOL, $this->logFileContent); goto b3745; E36be: return $this->parsedLogLines; goto e8652; fa67c: foreach ($logLines as $logLine) { goto dfd67; b17d3: d4b45: goto C9426; a4b4e: $this->parsedLogLines[] = $parsedLogLine; goto b17d3; dfd67: $parsedLogLine = $this->parseLogLine($logLine); goto f5eea; C9426: D0ef7: goto fe9d8; f5eea: if (!(false === empty($parsedLogLine))) { goto d4b45; } goto a4b4e; fe9d8: } goto c12e4; Db23a: Fb9be: goto E36be; b3745: if (!count($logLines)) { goto Fb9be; } goto fa67c; e8652: } private function parseLogLine(string $logLine) : array { goto E19f5; df582: $clientIp = $parseResult["\143\154\x69\145\156\x74\x5f\151\x70"] ?? ''; goto ae365; fc128: return $parsedLogLine; goto Bc7fc; d5f77: $severity = $parseResult["\x73\145\x76\145\x72\x69\x74\x79"] ?? ''; goto B5181; b7298: D50e3: goto fc128; fd712: if (!(false !== $parseResult && count($parseResult))) { goto D50e3; } goto F15fe; E19f5: $parsedLogLine = []; goto Bbd34; Bbd34: $grokParser = $this->getGrokParser(); goto e7324; be100: $threadId = $parseResult["\164\x68\x72\x65\141\x64\137\x69\144"] ?? ''; goto da1e6; e7324: $parseResult = $grokParser->parse($logLine); goto fd712; da1e6: $connectionId = $parseResult["\x63\157\156\x6e\145\143\x74\x69\x6f\x6e\137\x69\x64"] ?? ''; goto e1842; c1a50: $parsedLogLine = ["\144\141\x74\145" => $date, "\x73\x65\x76\x65\x72\151\164\171" => $severity, "\160\x69\x64" => $pid, "\164\x68\162\145\141\x64\111\x64" => $threadId, "\x63\157\x6e\156\145\x63\x74\151\x6f\156\111\144" => $connectionId, "\145\x72\x72\x6f\x72\115\145\163\x73\141\147\x65" => $errorMessage, "\143\154\151\x65\x6e\x74\x49\160" => $clientIp, "\x73\x65\162\166\145\x72" => $server, "\162\x65\x71\x75\x65\163\x74" => $request, "\x6c\x6f\x67\114\x69\x6e\145" => $logLine]; goto b7298; B5181: $pid = $parseResult["\160\x69\144"] ?? ''; goto be100; e1842: $errorMessage = $parseResult["\x65\x72\x72\x6f\162\137\155\145\x73\x73\141\147\x65"] ?? ''; goto df582; ab5f0: $request = $parseResult["\x72\x65\x71\165\x65\163\x74"] ?? ''; goto c1a50; ae365: $server = $parseResult["\163\145\x72\166\145\162"] ?? ''; goto ab5f0; F15fe: $date = $parseResult["\144\x61\164\145\137\162\141\x77"] ?? ''; goto d5f77; Bc7fc: } public function getParsedLogLines() : array { return $this->parsedLogLines; } private function getGrokParser() : ?GrokParser { goto De816; Ece4a: Ad841: goto a0fe8; Ffd86: $this->grokParser = new GrokParser(); goto cc28d; a0fe8: return $this->grokParser; goto A12c7; cc28d: $this->grokParser->setPattern(self::GROK_PATTERN); goto Ece4a; De816: if (!(true === is_null($this->grokParser))) { goto Ad841; } goto Ffd86; A12c7: } }