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

php2015inject.txt

php2015inject.txt
Posted Jul 1, 2005
Authored by Ron van Daal

phpBB versions 2.0.15 and below suffer from a code injection bug.

tags | advisory
SHA-256 | e63c27994d926ee62e1c03f0e7bd1e6fea2f6e0145830a3405271c8bdd821969

php2015inject.txt

Change Mirror Download

Security Advisory -//- phpBB 2.0.15 PHP-code injection bug

Program: phpBB 2.0.15 and older versions
Homepage: http://www.phpbb.com
Risk: Very High
Date: June 28 2005
Title: PHP-code injection bug
Type: partial disclosure
Author: Ron van Daal :.
Vendor notified: June 23 2005

Background:

phpBB is a high powered, fully scalable, and highly customizable
Open Source bulletin board package. Based on the PHP server language
and supporting a variety of backend database servers.


Description:

Due to a bug in the phpBB highlighting code it's possible to inject
PHP-code into the running script. E.g. It's possible to run system
commands if the PHP interpreter allows system() and simular functions.
This is actually based on an old bug which was improperly fixed in
phpBB 2.0.11.


Technical:

The highlighting code uses the preg_replace() function on line 1110
in viewtopic.php. It uses the special modifier "e" which causes PHP
to evaluate the replacement string as PHP code. Below is a PHP code
example of what actually happens:

<?
$string1="phpinfo()";
$string2=preg_replace('//e',$string1,'');
?>

This causes PHP to execute the phpinfo() function. Usage of the
preg_replace special modifier "e" should be avoided if possible.


Proof of concept:

Sorry, partial disclosure advisory.


Solution:

Upgrade to phpBB version 2.0.16 or edit viewtopic.php on line #1110:

Change this: str_replace('\\', '\\\\', $highlight_match)

Into this: str_replace('\\', '\\\\', addslashes($highlight_match))


Credits:

Synto(nix) && Doqnach @Umbranet #unixtalk

<EOF>


--
Theo de Raadt: "BSD guys are a lot like Linux guys, except they have kissed girls"
Methinks: "FreeBSD guys are a lot like OpenBSD guys, except they have fscked girls"
Login or Register to add favorites

File Archive:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    18 Files
  • 7
    Nov 7th
    9 Files
  • 8
    Nov 8th
    8 Files
  • 9
    Nov 9th
    3 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    14 Files
  • 12
    Nov 12th
    20 Files
  • 13
    Nov 13th
    63 Files
  • 14
    Nov 14th
    18 Files
  • 15
    Nov 15th
    8 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    18 Files
  • 19
    Nov 19th
    7 Files
  • 20
    Nov 20th
    13 Files
  • 21
    Nov 21st
    6 Files
  • 22
    Nov 22nd
    48 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    60 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    44 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 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