This WordPress blog was hacked for few hours on 24th December (nice Christmas present!) from Russia.このWordPressのブログがハッキングさを数時間で12月24日(ニースのクリスマスプレゼント! )よりロシアです。 The hacker exploited several WordPress vulnerabilities in administrative scripts to gain full access to the website (as permitted to apache user), including the ability to upload & run scripts, delete any file owned by apache user, view the file and directories etc. This is a full disclosure on the how the site was hacked and how I detected and removed the hack along with few comments on the state of WordPress security.いくつかのWordPressの脆弱性を悪用するハッカーのスクリプトを得る全文へのアクセスを管理するウェブサイト(として許可してApacheユーザ) 、などのスクリプトを実行する能力をアップロードすると、任意のファイルを削除Apacheユーザが所有し、対象のファイルやディレクトリ等これは、完全に開示するにはどのようにサイトがハッキングさを検出し、削除して、どのよう私と一緒にいくつかのコメントが、ハックの状態をWordPressの安全保障します。 I added a WordPress plugin and made modifications to prevent any such hacking attempts in future using WordPress.私追加されましたWordPressの差込式とはどのようなハッキングの変更を防ぐための今後の試みを使用してWordPressのです。 This is a must read for WordPress bloggers.これは、 WordPressのbloggersを読む必要があります。


How the site hacking was detected?どのようにサイトのハッキングが検出さですか?

The website was normal.このウェブサイトは、正常な動作です。 However when I tried to publish or even save a post, it simply showed a blank page.しかしみましたを公開するときや投稿を保存するにも、それだけでは空白のページを示しています。 The post was never published or even saved.ポストはなかったにも公開または保存します。 I knew something was wrong.私を知っていた何かが間違っている。

My first suspect were couple of plugins which contacted external servers after a publish.私の最初の容疑者が接触したカップルのプラグインを外部サーバーの後に刊行します。 I disabled them.私無効になっている。 I also disabled the ping sites as they were sometimes known to cause problems.私も無効にしてpingを実行サイトとしても知られていたが原因で問題が発生します。 None of that helped.その助けなしです。 I progressively disabled all of the plugins.徐々に無効になって私のすべてのプラグインです。 Even with all the plugins disabled, the post wouldn’t publish.すべてのプラグインも無効にすると、ポストはない刊行します。 I was left with only one option.私は左に1つだけオプションを選択します。

I decided to trace WordPress code to find out the cause of error.私のWordPressのコードをトレースすることを決めたのが原因で発生することを確認するにエラーが発生します。 I started with the file for post submission - post.php.私のファイルを作成発表申込を開始-するp ost.phpです。 I found something startling with WordPress code which seriously undermines its security, a flawed design choice but more on it later.私が何かを真剣に驚くべきWordPressのコードを損なうしてセキュリティのレベルは、欠陥のあるデザインの他に選択の余地がないことへ。 post.php calls admin.php which calls wp-config.php which in turn calls wp-settings.php. admin.phpはコールの呼び出しをしpost.phpのWP - config.phpを呼び出しになるのWP - settings.phpです。 wp-settings is an interesting file. WPの設定は面白いファイルです。 This file isn’t just about settings.このファイルは、単に設定を変更します。 It loads tons of files, loads and executes the plugins and more.それが読み込まトンのファイルを実行し、プラグインや他の負荷とします。 The problem was, as I originally suspected, in the plugins but which one?この問題は、容疑者として私はもともとは、 1つのプラグインがこれですか? The code which loads the plugins in WordPress is:プラグインのコードを起動し、 WordPressのは:

 if ( get_option('active_plugins') ) {  $current_plugins = get_option('active_plugins');  if ( is_array($current_plugins) ) {   foreach ($current_plugins as $plugin) { if (” != $plugin && file_exists(ABSPATH . PLUGINDIR . ‘/’ . $plugin))     include_once(ABSPATH . PLUGINDIR . ‘/’ . $plugin); }  } } もし( get_option ( ' active_plugins ' ) ) ( $ current_plugins = get_option ( ' active_plugins ' ) ;場合( is_array ( $ current_plugins ) ) ( foreach ( $ current_pluginsとして$差込式) ( 場合( " ! = $差込式& & file_exists ( abspathです。 plugindirです。 ' / ' 。 $差込式) ) include_once ( abspath 。 plugindirです。 ' / ' 。 $差込式) ; ) ) ) 

The active plugins, as you can see, are loaded directly with include_once.アクティブなプラグインは、ご覧のように、直接include_onceが読み込まれる。 How do I find the plugin which while loading is causing the script to die?どうすればよいの差込式の中のスクリプトを読み込んでいますが原因で死ぬのですか?
I added simple syslog() statements before and after the plugin.私追加されましたシンプルなのsyslog ( )ステートメントの前と後の差込式です。 However it generated copious output from all the traffic.しかしそれからの出力のすべてのトラフィックを多量に生成します。
Remember I was debugging on a heavily trafficked live site.覚えて私はデバッグは、多額のトラフィックのライブサイトです。 So I added a define in post.php which I was checking before doing a syslog.定義を追加するpost.phpだから私はこれを行う前にsyslogにチェックします。 The debugging code was:デバッグコードは:
if (” != $plugin && file_exists(ABSPATH . ‘wp-content/plugins/’ . $plugin)) {もし( " ! = $差込式& & file_exists ( abspathです。 ' wp-content/plugins / ' 。 $差込式) ) (
if(defined(’TG_ADMIN’)) syslog(LOG_ALERT, “Loading $plugin…”);もし(定義されて( ' tg_admin ' ) )のsyslog ( log_alert 、 "読み込んでいます$差込式… " ) ;
include_once(ABSPATH . ‘wp-content/plugins/’ . $plugin); include_once ( abspathです。 ' wp-content/plugins / ' 。 $差込式) ;
if(defined(’TG_ADMIN’)) syslog(LOG_ALERT, “Loaded $plugin…”);もし(定義されて( ' tg_admin ' ) )のsyslog ( log_alert 、 "ロード$差込式… " ) ;
}

The result was surprising.その結果は驚くべきことです。 The first plugin loaded was not even a plugin I knew existed, let alone use it.ロードの最初のプラグインは、プラグインすら存在を知っていた私はおろか、使用することです。 It was named ro8kbsmawge.txt.それは、名前のro8kbsmawge.txtです。 The full path to the plugin was /../../../../../../../../../../../../../../../../../../tmp/ro8kbsmawge.txt差込式は、フルパスを/../../../../../../../../../../../../../../ ../../../../tmp/ro8kbsmawge.txt
Effectively the file path was /tmp/ro8kbsmawge.txt.ファイルのパスを効果的には、 / tmp/ro8kbsmawge.txtです。 A telltale sign of this hacker is the presence of the file ro8kbsmawge.txt in your tmp directory.の証拠となり得る兆しは、次のとこのハッカーは、ファイルが存在するro8kbsmawge.txt tmpディレクトリにしています。

I renamed the file and the problem was solved for now.私の名前を変更したファイルと今のところ問題は解決します。 I could publish posts finally.私が刊行の記事を最後にします。 However my site was still not secure against future attacks.しかし自分のサイトにはまだ将来の攻撃に対するセキュリティで保護します。 I will detail next at how I secured my site and provide more information on the perpetrator and how the site was hacked in the first place.私は次の詳細を自分のサイトにセキュリティで保護する方法を提供私の詳細については、加害者とどのようにサイトがハッキングの最初の場所です。

How the site was hacked using WordPress?を使用してどのようにサイトがハッキングさWordPressのですか?

The site exploited a vulnerability in /wp-admin/options.php which allowed it to get the authentication cookies it required to upload the file ro8kbsmawge.txt to my /tmp directory using /wp-admin/inline-uploading.php.当サイトの脆弱性を悪用する/ wp-admin/options.phpの認証を取得することが可クッキーのファイルをアップロードすることが必要となります。 ro8kbsmawge.txt私の/ tmpディレクトリを使用して/ wp-admin/inline-uploading.phpです。 It then used /wp-admin/plugins.php to activate the ro8kbsmawge.txt as a plugin while using options-misc along the way.その後、使用される/ wp-admin/plugins.phpを有効にするオプションを使用してプラグインとしてro8kbsmawge.txt - miscに道に沿っています。

Finally the hacker accessed the site using his magic word piska233 and browsed few directories on my server before retiring for the day.最後に、ハッカーのサイトにアクセスするとpiska233魔法の言葉を使用して、いくつかのディレクトリを参照してサーバーの日を前に引退する。 All of these was done within a span of 3 minutes which leads to the conclusion that a script was used to exploit the holes and orchestrate the hacking.これらのすべてのスパンが行われた3分に進んでいくと、という結論に悪用するには、スクリプトを使用してハッキングの穴を体系化しています。

The full log, except the IP address 217.74.245.85 which was removed for redundancy, of hackers action on my site is:の完全なログには、 217.74.245.85のIPアドレスを除いて、冗長性が削除さを、自分のサイトがハッカーに対処する:

[24/Dec/2007:07:40:22 -0600] “POST /wp-admin/options.php HTTP/1.0″ 200 1713 “http://blog.taragana.com/wp-admin/options.php” “Opera” [ 24/dec/2007 : 7時40分22秒-0600 ] "ポスト/ wp-admin/options.phpのHTTP/1.0 " 200 1713 " http://blog.taragana.com/wp-admin/options.php " "オペラ"
[24/Dec/2007:07:40:24 -0600] “POST /wp-admin/options.php HTTP/1.0″ 302 471 “http://blog.taragana.com/wp-admin/options.php” “Opera” [ 24/dec/2007 : 7時40分24秒-0600 ] "ポスト/ wp-admin/options.php HTTP/1.0の" 302 471 " http://blog.taragana.com/wp-admin/options.php " "オペラ"
[24/Dec/2007:07:40:26 -0600] “POST /wp-admin/inline-uploading.php?post=-1&action=upload HTTP/1.0″ 200 1645 “http://blog.taragana.com/inline-uploading.php?post=-1&action=upload” “Opera” [ 24/dec/2007 : 7時40分26秒-0600 ] "ポスト/ wp-admin/inline-uploading.phpですか?ポスト=- 1 &アクション=アップロードのHTTP/1.0 " 200 1645 " http://blog.taragana.com /インライン- uploading.phpですか?ポスト=- 1 &アクション=アップロード" "オペラ"
[24/Dec/2007:07:40:29 -0600] “POST /wp-admin/inline-uploading.php?post=-1&action=upload HTTP/1.0″ 200 142 “http://blog.taragana.com/inline-uploading.php?post=-1&action=upload” “Opera” [ 24/dec/2007 : 7時40分29秒-0600 ] "ポスト/ wp-admin/inline-uploading.phpですか?ポスト=- 1 &アクション=アップロードのHTTP/1.0 " 200 142 " http://blog.taragana.com /インライン- uploading.phpですか?ポスト=- 1 &アクション=アップロード" "オペラ"
[24/Dec/2007:07:40:52 -0600] “POST /wp-admin/options.php HTTP/1.0″ 200 1713 “http://blog.taragana.com/wp-admin/options.php” “Opera” [ 24/dec/2007 : 7時40分52秒-0600 ] "ポスト/ wp-admin/options.phpのHTTP/1.0 " 200 1713 " http://blog.taragana.com/wp-admin/options.php " "オペラ"
[24/Dec/2007:07:40:54 -0600] “POST /wp-admin/options.php HTTP/1.0″ 302 471 “http://blog.taragana.com/wp-admin/options.php” “Opera” [ 24/dec/2007 : 7時40分54秒-0600 ] "ポスト/ wp-admin/options.php HTTP/1.0の" 302 471 " http://blog.taragana.com/wp-admin/options.php " "オペラ"
[24/Dec/2007:07:40:57 -0600] “POST /wp-admin/inline-uploading.php?post=-1&action=upload HTTP/1.0″ 200 1645 “http://blog.taragana.com/inline-uploading.php?post=-1&action=upload” “Opera” [ 24/dec/2007 : 7時40分57秒-0600 ] "ポスト/ wp-admin/inline-uploading.phpですか?ポスト=- 1 &アクション=アップロードのHTTP/1.0 " 200 1645 " http://blog.taragana.com /インライン- uploading.phpですか?ポスト=- 1 &アクション=アップロード" "オペラ"
[24/Dec/2007:07:41:11 -0600] “GET /wp-admin/options-misc.php HTTP/1.1″ 200 7764 “-” “Opera/9.24 (Windows NT 5.1; U; ru)” [ 24/dec/2007 : 7時41分11秒-0600 ] "取得/ wp-admin/options-misc.php http/1.1 " 200 7764 " -" " o pera/9.24(のW indowsN T5 .1;集U ; r u) "
[24/Dec/2007:07:41:15 -0600] “GET /wp-admin/wp-admin.css?version=2.0.7 HTTP/1.1″ 304 - “http://blog.taragana.com/wp-admin/options-misc.php” “Opera/9.24 (Windows NT 5.1; U; ru)” [ 24/dec/2007 : 7時41分15秒-0600 ] "取得/ wp-admin/wp-admin.cssですか?バージョン= 2.0.7 http/1.1 " 304 -" h ttp://blog.taragana.com/ wp-admin/options-misc.php " " opera/9.24 (のWindows NT 5.1 ;集U ; ru ) "
[24/Dec/2007:07:41:15 -0600] “GET /wp-includes/js/fat.js HTTP/1.1″ 304 - “http://blog.taragana.com/wp-admin/options-misc.php” “Opera/9.24 (Windows NT 5.1; U; ru)” [ 24/dec/2007 : 7時41分15秒-0600 ] "取得/ wp-includes/js/fat.js http/1.1 " 304 -" h ttp://blog.taragana.com/wp-admin/options- misc.php " " opera/9.24 (のWindows NT 5.1 ;集U ; ru ) "
[24/Dec/2007:07:41:12 -0600] “POST /wp-admin/inline-uploading.php?post=-1&action=upload HTTP/1.0″ 302 - “http://blog.taragana.com/inline-uploading.php?post=-1&action=upload” “Opera” [ 24/dec/2007 : 7時41分12秒-0600 ] "ポスト/ wp-admin/inline-uploading.phpですか?ポスト=- 1 &アクション=アップロードHTTP/1.0の" 302 -" h ttp://blog.taragana.com /インライン- uploading.phpですか?ポスト=- 1 &アクション=アップロード" "オペラ"
[24/Dec/2007:07:41:21 -0600] “GET /wp-admin/plugins.php?action=activate&plugin=/../../../../../../../../../../../../../../../../../../tmp/ro8kbsmawge.txt&_wpnonce= HTTP/1.1″ 200 1474 “http://blog.taragana.com/wp-admin/plugins.php?action=activate&plugin=/../../../../../../../../../../../../../../../../../../tmp/ro8kbsmawge.txt” “Opera” [ 24/dec/2007 : 7時41分21秒-0600 ] "取得/ wp-admin/plugins.phpですか?アクション=アクティブ&差込式=/../../../../../../. ./../../../../../../../../../../../tmp/ro8kbsmawge.txt & _wpnonce = http/1.1 " 200 1474 "のHTTP : / / blog.taragana.com / WPの管理者/ plugins.phpですか?アクション=アクティブ&差込式=/../../../../../../../../../.. /../../../../../../../../ tmp/ro8kbsmawge.txt " "オペラ"
[24/Dec/2007:07:41:23 -0600] “GET /wp-admin/plugins.php?action=activate&plugin=/../../../../../../../../../../../../../../../../../../tmp/ro8kbsmawge.txt&_wpnonce=7b4c8019bd HTTP/1.1″ 302 - “http://blog.taragana.com/wp-admin/plugins.php?action=activate&plugin=/../../../../../../../../../../../../../../../../../../tmp/ro8kbsmawge.txt” “Opera” [ 24/dec/2007 : 7時41分23秒-0600 ] "取得/ wp-admin/plugins.phpですか?アクション=アクティブ&差込式=/../../../../../../. ./../../../../../../../../../../../tmp/ro8kbsmawge.txt & _wpnonce = 7b4c8019bd http/1.1 " 302 -"のH TTP : / / blog.taragana.com / WPの管理者/ plugins.phpですか?アクション=アクティブ&差込式=/../../../../../../../../../. ./../../../../../../../../tmp/ro8kbsmawge.txt " "オペラ"
[24/Dec/2007:07:41:30 -0600] “GET /?piska23 HTTP/1.1″ 200 95716 “http://lamer/mwpep/?mode=shell&what=20″ “Opera/9.24 (Windows NT 5.1; U; ru)” [ 24/dec/2007 : 7時41分30秒-0600 ] "取得/ですか? piska23 http/1.1 " 200 95716 " http://lamer/mwpep/?mode=shell&what=20 " " opera/9.24 ( Windows NTの5.1 ;集U ; ru ) "
[24/Dec/2007:07:41:36 -0600] “GET /?piska233 HTTP/1.1″ 200 15840 “-” “Opera/9.24 (Windows NT 5.1; U; ru)” [ 24/dec/2007 : 7時41分36秒-0600 ] "取得/ですか? piska233 http/1.1 " 200 15840 " -" " o pera/9.24(のW indowsN T5 .1;集U ; r u) "
[24/Dec/2007:07:41:44 -0600] “POST /wp-admin/options.php HTTP/1.1″ 302 471 “http://blog.taragana.com/wp-admin/options-misc.php” “Opera/9.24 (Windows NT 5.1; U; ru)” [ 24/dec/2007 : 7時41分44秒-0600 ] "ポスト/ wp-admin/options.php http/1.1 " 302 471 " http://blog.taragana.com/wp-admin/options-miscです。 PHPの" " opera/9.24 (のWindows NT 5.1 ;集U ; ru ) "
[24/Dec/2007:07:41:47 -0600] “POST /wp-admin/options.php HTTP/1.1″ 302 471 “http://blog.taragana.com/wp-admin/options-misc.php” “Opera/9.24 (Windows NT 5.1; U; ru)” [ 24/dec/2007 : 7時41分47秒-0600 ] "ポスト/ wp-admin/options.php http/1.1 " 302 471 " http://blog.taragana.com/wp-admin/options-miscです。 PHPの" " opera/9.24 (のWindows NT 5.1 ;集U ; ru ) "
[24/Dec/2007:07:41:55 -0600] “GET /?piska233&dira=/tmp HTTP/1.1″ 200 9930 “-” “Opera/9.24 (Windows NT 5.1; U; ru)” [ 24/dec/2007 : 7時41分55秒-0600 ] "取得/ですか? piska233 & dira = / tmpのhttp/1.1 " 200 9930 " -" " o pera/9.24(のW indowsN T5 .1;集U ; r u) "
[24/Dec/2007:07:41:54 -0600] “GET /wp-admin/options-misc.php?updated=true HTTP/1.1″ 200 7842 “http://blog.taragana.com/wp-admin/options-misc.php” “Opera/9.24 (Windows NT 5.1; U; ru)” [ 24/dec/2007 : 7時41分54秒-0600 ] "取得/ wp-admin/options-misc.phpですか?更新済み= trueをhttp/1.1 " 200 7842 " http://blog.taragana.com/wp-管理者/オプション- misc.php " " opera/9.24 (のWindows NT 5.1 ;集U ; ru ) "
[24/Dec/2007:07:42:36 -0600] “POST /index.php?piska233&dira=./ HTTP/1.1″ 200 36721 “http://blog.taragana.com/?piska233″ “Opera/9.24 (Windows NT 5.1; U; ru)” [ 24/dec/2007 : 7時42分36秒-0600 ] "ポスト/ index.phpか。 piska233 & dira =. / http/1.1 " 200 36721 " http://blog.taragana.com/?piska233 " " opera/9.24 (のWindows NT 5.1 ;集U ; ru ) "
[24/Dec/2007:07:43:23 -0600] “GET /index.php?piska233&dira=./wp-content/plugins/Wysi-Wordpress/themes/advanced/docs/es/images HTTP/1.1″ 200 6506 “-” “Opera/9.24 (Windows NT 5.1; U; ru)” [ 24/dec/2007 : 7時43分23秒-0600 ] "取得/ index.phpか。 piska233 & dira =. / wp-content/plugins/wysi-wordpress/themes/advanced/docs/es/images http/1.1 " 200 6506 " -" " o pera/9.24(のW indowsN T5 .1;集U ; r u) "
[24/Dec/2007:07:43:38 -0600] “GET /wp-content/plugins/Wysi-Wordpress/themes/advanced/docs/es/images HTTP/1.1″ 301 298 “-” “Opera/9.24 (Windows NT 5.1; U; ru)” [ 24/dec/2007 : 7時43分38秒-0600 ] "取得/ wp-content/plugins/wysi-wordpress/themes/advanced/docs/es/images http/1.1 "三〇一二九八" -" " o pera/9.24 (のWindows NT 5.1 ;集U ; ru ) "
[24/Dec/2007:07:43:40 -0600] “GET /wp-content/plugins/Wysi-Wordpress/themes/advanced/docs/es/images/ HTTP/1.1″ 200 604 “-” “Opera/9.24 (Windows NT 5.1; U; ru)” [ 24/dec/2007 : 7時43分40秒-0600 ] "取得/ wp-content/plugins/wysi-wordpress/themes/advanced/docs/es/images / http/1.1 " 200 604 " -" "オペラ/ 9.24 (のWindows NT 5.1 ;集U ; ru ) "

The good news is that no harm was done.良いニュースは、悪影響を与えることは絶対にありませんでした。

WordPress security issues & design flaw WordPressの安全保障問題と設計上の欠陥

The basic design flaw is that loading WordPress configuration (required for database access for authentication checks) loads wp-settings which loads tons of other PHP files as well as all the WordPress plugins and any hacks.の基本的な設計上の欠陥は、読み込んでいますWordPressの設定(データベースにアクセスするために必要な認証チェック)負荷のWP設定が読み込まトンの他のphpファイルだけでなく、任意のすべてのWordPressの差込hacksです。 All of these are done even before you have a chance to authenticate the user.これらのすべてのさえが完了する前にユーザーを認証するにはチャンスです。 This is extremely dangerous for administration scripts as it allows a hacker to pass arguments to and execute gazillions of WordPress files which may or may not have proper security checks in place.この管理用スクリプトとしては非常に危険なハッカーを渡すことができるとの引数をgazillionsのWordPressファイルを実行することはできませんが5月または適切なセキュリティチェックはそのままにします。 User authentication and entitlement should be done at the very beginning to prevent unauthenticated scripts from proceeding any further.ユーザ認証とエンタイトルメントで行われなければならないのを防ぐの冒頭に認証されていない任意のより詳細なスクリプトを続行します。 To do that wp-config must be modified to not include wp-settings.これを行うには設定しなければならないのWP - WPの更新を含めない-設定を変更します。 It should be separately included where required, even at the cost of redundancy.個別に含まれるものとすべきである必要があれば、の冗長性を犠牲にしてもです。 Administration scripts (under wp-admin) requires only wp-config to get the database details to authenticate the user and identify its entitlements.管理スクリプト(されてWPの管理者)に必要なだけのWP - configを入手して、ユーザーを認証するデータベースの内容とその権利を識別します。 After authentication the rest should be loaded.認証後、残り必要が読み込まれます。 This flaw was exploited to get the authentication cookie details which was subsequently used.この欠陥が悪用認証cookieを取得するには、その後の詳細を使用します。 The exact exploit used in this case is hard to find from just server logs.このケースで使用され、正確な搾取を見つけるのは難しいからサーバーのログだけです。 However it was caused by late authentication problem as described above.しかし後半認証の問題によって引き起こされることは、前述のようにします。

There are were known issues with both options.php & upload script, some of which are detailed には既知の問題の両方がoptions.php &アップロードスクリプトは、いくつかの詳細 hereここで .です。

One of the challenges with WordPress is that security considerations was mostly an afterthought (feel free to disagree) which were latched on as WordPress became more and more popular. WordPressの課題の1つは、セキュリティについての考慮事項は、ほとんどの後知恵(お気軽に合わない)のWordPressなったとしてラッチさがますます多くの人気です。 You have to continuously update your WordPress to keep up with the latest patches. WordPressのを継続的に更新して、最新のパッチに遅れないようにします。

There are 71 reported security advisories in Secunia (22 reported in 2007) and 9 viruses based on WordPress (one from 2007). 71報告には、セキュリティ勧告ではSecunia ( 22報告された2007 )に基づいて、 9ウイルスのWordPress ( 1つから2007年) 。

Most likely the site was hacked using the cookies authentication vulnerability as detailed最も高いのサイトがハッキングさとして使用して、クッキー認証の脆弱性の詳細 hereここで .です。

Several WordPress plugins and themes also have security advisories: WordPressの差込とテーマをいくつかのセキュリティ勧告も:
- AdSense-Deluxe 0.x (plugin for WordPress) -A dSenseデラックス0 .x以降(差込式のW ordPress)
- AndyBlue 1.x (theme for WordPress) -a ndyblue1 .xの(のテーマをW ordPressのために)
- Blix 0.x (theme for WordPress) -ブリクス0 .x以降(のテーマをW ordPressのために)
- Blixed 1.x (theme for WordPress) -軽く酔った1 .xの(のテーマをW ordPressのために)
- BlixKrieg 2.x (theme for WordPress) -b lixkrieg2 .xの(のテーマをW ordPressのために)
- Blue Memories 1.x (theme for WordPress) -青の思い出1 .xの(のテーマをW ordPressのために)
- myGallery 1.x (plugin for WordPress) -m ygallery1 .xの(差込式のW ordPress)
- PictPress 1.x (plugin for WordPress) -p ictpress1 .xの(差込式のW ordPress)
- Pool 1.x (theme for Wordpress) -プール1 .xの(のテーマをW ordPressのために)
- Redoable 1.x (theme for WordPress) -r edoable1 .xの(のテーマをW ordPressのために)

You can read all the Secunia advisories on WordPress勧告を読むことができます上のすべてのはSecuniaのWordPress hereここで .です。

Who was the hacker? whoは、ハッカーですか?

The IP address of the user responsible for hacking my site is 217.74.245.85 .のIPアドレスをユーザーに自分のサイトがハッキング217.74.245.85責任を負う。 The IP address belongs to KUBANGSM-NET:のIPアドレスに属してkubangsm -純:

 % Information related to '217.74.245.0/24AS29497'  route:          217.74.245.0/24 descr:          KUBANGSM-NET origin:         AS29497 mnt-by:         KUBANGSM-MNT source:         RIPE # Filtered % .74.245.0/24as29497に関連する情報を'217 'ルート: 217.74.245.0/24 descr : kubangsm - Netの起源: as29497 mnt -者: kubangsm - mntソース:熟した#フィルタリング 

It is owned by:それによって所有され:

 person:       Volkov Denis address:      61, Gimnazicheskaya str.担当者名:ボルコフドニ住所: 61 、 gimnazicheskaya str 。 350000, Krasnodar, Russia phone:        +7 8612 660126 fax-no:       +7 8612 401505 e-mail:       d.volkov@kuban.mts.ru nic-hdl:      VD370-RIPE source:       RIPE # Filtered 350000 、クラスノダール、ロシア電話番号: +7 8612 660126ファックス-いいえ: +7八六一二四〇一五〇五電子メール: d.volkov @ kuban.mts.ruのNIC - hdl : vd370 -熟したソース:熟した#フィルタリング 

Their website is彼らのウェブサイトは、 http://www.kuban.mts.ru/ .です。 They appear to be legitimate mobile & internet service provider.彼ら表示される合法的なモバイル&インターネットサービスプロバイダです。 Most likely their internet service is being abused by the spammer.最も高いインターネットサービスに虐待されたのspammerされています。 Nevertheless I decided toしかし私に決定 ban this IP address from accessing my serverこのIPアドレスからのアクセスを禁止するマイサーバー .です。

The hacker was most likely using Opera 9.24 browser (almost latest version) on Windows XP (NT 5.1).ハッカーは、最も高いのブラウザを使用してオペラ9.24 (ほぼ最新版)をWindows XP ( NTの5.1 ) 。 While user agent can be faked, there is no reason to suspect so in this case.ユーザーエージェントを偽装できる、という理由はないので、この場合に容疑者です。 The user agent string also shows that he was using the russian language file of Opera.のユーザーエージェント文字列も表示していたロシア語の言語ファイルを使用して、オペラです。

マジックシェルのスクリーンショットをマグ

Anatomy of the hacking script解剖学は、ハッキングスクリプト

The hacking script is a php script with aa nice comment and TODO line:このスクリプトは、 PHPスクリプトのハッキングに単3ニースコメント、およびすべての行:
/*Magic Include Shell by Mag icq 884888*/ / *マジック含まれてICQのシェルをマグ884888 * /
//TODO: ñëèòü ôàéëî íà ñâîé ôòï (!) / / TODO :このñëèòü ôàéëî íà ñâîé ôòï ( ! )

Effectively it is a file manager, probably adapted from any of the free php file manager’s on the net.ファイルマネージャを効果的にすることは、おそらく適応者のいずれかの無料ネット上のPHPファイルマネージャのです。 It allows you to:それを使用すると:

  • Browse directories and filesディレクトリとファイルをブラウズする
  • Edit filesファイルの編集
  • Rename filesファイルの名前を変更する
  • Delete filesファイルの削除
  • zip & unzip files郵便&解凍ファイル
  • Upload & download files & directoriesダウンロードファイルのアップロード& &ディレクトリ
  • Execute arbitrary PHP scripts任意のPHPスクリプトを実行
  • Execute arbitrary shell commands任意のシェルコマンドを実行
  • Provides basic server, system & PHP information基本的なサーバーを提供、システム& PHP情報

The bulk of the code is executed when it receives a particular query string to a normal HTTP GET request.コードが実行さの大半は、特定のクエリ文字列を受信したときに、通常のHTTP GETリクエストをします。 So while http://blog.taragana.com/ will work as usual, http://blog.taragana.com/?piska233 will open with this magical hidden shell which will expose your entire website to an outside hacker.このため、普段どおりに働くhttp://blog.taragana.com/は、 http://blog.taragana.com/?piska233が開き、この魔法の隠されたシェルが全体のウェブサイトを公開して外部のハッカーです。
Note: There is nothing magical about piska233.注: piska233には何も不思議な会社です。 It is a password which was most likely allowed to be chosen and given as input to the original script which injected this trojan horse on my site.これは、パスワードが許可さに選ばれると最も高いの入力を与えられたとして、元のスクリプトが注入されたこのトロイの木馬を自分のサイトです。

A trojan which protects itself against worms…自分自身を保護するトロイの木馬ワーム…

The trojan takes steps to protect itself against worm!このトロイの木馬ワームに対しては、手順を実行して自分自身を守る! The code at the end which is always executed is:このコードの末尾には、常に実行は:

$post_arr=implode('.',$_POST); $ post_arr = implode ('.',$_ポスト) ;
$get_arr=implode('.',$_GET); $ get_arr = implode ('.',$_取得) ;
$cook_arr=implode('.',$_COOKIE); $ cook_arr = implode ('.',$_クッキー) ;
$post_arr_key=implode('.',@array_flip($_POST)); $ post_arr_key = implode ('.',@ array_flip ( $ _post ) ) ;
$get_arr_key=implode('.',@array_flip($_GET)); $ get_arr_key = implode ('.',@ array_flip ( $ _get ) ) ;
$cook_arr_key=implode('.',@array_flip($_COOKIE)); $ cook_arr_key = implode ('.',@ array_flip ( $ _COOKIEの) ) ;
$other_shtuki=@file_get_contents('php://input'); $ other_shtuki = @とfile ( 'てphp : / /入力' ) ;
$cracktrack = strtolower($post_arr.$get_arr.$cook_arr.$post_arr_key.$get_arr_key.$cook_arr_key.$other_shtuki); $ cracktrack = strtolower ( $ post_arrです。 $ get_arrです。 $ cook_arrです。 $ post_arr_keyです。 $ get_arr_keyです。 $ cook_arr_keyです。 $ other_shtuki ) ;
$wormprotector = array('base64','user_pass','union','select','substring','or id='); $ wormprotector =アレイ( ' base64で' 、 ' user_pass ' 、 '労働組合' 、 '選択' 、 '文字列' 、 'またはID = ' ) ;
$checkworm = str_replace($wormprotector, '*', $cracktrack); $ checkworm = str_replace ( $ wormprotector 、 ' * ' 、 $ cracktrack ) ;
if ($cracktrack != $checkworm) die(""); もし( $ cracktrack ! = $ checkworm ) 死ぬ("");

It checks for certain keywords (in $wormprotector array) within GET, POST & COOKIE data.それをチェックし、特定のキーワード( $ wormprotector配列)を取得、ポスト& cookieデータです。 When they are present it simply aborts.存在する場合には単に中断します。 This is one of the means to detect the current version of the script.これは1つの手段を検出し、現在のバージョンのスクリプトに送信します。 This is also the reason why it failed to submit a post.これもまたその理由はなぜポストを提出することに失敗しました。 An url such as this would also die - http://localhost/wordpress/?select as would http://localhost/wordpress/?base64.このようなURLもまた死ぬ-h ttp://localhost/wordpress/?selectとしてはh ttp://localhost/wordpress/?base64です。
However there is nothing to be happy about.しかしの余地がないに喜んでください。 It will take less than a minute to modify the script and make it immune to detection in WordPress.一分未満がかかるスクリプトを変更するに免疫を検出することでWordPressのです。

How to protect your WordPress site from hacking?どのように保護してWordPressのサイトからのハッキングですか?

You can protect your administration scripts (scripts under wp-admin), where most attacks originate including this one, by restricting access to your admin scripts to specific IP address or IP address range.スクリプトを保護して管理することができます(スクリプトされてWPの管理者) 、ここで、この1つを含むほとんどの攻撃に由来する、お客様の管理者のアクセスを制限するスクリプトを特定のIPアドレスまたはIPアドレスの範囲です。 You can also add a basic authentication on top of WordPress by using your httpd.conf file or .htaccess.追加することもできますWordPressの上に、基本的な認証を使用してhttpd.confファイルまたは。 htaccessを使用します。 This adds a layer of security which any hacker will have to overcome before he gets to your WordPress vulnerabilities.この層のセキュリティを追加する任意のハッカーが彼の前を克服するにはWordPressの脆弱性を取得しています。

WordPress should be upgraded as regularly as possible. WordPressのアップグレードとして定期的に可能な限りすべきである。 However that is easier said than done.しかしは、より簡単によると完了です。 Normally I prefer to wait a few versions before the new versions stabilize.私を待ってから、通常いくつかのバージョンを好むの前に新しいバージョンを安定させる。

WordPress security vulnerabilities affects every one of us, WordPress based bloggers. WordPressのセキュリティ上の脆弱性の影響を及ぼすごとに1つの問い合わせは、 WordPressのベースのブロガーです。 While I was fully aware of the possibilities and even thought of writing a plugin to address these issues before, I decided to wait (and address more urgent issues or so I thought) relying on the law of probability to protect my sites; after all there are several million WordPress blogs out there, how much chance of being targeted by a hacker?私は十分承知しながらの可能性とも考えて、これらの問題に対処するプラグインを書く前に、私を待つことを決めた(と住所を他の緊急課題かそこらと思った)に頼って、私のサイトを保護する確率の法則;した後のすべてのあるは、数百万のWordPress Blogsアウトは、どれくらいの可能性がハッカーのターゲットに設定さですか? Well, as it turns out, I was wrong.ええと、結局のところ、私は間違っている。
To simplify securing WordPress, I have created a plugin, to be released soon, which leverages these ideas and more to secure your WordPress installations. WordPressの確保を簡素化する、私はプラグインを作成し、まもなく発売に活用して、これらのアイデアや他のWordPressのインストールをセキュリティで保護する。 It works with your .htaccess but it also works even when .htaccess facility is not available.これで動作して。 htaccessを使用したときにそれさえも動作します。 htaccessの施設ではない入手可能です。 I have already started using it on my blogs.私はすでに開始して私のブログを使用しています。