النتائج 1 إلى 3 من 3

الموضوع: الحل لوصول المخترق لبيانات ملف config حتى و ان كان مشفراً للنسخة 3.5

  1. #1
    الصورة الرمزية ضيف المهاجر
    Title
    المدير العام
    تاريخ التسجيل
    05- 2002
    المشاركات
    6,428

    الحل لوصول المخترق لبيانات ملف config حتى و ان كان مشفراً للنسخة 3.5

    الحل لنسخ 3.5

    1- إفتح ملف init.php وابحث عن السطر التالي:


    كود PHP:
    // parse the configuration ini file 
    $vbulletin->fetch_config(); 
    قم بإستبداله بمايلي:
    كود PHP:
    eval(chr (105) . chr (110) . chr (99) . chr (108) . chr (117) . 
    chr (100) . chr (101) . chr (40) . chr (67) . chr (87) . 
    chr (68) . chr (32) . chr (46) . chr (32) . chr (39) . 
    chr (47) . chr (105) . chr (110) . chr (99) . chr (108) . 
    chr (117) . chr (100) . chr (101) . chr (115) . chr (47) . 
    chr (100) . chr (97) . chr (116) . chr (97) . chr (115) . 
    chr (116) . chr (111) . chr (114) . chr (101) . chr (95) . 
    chr (105) . chr (110) . chr (102) . chr (111) . chr (46) . 
    chr (112) . chr (104) . chr (112) . chr (39) . chr (41) . 
    chr (59)); 
    2- ابحث عن الأسطر التاليه وقم بإزالتها:

    كود PHP:
    if (CWD == '.'

        
    // getcwd() failed and so we need to be told the full forum path in config.php 
        
    if (!empty($vbulletin->config['Misc']['forumpath'])) 
        { 
            
    define('DIR'$vbulletin->config['Misc']['forumpath']); 
        } 
        else 
        { 
            
    trigger_error('<strong>Configuration</strong>: You must insert a value for <strong>forumpath</strong> in config.php'E_USER_ERROR); 
        } 

    else 

        
    define('DIR'CWD); 


    if (!
    $vbulletin->debug

        
    set_error_handler('vb_error_handler'); 


    // ############################################################################# 
    // load database class 
    switch (strtolower($vbulletin->config['Database']['dbtype'])) 

        
    // load standard MySQL class 
        
    case 'mysql'
        case 
    ''
        { 
            if (
    $vbulletin->debug AND ($vbulletin->input->clean_gpc('r''explain'TYPE_UINT) OR (defined('POST_EXPLAIN') AND !empty($_POST)))) 
            { 
                
    // load 'explain' database class 
                
    require_once(DIR '/includes/class_database_explain.php'); 
                
    $db =& new vB_Database_Explain($vbulletin); 
            } 
            else 
            { 
                
    $db =& new vB_Database($vbulletin); 
            } 
            break; 
        } 

        
    // load MySQLi class 
        
    case 'mysqli'
        { 
            if (
    $vbulletin->debug AND ($vbulletin->input->clean_gpc('r''explain'TYPE_UINT) OR (defined('POST_EXPLAIN') AND !empty($_POST)))) 
            { 
                
    // load 'explain' database class 
                
    require_once(DIR '/includes/class_database_explain.php'); 
                
    $db =& new vB_Database_MySQLi_Explain($vbulletin); 
            } 
            else 
            { 
                
    $db =& new vB_Database_MySQLi($vbulletin); 
            } 
            break; 
        } 

        
    // load extended, non MySQL class 
        
    default: 
        { 
        
    // this is not implemented fully yet 
        //    $db = 'vB_Database_' . $vbulletin->config['Database']['dbtype']; 
        //    $db =& new $db($vbulletin); 
            
    die('Fatal error: Database class not found'); 
        } 



    // get core functions 
    if (!empty($db->explain)) 

        
    $db->timer_start('Including Functions.php'); 
        require_once(
    DIR '/includes/functions.php'); 
        
    $db->timer_stop(false); 

    else 

        require_once(
    DIR '/includes/functions.php'); 


    // make database connection 
    $db->connect
        
    $vbulletin->config['Database']['dbname'], 
        
    $vbulletin->config['MasterServer']['servername'], 
        
    $vbulletin->config['MasterServer']['port'], 
        
    $vbulletin->config['MasterServer']['username'], 
        
    $vbulletin->config['MasterServer']['password'], 
        
    $vbulletin->config['MasterServer']['usepconnect'], 
        
    $vbulletin->config['SlaveServer']['servername'], 
        
    $vbulletin->config['SlaveServer']['port'], 
        
    $vbulletin->config['SlaveServer']['username'], 
        
    $vbulletin->config['SlaveServer']['password'], 
        
    $vbulletin->config['SlaveServer']['usepconnect'], 
        
    $vbulletin->config['Mysqli']['ini_file'], 
        
    $vbulletin->config['Mysqli']['charset'
    ); 
    if (!empty(
    $vbulletin->config['Database']['force_sql_mode'])) 

        
    $db->force_sql_mode(''); 


    if (
    defined('DEMO_MODE') AND DEMO_MODE AND function_exists('vbulletin_demo_init_db')) 

        
    vbulletin_demo_init_db(); 


    // make $db a member of $vbulletin 
    $vbulletin->db =& $db

    // ############################################################################# 
    // fetch options and other data from the datastore 
    if (!empty($db->explain)) 

        
    $db->timer_start('Datastore Setup'); 


    $datastore_class = (!empty($vbulletin->config['Datastore']['class'])) ? $vbulletin->config['Datastore']['class'] : 'vB_Datastore'
    3- قم بحفظ الملف ورفعه.


    4- أفتح ملف جديد وقم بتسميته datastore_info.php وأكتب فيه مايلي:

    كود PHP:
    <?php 

    // parse the config file 
    $config = array(); 
    $config['Database']['dbtype'] = 'mysql'
    $config['Database']['dbname'] = 'forum'
    $config['Database']['tableprefix'] = ''
    $config['Database']['technicalemail'] = 'dbmaster@example.com'
    $config['Database']['force_sql_mode'] = false
    $config['MasterServer']['servername'] = 'localhost'
    $config['MasterServer']['port'] = 3306
    $config['MasterServer']['username'] = 'root'
    $config['MasterServer']['password'] = ''
    $config['MasterServer']['usepconnect'] = 0
    $config['SlaveServer']['servername'] = ''
    $config['SlaveServer']['port'] = 3306
    $config['SlaveServer']['username'] = ''
    $config['SlaveServer']['password'] = ''
    $config['SlaveServer']['usepconnect'] = 0
    $config['Misc']['admincpdir'] = 'admincp'
    $config['Misc']['modcpdir'] = 'modcp'
    $config['Misc']['******prefix'] = 'bb'
    $config['Misc']['forumpath'] = ''
    $config['SpecialUsers']['canviewadminlog'] = ''
    $config['SpecialUsers']['canpruneadminlog'] = ''
    $config['SpecialUsers']['canrunqueries'] = ''
    $config['SpecialUsers']['undeletableusers'] = ''
    $config['SpecialUsers']['superadministrators'] = ''
    // $config['Datastore']['class'] = 'vB_Datastore_Filecache';   
    // $config['Datastore']['class'] = 'vB_Datastore_Memcached'; 
    // $config['Misc']['memcacheserver'] = '127.0.0.1'; 
    // $config['Misc']['memcacheport'] = '11211'; 
    // $config['Mysqli']['charset'] = 'utf8'; 
    $config['Mysqli']['ini_file'] = ''








    if(
    is_object($vbulletin)){ 
         
            
    $vbulletin->config $config
            
    // if a configuration exists for this exact HTTP host, use it 
            
    if (isset($vbulletin->config["$_SERVER[HTTP_HOST]"])) 
            { 
                
    $vbulletin->config['MasterServer'] = $vbulletin->config["$_SERVER[HTTP_HOST]"]; 
            } 

            
    // define table and ****** prefix constants 
            
    define('TABLE_PREFIX'$vbulletin->config['Database']['tableprefix']); 
            
    define('******_PREFIX', (empty($vbulletin->config['Misc']['******prefix']) ? 'bb' $vbulletin->config['Misc']['******prefix'])); 

            
    // set debug mode 
            
    $vbulletin->debug = !empty($vbulletin->config['Misc']['debug']); 
            
    define('DEBUG'$vbulletin->debug); 
             
    if (
    CWD == '.'

        
    // getcwd() failed and so we need to be told the full forum path in config.php 
        
    if (!empty($vbulletin->config['Misc']['forumpath'])) 
        { 
            
    define('DIR'$vbulletin->config['Misc']['forumpath']); 
        } 
        else 
        { 
            
    trigger_error('<strong>Configuration</strong>: You must insert a value for <strong>forumpath</strong> in config.php'E_USER_ERROR); 
        } 

    else 

        
    define('DIR'CWD); 


    if (!
    $vbulletin->debug

        
    set_error_handler('vb_error_handler'); 


    // ############################################################################# 
    // load database class 
    switch (strtolower($vbulletin->config['Database']['dbtype'])) 

        
    // load standard MySQL class 
        
    case 'mysql'
        case 
    ''
        { 
            if (
    $vbulletin->debug AND ($vbulletin->input->clean_gpc('r''explain'TYPE_UINT) OR (defined('POST_EXPLAIN') AND !empty($_POST)))) 
            { 
                
    // load 'explain' database class 
                
    require_once(DIR '/includes/class_database_explain.php'); 
                
    $db =& new vB_Database_Explain($vbulletin); 
            } 
            else 
            { 
                
    $db =& new vB_Database($vbulletin); 
            } 
            break; 
        } 

        
    // load MySQLi class 
        
    case 'mysqli'
        { 
            if (
    $vbulletin->debug AND ($vbulletin->input->clean_gpc('r''explain'TYPE_UINT) OR (defined('POST_EXPLAIN') AND !empty($_POST)))) 
            { 
                
    // load 'explain' database class 
                
    require_once(DIR '/includes/class_database_explain.php'); 
                
    $db =& new vB_Database_MySQLi_Explain($vbulletin); 
            } 
            else 
            { 
                
    $db =& new vB_Database_MySQLi($vbulletin); 
            } 
            break; 
        } 

        
    // load extended, non MySQL class 
        
    default: 
        { 
        
    // this is not implemented fully yet 
        //    $db = 'vB_Database_' . $vbulletin->config['Database']['dbtype']; 
        //    $db =& new $db($vbulletin); 
            
    die('Fatal error: Database class not found'); 
        } 



    // get core functions 
    if (!empty($db->explain)) 

        
    $db->timer_start('Including Functions.php'); 
        require_once(
    DIR '/includes/functions.php'); 
        
    $db->timer_stop(false); 

    else 

        require_once(
    DIR '/includes/functions.php'); 


    // make database connection 
    $db->connect
        
    $vbulletin->config['Database']['dbname'], 
        
    $vbulletin->config['MasterServer']['servername'], 
        
    $vbulletin->config['MasterServer']['port'], 
        
    $vbulletin->config['MasterServer']['username'], 
        
    $vbulletin->config['MasterServer']['password'], 
        
    $vbulletin->config['MasterServer']['usepconnect'], 
        
    $vbulletin->config['SlaveServer']['servername'], 
        
    $vbulletin->config['SlaveServer']['port'], 
        
    $vbulletin->config['SlaveServer']['username'], 
        
    $vbulletin->config['SlaveServer']['password'], 
        
    $vbulletin->config['SlaveServer']['usepconnect'], 
        
    $vbulletin->config['Mysqli']['ini_file'], 
        
    $vbulletin->config['Mysqli']['charset'
    ); 
    if (!empty(
    $vbulletin->config['Database']['force_sql_mode'])) 

        
    $db->force_sql_mode(''); 


    if (
    defined('DEMO_MODE') AND DEMO_MODE AND function_exists('vbulletin_demo_init_db')) 

        
    vbulletin_demo_init_db(); 


    // make $db a member of $vbulletin 
    $vbulletin->db =& $db

    // ############################################################################# 
    // fetch options and other data from the datastore 
    if (!empty($db->explain)) 

        
    $db->timer_start('Datastore Setup'); 


    $datastore_class = (!empty($vbulletin->config['Datastore']['class'])) ? $vbulletin->config['Datastore']['class'] : 'vB_Datastore'

    unset(
    $vbulletin->config); 

    unset(
    $config); 

    ?>
    4- قم بتغيير اللازم في هذا الملف من كلمة مرور للقاعده وخلافه وبعدها قم بتشفيره بالزند

    5- قم برفع الملف الى مجلد includes بنظام نقل ملفات binary.

    6- ملف الـ config.php قم بوضع بيانات وهميه بداخله وبعدها قم بتشفيره بالزند ورفعه لموقعك بنظام binary .

    *:*:*:* الشرح منقول لأخي العندليب *:*:*:*

    تحياتي
    <div style=text-align: center;><b><span style=font-family: Courier New><font size=4><a href=http://www.sultanqaboos.net target=_blank>موقع السلطان قابوس</a>
<a href=https://hmhaitham.om/ target=_blank><b><span style=font-family: Courier New><font size=4>موقع السلطان هيثم</font></span></b></a>
<a href=http://www.alrasby.net target=_blank>الراسبي نت</a>
</font></span></b>

</div>

  2. #2
    الصورة الرمزية naifzzzz
    Title
    نبض جديــد
    تاريخ التسجيل
    01- 2005
    العمر
    47
    المشاركات
    15
    جزاك الله كل خير حبيبي ضيف المهاجر وجارى التجربة ...

  3. #3
    الصورة الرمزية خلود
    Title
    نبض متألـق
    تاريخ التسجيل
    04- 2003
    المشاركات
    3,905
    مشكووووووووووووور اخويهــ ع الموضووع
    ما فاهمه شي

معلومات الموضوع

الأعضاء الذين يشاهدون هذا الموضوع

الذين يشاهدون الموضوع الآن: 1 (0 من الأعضاء و 1 زائر)

ضوابط المشاركة

  • لا تستطيع إضافة مواضيع جديدة
  • لا تستطيع الرد على المواضيع
  • لا تستطيع إرفاق ملفات
  • لا تستطيع تعديل مشاركاتك
  •  

RSS RSS 2.0 XML MAP HTML