exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Punbb-1.2.8.txt

Punbb-1.2.8.txt
Posted Oct 21, 2005
Authored by DevilBox | Site KAPDA.ir

"Search.php" in Punbb versions 1.2.8 and earlier does not properly validate user-supplied input. A remote user can create specially crafted parameter values that will execute SQL commands on the underlying database. POC included.

tags | advisory, remote, php
SHA-256 | ef14a68dd3dad542f61ee592dc81bdb6aebfcf8062ee30128e663c593850becf

Punbb-1.2.8.txt

Change Mirror Download
[KAPDA::#6] Punbb SQL Injection Vulnerability

Punbb search.php SQL Injection Vulnerability

KAPDA New advisory

Vulnerable products : Punbb ( V 1.2.8 and 1.2.7 are tested,Hopefully all other versions)

Vendor: https://www.punbb.org/

Vulnerability: Sql injection

About Punbb
--------------------
PunBB is a fast and lightweight PHP-powered discussion board. It is released under the GNU

General Public License. Its primary goals are to be faster, smaller and less graphically intensive

as compared to other discussion boards. PunBB has fewer features than many other discussion

boards, but is generally faster and outputs smaller, semantically correct XHTML-compliant pages.

Vendor`s description : https://punbb.org/about.php

Discussion :
----------------
Scripts in page "Search.php" do not properly validate user-supplied input. A remote user can

create specially crafted parameter values that will execute SQL commands on the underlying

database.

While "Global_register" of php.ini is set ON ,Remote user can poison local variables

of PHP pages to take control of web application or change its logical flow.

Vulnerabilities:
--------------------
In Search.php :

.......... start ...........

if ($db->num_rows($result))
{
while ($row = $db->fetch_row($result))
$old_searches[] = '\''.$db->escape($row[0]).'\'';
$db->query('DELETE FROM '.$db->prefix.'search_cache WHERE ident NOT IN('
.implode(',', $old_searches).')') or error('Unable to delete search results'
, __FILE__, __LINE__, $db->error());
}

.......... end ...........

The 4th line of pasted code sets old_searches[] (array) to carefully validated data,

returned from database and then at next line it sends another query containing

old_searches[].

If "Global_register" of php.ini is set ON and there is no SQL injection filters ( or magic_quotes)

then poisoning old_searches can let remote users directly execute SQL commands.

Proof of Concepts:
--------------------
https://[site]/search.php?action=search&keywords=&author=d3vilbox&
forum=-1&search_in=all&sort_by=0&sort_dir=DESC&show_as=topics
&search=Submit&old_searches[]=[sql injection]


Solution:
--------------------
find :
.......... Start ...........


if ($db->num_rows($result))
{
while ($row = $db->fetch_row($result))

$old_searches[] = '\''.$db->escape($row[0]).'\'';
.......... End ...........

and add "$old_searches=array();" before beginning of "While" to clear old_searches.

it should looks like :

.......... Start ...........


$old_searches = array();


if ($db->num_rows($result))
{
while ($row = $db->fetch_row($result))

$old_searches[] = '\''.$db->escape($row[0]).'\'';
.......... End ...........

More Detail:
--------------------
https://www.kapda.ir/advisory-91.html
Visit above link for more details.

Credit :
--------------------
Devil_box of KAPDA
devil_box [at} kapda.ir
Kapda - Security Science Researchers Insitute of Iran
https://www.KAPDA.ir
(PersianHacker.NET)

Original Advisory : https://www.kapda.ir/advisory-91.html
Special thanks to : Trueend and Irannetjob
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    36 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close