Tackle the Web with up to 5 new .COMs, $5.99 for the 1st year!

.

.

ไวรัสนี่..มันร้ายจริงๆ

หลังจากได้ยินกิตติศัพท์ของไวรัสที่เข้าโจมตีเวปอย่างหนักในช่วง 3-4 เดือนมานี้   ในที่สุดก็ได้เจอกับตัวเอง ซึ่งสาเหตุหลักคงมาจากการที่เราใช้ FTP ในการอัพเดทเวปและเซฟ password และ username ไว้ครบเลย  ชะล่าใจมากเพราะคิดว่ามันไกลตัวเราและเวปเราก็ไม่ได้มีอะไรน่าสนใจที่ไวรัสพวกนี้จะมาโจมตี  ซึ่งเราใช้ wp ในการทำเวป แล้ววันหนึ่งก็พบว่าเวปเริ่มเปิดไม่ได้ โดยจะปรากฏข้อความ error ว่า

: Cannot redeclare n11() (previously declared in /home/wiforext/public_html/mypet/index.php(1) : eval()’d code:1) in /home/wiforext/public_html/mypet/wp-config.php(1) : eval()’d code on line 1

ถ้าใครเจอข้อความนี้หล่ะก็ มาอ่านวิธีการแก้ไขและลงมือกำจัดมันกันได้เลย ไวรัสจะเริ่มโจมตีทีละเวป จาก 1 เป็น 2 และ 3 ยิ่งเราเปิดเวปบ่อยและเปิด FTP เพื่อเข้าไปอัพเดทข้อมูล เจ้าไวรัสตัวนี้จะยิ่งทำงานได้สะดวกและรวดเร็วมาก

การทำงานของไวรัสตัวนี้จะเข้าไปเติม code แปลกๆ ในบรรทัดแรกของไฟล์  wp-index.php , wp-setting.php , wp-config.php และไฟล์สำคัญอื่นๆที่เป็น php ทำให้เวปเราไม่สามรถเปิดได้ตามปกติ วิธีแก้ไขคือ

1. เมื่อเจอเวปที่ปรากฏข้อความ Fatal error: ให้ปิดเวปนั้นและพยายามอย่าเปิดหรือรีเฟรชหน้าเวป เพราะอาจทำให้เกิดการ generate script เพิ่มขึ้น

2. ให้ uninstall FTP จากเครื่องทันที

3. เปลี่ยน username/password ของ FTP บน webhost (สำคัญมากๆ ต้องรีบแก้ทันทีและมั่นเปลี่ยนเรื่อยๆ เมื่อมีเวลา)

4. เข้าไปตรวจสอบว่า มี code แปลกปลอมในไฟล์ wp-index.php , wp-setting.php , wp-config.php หรือไม่ ถ้าเจอลบออกให้หมดค่ะ

ใน wp-config.php พบได้ 2 ส่วนคือ บรรทัดแรกหลัง <?php และส่วน define ถ้าเจอ code แปลกปลอม ลบออกให้หมดค่ะหรือเปลี่ยน config เป็นไฟล์ใหม่เลย แต่ใส่ส่วนข้อมูลสำคัญให้ครบน่ะ (yourdbname, username, password, wp_)

<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information by
* visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the
* installation. You don’t have to use the web site, you can just copy this file
* to “wp-config.php” and fill in the values.
*
* @package WordPress
*/

// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘putyourdbnamehere’);

/** MySQL database username */
define(‘DB_USER’, ‘usernamehere’);

/** MySQL database password */
define(‘DB_PASSWORD’, ‘yourpasswordhere’);

/** MySQL hostname */
define(‘DB_HOST’, ‘localhost’);

/** Database Charset to use in creating database tables. */
define(‘DB_CHARSET’, ‘utf8′);

/** The Database Collate type. Don’t change this if in doubt. */
define(‘DB_COLLATE’, ”);

/**#@+
* Authentication Unique Keys.
*
* Change these to different unique phrases!
* You can generate these using the {@link http://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}
*
* @since 2.6.0
*/
define(‘AUTH_KEY’, ‘put your unique phrase here’);
define(‘SECURE_AUTH_KEY’, ‘put your unique phrase here’);
define(‘LOGGED_IN_KEY’, ‘put your unique phrase here’);
define(‘NONCE_KEY’, ‘put your unique phrase here’);

/**#@-*/

/**
* WordPress Database Table prefix.
*
* You can have multiple installations in one database if you give each a unique
* prefix. Only numbers, letters, and underscores please!
*/
$table_prefix  = ‘wp_’;

/**
* WordPress Localized Language, defaults to English.
*
* Change this to localize WordPress.  A corresponding MO file for the chosen
* language must be installed to wp-content/languages. For example, install
* de.mo to wp-content/languages and set WPLANG to ‘de’ to enable German
* language support.
*/
define (‘WPLANG’, ‘th’);

/* That’s all, stop editing! Happy blogging. */

/** WordPress absolute path to the WordPress directory. */
if ( !defined(‘ABSPATH’) )
define(‘ABSPATH’, dirname(__FILE__) . ‘/’);

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . ‘wp-settings.php’);
?>

5. แสกนไวรัสในเครื่องคุณ กำจัด backdoor และเปลี่ยน passoword database ของเวปทั้งหมดและมั่นเปลี่ยนเรื่อยๆ เมื่อมีเวลา

6. หา script ที่กำจัด มารันค่ะ (เดี๋ยวจะอัพไว้ให้ค่ะ)

ทริปเล็กสำหรับซ่อมเวปน่ะค่ะ

ใน wp เราจะเลือกไฟล์ทั้งหมดแล้วเลือกเก็บไฟล์  wp-content , wp-config และไฟล์ที่คุณต้องการเก็บไว้ พวกรูปภาพ ที่ไม่ใช่ php ไฟล์
แล้วลบไฟล์ที่เหลือทั้งหมด แล้วอัพไฟล์ที่ลบไปอันใหม่จาก wordpress ที่เฟรชๆ ขึ้นไปค่ะ แล้วทุกอย่างจะเหมือนเดิม อ๋อออ…อย่าลืมเข้าไปแก้ไฟล์ wp-config และไฟล์ index.php ใน folder wp-content ด้วยน่ะค่ะ

ขอให้ท่านโชคดีค่ะ

อยากให้อ่านเรื่องนี้ด้วย

2 comments to ไวรัสนี่..มันร้ายจริงๆ

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>