phpmailerをsendmailで使った時のコマンドインジェクション

Date 2007-06-13 06:03:31 | Category: XOOPS

in englishin japanese

http://larholm.com/2007/06/11/phpmailer-0day-remote-execution/

この件、恥ずかしながら、大垣さんのブログから知りました。(やはり大垣さんは素晴らしい!)
http://blog.ohgaki.net/index.php/yohgaki/2007/06/12/phpmailera_sa_a_sa_a_ca_sa_ca_sa_ma_ma_s

この穴を突けば、攻撃者がいきなりコマンドを実行できます。

XOOPSも、phpmailerを利用してますので、本来なら緊急の穴なのですが、実はデフォルトがphp mail() であるため、ここをあえてsendmailに変更した人だけが対象となります。

とにかく、一般設定->メール設定において、メール送信方法がsendmailとなっていないことを確認してください。通常、sendmailをコマンドとして利用できるなら、php mail()関数だって利用できるはずです。(よほど変な設定のホスティングサービスでもなければ)

とりあえず、Protector-3.04 では、このチェックも入れてみました。
メール設定がsendmailだったら、「いますぐ変更して!」という旨のアラートを出します。

検索でヒットするように、Protectorが出力するアラートメッセージを貼り付けておきます。

"phpmailer security hole! Change the preferences of mail from "sendmail" to another, or upgrade the core right now!"





You can read more news at PEAK XOOPS.
http://xoops.peak.ne.jp

The URL for this story is:
http://xoops.peak.ne.jp/md/news/index.php?page=article&storyid=431