Warning: include(/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php): failed to open stream: No such file or directory in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: include(/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php): failed to open stream: No such file or directory in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: include(): Failed opening '/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php' for inclusion (include_path='.:/opt/cpanel/ea-php70/root/usr/share/pear') in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: Cannot modify header information - headers already sent by (output started at /home/blog66rr/public_html/wp-content/advanced-cache.php:24) in /home/blog66rr/public_html/wp-includes/feed-rss2.php on line 8
wordpress被駭 – unethost無限空間虛擬主機 技術分享部落格 https://blog.unethost.com unethost 專注於提供優質的虛擬主機服務及相關問題解答 Thu, 23 Mar 2017 08:37:54 +0000 zh-TW hourly 1 https://wordpress.org/?v=6.0.8 wordpress 快取插件與網站被駭 https://blog.unethost.com/wordpress_cache_plugin_and_web_be_hacker/ Thu, 23 Mar 2017 08:37:54 +0000 http://blog.unethost.com/?p=4312 閱讀全文 wordpress 快取插件與網站被駭]]> 最近有wodpress網站,因為經常連線數異常增高,而導致網站不穩定,
起先懷疑是不是快取問題,就先建議站長增加使用cache插件,
一裝上後,發現網站已被駭。

1.這一套插件叫 super cache,是worpdress知名的快取插件,
還有支援中文設定,實在是相當方便。

2.安裝完成後,該網站會在前台及後台,都秀出一段錯誤訊息如下:
define(‘WP_CACHE’, true); //Added by WP-Cache Manager define( ‘WPCACHEHOME’, ‘/home/xxxxx/public_htmlwp-content/plugins/wp-super-cache/’ ); //Added by WP-Cache Manager

3.在跟著錯誤訊息去google後,發現得將 define(‘WP_CACHE’, true);
這一行加到wp-config.php,才能正常啟用。

4.結果編輯wp-config.php後,看到滿滿一堆亂碼

 

5.正常而言,wp-config.php會有一些宣告,在宣告前面是不應該出現一堆資料(或亂碼)

6.所以super cache 其實是有將他需要的代碼,
插入到wp-config.php,也就是下面兩行,只是剛好塞在亂碼前面,
導致沒有被執行,因而wp前後台就會秀出警告。
define(‘WP_CACHE’, true); //Added by WP-Cache Manager
define( ‘WPCACHEHOME’, ‘/home/xxxxxx/public_html/wp-content/plugins/wp-super-cache/’ ); //Added by WP-Cache Manager

在這兩行移到wp宣告內就可以啟用super cache

7.最後只好在請站長,去查看其他檔案,
是不是都被插入這一堆亂碼(駭客控制碼),並移除之。
沒想到這樣一個插件效果,也能發現被駭的狀況,
算是一舉數得了。

這個亂碼可以幫駭客製造出木馬功能,
所以如果發現自己的程式裡,跑出看不懂的內容,
可以先備份檔案,在清掉異常內容試試。

 

(本篇教學由unethost.com客服撰寫)

延伸閱讀:如何備份Cpanel後台安裝的套裝程式?

安裝上述的軟體,我們提供虛擬主機試用,七天滿意保證,
功能完整使用不受限制,歡迎點我申請。

]]>