форум vBSupport.ru > vBSupport.ru > Безопасность
Register Меню vBsupport Изображения Files Manager О рекламе Today's Posts Search
  • Родная гавань
  • Блок РКН снят
  • Premoderation
  • For English speaking users
  • Каталог Фрилансеров
  • If you want to buy some product or script
  • Администраторам
VBsupport перешел с домена .ORG на родной .RU Ура! Пожалуйста, обновите свои закладки - VBsupport.ru
Блок РКН снят, форум доступен на всей территории России, включая новые терртории, без VPN
На форуме введена премодерация ВСЕХ новых пользователей

Почта с временных сервисов, типа mailinator.com, gawab.com и/или прочих, которые предоставляют временный почтовый ящик без регистрации и/или почтовый ящик для рассылки спама, отслеживается и блокируется, а так же заносится в спам-блок форума, аккаунты удаляются
for English speaking users:
You may be surprised with restriction of access to the attachments of the forum. The reason is the recent change in vbsupport.org strategy:

- users with reputation < 10 belong to "simple_users" users' group
- if your reputation > 10 then administrator (kerk, Luvilla) can decide to move you into an "improved" group, but only manually

Main idea is to increase motivation of community members to share their ideas and willingness to support to each other. You may write an article for the subject where you are good enough, you may answer questions, you may share vbulletin.com/org content with vbsupport.org users, receiving "thanks" equal your reputation points. We should not only consume, we should produce something.

- you may:
* increase your reputation (doing something useful for another members of community) and being improved
* purchase temporary access to the improved category:
10 $ for 3 months. - this group can download attachments, reputation/posts do not matter.
20 $ for 3 months. - this group can download attachments, reputation/posts do not matter + adds eliminated + Inbox capacity increased + files manager increased permissions.

Please contact kerk or Luvilla regarding payments.

Important!:
- if your reputation will become less then 0, you will be moved into "simple_users" users' group automatically.*
*for temporary groups (pre-paid for 3 months) reputation/posts do not matter.
Уважаемые пользователи!

На форуме открыт новый раздел "Каталог фрилансеров"

и отдельный раздел для платных заказов "Куплю/Закажу"

Если вы хотите приобрести какой то скрипт/продукт/хак из каталогов перечисленных ниже:
Каталог модулей/хаков
Ещё раз обращаем Ваше внимание: всё, что Вы скачиваете и устанавливаете на свой форум, Вы устанавливаете исключительно на свой страх и риск.
Сообщество vBSupport'а физически не в состоянии проверять все стили, хаки и нули, выкладываемые пользователями.
Помните: безопасность Вашего проекта - Ваша забота.
Убедительная просьба: при обнаружении уязвимостей или сомнительных кодов обязательно отписывайтесь в теме хака/стиля
Спасибо за понимание
 
 
 
 
GiRassell
Эксперт
 
GiRassell's Avatar
Default vBulletin 5.1.1 - 5.1.4 Security Exploit
3

A security update has been released for vBulletin 5.
This fixes an issue that allows potential unsanitized input via attachments.

Patches have been released for the following versions of vBulletin : 5.1.1, 5.1.2, 5.1.3, 5.1.4.

You can find more details in the forum announcement here ;

http://www.vbulletin.com/forum/node/4261521
Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 
 
Luvilla
Гость
Default

Прочла пост на офсайте
посмотрела файлик vbv_14079_14084_fix.php

это афигенно...

Пятёрошники, мои соболезнования...

 
 
BTC
СпециалистЪ
 
BTC's Avatar
Default
0

Luvilla, А можно сюда его?) Чисто поглядеть)
 
 
Liked
Специалист
 
Liked's Avatar
Default
0

Какого хрена они выпускают новые версии движка, если эксплойты на эту ветку обнаруживаются каждый месяц.
Неужели, им пофигу на репутацию продукта? Никто же не будет покупать их говнецо.
 
 
Luvilla
Гость
Default

vbv_14079_14084_fix.php

PHP Code:
<?php
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin  
|| # ---------------------------------------------------------------- # ||
|| # Copyright ©2000-2015 vBulletin Solutions Inc. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/

//init the system
$root dirname(__FILE__) . '/';

for (
$i 0$i 10 AND !file_exists($root 'vb/vb.php'); $i++)
{
    
$root .= '../';
}

require_once(
$root 'vb/vb.php');
vB::init();
vB::setRequest(new vB_Request_Web());

$fix = new FixVbv14079And14084();
$params $fix->step_1($_GET);

if (!empty(
$params))
{

    
?>
<script type="text/javascript">
(function()
{
    window.setTimeout(function()
    {
        var loc = window.location.href;

        if (loc.match(/startat=\d+/))
        {
            loc = loc.replace(/startat=\d+/, "startat=<?php echo $params['startat']; ?>");
        }
        else
        {
            var argChar = loc.match(/\?/) ? '&' : '?';
            loc = loc + argChar + "startat=<?php echo $params['startat']; ?>";
        }

        window.location.href = loc;

    }, 1000);
})();
</script>
    <?php

}

class 
FixVbv14079And14084
{
    
/**
     * Prints a message
     * @param string Message
     */
    
protected function show_message($message)
    {
        echo 
$message "<br />\n";
    }

    
/**
     * The step_1 function ported from the 515b2 upgrade
     */
    
public function step_1($data null)
    {
        
$startat = (int) isset($data['startat']) ? $data['startat'] : 0;
        
$batchsize 100;

        
$assertor vB::getDbAssertor();

        
$this->show_message('Cleaning attachment filenames and settings.');

        
// For each attachment, we need to:
        // 1. html escape the attachment filename, if not already escaped (VBV-14084)
        // 2. pull data from settings without using unserialize, then re-serialize it
        //    to mitigate the PHP unserialize object injection vulnerability (VBV-14079)
        // 3. check that the author has 'canattachmentcss' for in this channel, and
        //    if not, blank out the settings[styles] value that they don't have
        //    permission to set. This mitigates the XSS vulnerability. (VBV-14079)

        // get attach records
        
$rows $assertor->getRows('vBInstall:getAttachmentsWithParentAndAuthor', array(
            
'startat' => (int) $startat,
            
'batchsize' => (int) $batchsize,
        ));

        
$rowcount count($rows);

        if (
$rowcount == 0)
        {
            
vB_Cache::resetCache();
            
$this->show_message('Cache cleared.');

            
// done
            
$this->show_message('Process finished.');

            return;
        }
        else
        {
            
// make changes
            
foreach ($rows AS $row)
            {
                
// Escape filenames (VBV-14084)
                
$updates = array();
                if (
$row['filename'] === vB_String::unHtmlSpecialChars($row['filename']))
                {
                    
// unescaping didn't change anything, so this filename may need to be escaped
                    
$escaped vB_String::htmlSpecialCharsUni($row['filename']);
                    if (
$escaped !== $row['filename'])
                    {
                        
// there was a change, need to save it
                        
$updates['filename'] = $escaped;
                    }
                }

                if (!empty(
$row['settings']))
                {
                    
// ensure that settings contains only valid serialized
                    // data we are expecting. parseAttachSettings will fail
                    // if there is anything unexpected such as a serialized
                    // object.
                    
$settings $this->parseAttachSettings($row['settings']);

                    if (empty(
$settings))
                    {
                        
// insert the defaults
                        
$settings = array(
                            
'alignment'   => 'none',
                            
'size'        => 'full',
                            
'title'       => '',
                            
'description' => '',
                            
'styles'      => '',
                            
'link'        => 0,
                            
'linkurl'     => '',
                            
'linktarget'  => 0,
                        );
                    }

                    
// remove settings['styles'] if the user doesn't have
                    // 'canattachmentcss' (VBV-14079)
                    
$usercontext vB::getUserContext($row['userid']);
                    if (!
$usercontext->getChannelPermission('forumpermissions''canattachmentcss'$row['nodeid']))
                    {
                        
// user doesn't have the permission for this node
                        
$settings['styles'] = '';
                    }

                    
$settings serialize($settings);

                    if (
$settings !== $row['settings'])
                    {
                        
$updates['settings'] = $settings;
                    }
                }

                if (!empty(
$updates))
                {
                    
// save any changes....
                    
$assertor->update('vBForum:attach'$updates, array('nodeid' => $row['nodeid']));
                }
            }

            
// output progress
            
$from $startat 1;
            
$to $from $rowcount 1;
            
$this->show_message(sprintf('Processed records %1$s to %2$s.'$from$to));

            
// return for next batch
            
return array('startat' => $startat $batchsize);
        }

    }

    
/**
     * Internal function used by step_1 to safely parse serialized data
     * without the risk of trying to instantiate serialized objects, etc.
     * This is *not* a full unserialize function, it *only* handles the
     * data that we expect to be in the settings field, in the format that
     * we expect, namely an array of specific strings.
     *
     * @param  string Serialized array of settings
     * @return array  The unserialized array of settings, checked against
     *                a whitelist, OR an empty array of any unexpected
     *                data was found
     */
    
protected function parseAttachSettings($settings)
    {
        
// expect an array
        
if (!preg_match('#^a:(\d+):{(.+)}$#'$settings$matches))
        {
            return array();
        }

        
$count $matches[1];
        
$elementString $matches[2];
        
$elements = array();

        
$whitelist = array(
            
'alignment',
            
'size',
            
'title',
            
'description',
            
'styles',
            
'link',
            
'linkurl',
            
'linktarget',
        );

        
// each array element should have a string key and a string or int value
        
for ($i 0$i $count; ++$i)
        {
            
// get key length
            
if (!preg_match('#^s:(\d+):#'$elementString$matches))
            {
                return array();
            }
            
$keyLen $matches[1];
            
$matchLen strlen($matches[0]);
            
$elementString substr($elementString$matchLen);
            
$key = (string) substr($elementString1$keyLen); // 1 to advance past the opening quote (")
            
$elementString substr($elementString$keyLen 3); // +3 to account for the quotes ("") and ending (;)

            // get value
            
if (!preg_match('#^(s|i):#'$elementString$matches))
            {
                return array();
            }
            
$type $matches[1];
            if (
$type == 's')
            {
                if (!
preg_match('#^s:(\d+):#'$elementString$matches))
                {
                    return array();
                }
                
$valueLen $matches[1];
                
$matchLen strlen($matches[0]);
                
$elementString substr($elementString$matchLen);
                
$value = (string) substr($elementString1$valueLen); // 1 to advance past the opening quote (")
                
$elementString substr($elementString$valueLen 3); // +3 to account for the quotes ("") and ending (;)
            
}
            else 
// 'i'
            
{
                if (!
preg_match('#^i:(\d+);#'$elementString$matches))
                {
                    return array();
                }
                
$value = (int) $matches[1];
                
$matchLen strlen($matches[0]);
                
$elementString substr($elementString$matchLen);
            }

            if (
in_array($key$whitelisttrue))
            {
                if (
$key === 'alignment')
                {
                    
$value in_array($value, array('none''left''center''right'), true) ? $value 'none';
                }
                else if (
$key === 'size')
                {
                    
$value vB_Api::instanceInternal('Filedata')->sanitizeFiletype($value);                }

                
$elements[$key] = $value;
            }

        }

        return 
$elements;
    }
}

/*======================================================================*\
|| ####################################################################
|| # Downloaded: 05:55, Sat Jan 17th 2015
|| # 
|| ####################################################################
\*======================================================================*/
 
 
raynar
Простоузер
Default
0

Оффтоп
 
 
BTC
СпециалистЪ
 
BTC's Avatar
Default
0

Quote:
Originally Posted by raynar View Post
я так понимаю все еще рано с 4 на 5ку уходить?
И на четверку рано переходить
 
 
raynar
Простоузер
Default
0

Quote:
Originally Posted by BTC View Post
И на четверку рано переходить
Я перешел.
Оффтоп
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT +4. The time now is 08:43 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.