Информационная безопасность
[RU] switch to English

Дополнительная информация

  Ежедневная сводка ошибок в Web-приложениях (PHP, ASP, JSP, CGI, Perl )

  Persistent cross-site scripting in wordpress.com dashboard

  iG Shop 1.4 eval Inclusion Vulnerability

  fusetalk SQL (autherror.

From:krasza_(at)_gmail.com <krasza_(at)_gmail.com>
Date:19 июня 2007 г.
Subject:Local File Include Vulnerabilities in YaBB <= 2.1(all version)

Local File Include Vulnerabilities

Problem: Local File Include Vulnerabilities
Product: YaBB <= 2.1(all version)
Web page:http://www.yabbforum.com/

Credit:Maciej `krasza` Kukla
@mail:[email protected]


"YaBB is a leading free forum software package that rivals any professional message board out there. It provides a real-time chat and support system for your visitors. While chat programs allow people to talk directly, you have to be on at the same time as others. With forum software like YaBB, you can talk any time, and everyone can join in the conversation! Build a community and get visitors to come back for interesting discussions, fun chit chat, or needed support without having to spend thousands of dollars."

http://www.google.pl/search?q=Powered+by+YaBB => 1,640,000 clients

2. Local File Include

I found many bugs like it in this board.Bugs relate one special variable for user($language, you can edit this variable in your profile). Examples, where I found bugs:

if (-e ("$helpfile/$language/$help_area/$line.help")) {
                       require "$helpfile/$language/$help_area/$line.help";

if (-e "$langdir/$use_lang/$what_to_load.lng") {
       require "$langdir/$use_lang/$what_to_load.lng";

if ($language) { require "$langdir/$language/ICQ.lng"; }

if (-e "$langdir/$actlang/Notify.lng") { require "$langdir/$actlang/Notify.lng"; }

if (-e "$langdir/$actlang/Notify.lng") { require "$langdir/$actlang/Notify.lng"; }

if (-e "$langdir/$actlang/Notify.lng") { require "$langdir/$actlang/Notify.lng"; }

if (-e "$langdir/$actlang/InstantMessage.lng") { require "$langdir/$actlang/InstantMessage.lng"; }

if (-e "$langdir/$actlang/InstantMessage.lng") { require "$langdir/$actlang/Main.lng"; }

You can set this variable in profile's module.Thanks to uses the "../" characters, You can read other user's files(where is hash of password), exec other perl's script(so exec your code) etc.

Example 'plan of attacking' page, where is YaBB's forum(exec your command on server):

       1.Find web, where is YaBB's forum(example 'http://victim.com/~krasza/yabb2/')
       2.Modify your local's folder 'English' (from YaBB's packet)
               %helptxt = (
               '1' => "Help Section",
               '2' => "Contents",

               change for:

               $content="<br><br><br><br><font color=red>";
               %helptxt = (
               '1' => "Help Section",
               '2' => $content,

       3.Copy your local's folder 'folder' to your account on attack's server(victim.com)
       4.Create a new user(example 'attacker') on attack's forum(' http://vicitm.com/~krasza/yabb2/')
       5.Edit your profile and set 'userlangue' on "../../path/your/folder/where/is/English's/folder/"(I propose you use 'Tamper Data'-plugin for Firefox);
       6.Go to 'Help' on Yabb's page in your browser ('http://vicitm.com/~krasza/yabb2/YaBB.pl?action=help');
       7.Now Thanks to 'cmd' var, You can exec your command, example:

returns 'nobody'(red color) on top in left frame.
returns 'Linux thrall 2.4.31 #21 Sun Jun 5 19:19:51 PDT 2005 i686 unknown unknown GNU/Linux '


If you much want to look exploit for this bug, I will can publish my code. I don't prefer  publish my exploits. I think, that 'plan of attacking page' should suffice you.


YaBB must filter language's var in profile's module.Until YaBB company will publish oficial fix, You should edit Sources/Profile.pl by this means:

if ($member{'userlanguage'} !~ m^\A[0-9a-zA-Z_\.\#\%\-\:
\+\?\$\&\~\.\,\@/]+\Z^ && $member{'userlanguage'} ne "") { &fatal_error($profile_txt{'815'}); }

change for:

if ($member{'userlanguage'} !~ m^\A[0-9a-zA-Z_\.\#\%\-\:
\+\?\$\&\~\.\,\@]+\Z^ && $member{'userlanguage'} ne "") { &fatal_error($profile_txt{'815'}); }

This version will deny injecting slash '/'.

Maciej `krasza` Kukla
[email protected]


Best regards, Maciej `krasza` Kukla

О сайте | Условия использования
© SecurityVulns, 3APA3A, Владимир Дубровин
Нижний Новгород