radiantcms.org がクラックされていた話

あんまり話題にもならないRadiantCMSですが、先日radiantcms.orgがクラックされていたというメールがMLに流れておりました。え、なにか脆弱性でもあるの?と興味深く見守っていたのですが、ようやく経緯が発表されたようです。

Radiant CMS > Radiant Site Hacked

結論としては、RadiantCMS自体に問題があるというわけではない、ようです。



1) He first logged on to the admin part of the demo site:

http://demo.radiantcms.org/admin/pages

2) Then he opened up another tab an initialized a new session hitting
this URL:

http://radiantcms.org/admin/login

3) He then changed the _session_id cookie to the value used by the demo
site using the Web Developer extension in Fox.

4) With the correct cookie set he could now bypass the login screen and
hit the following URL:

http://www.radiantcms.org/admin/pages

The reason this worked is that the CGI session stuff is configured by
default to place sessions in /tmp for all Ruby applications. Both the
demo application and the version of Radiant powering the Radiant Web
site were configured to use this default. This effectively meant that
they could share the same sessions the _session_id cookie was set up
correctly.

ということで問題は、セッションファイルをみんな/tmpにぶちまけていたから、でした。だから demo.radiantcms.org のセッションIDで radiantcms.org にもログインできちゃいました!という感じ。対策としては、セッション情報はActiveRecordでデータベースに格納しちゃいましょう、とのこと。

...えーと、あまりに腑甲斐無いセキュリティー意識はともかくとして、5月15日から7月23日までの二ヶ月以上改竄に気付かなかったというのは問題ありだと思います。だって、攻撃者はわざわざRadiantCMSのユーザアカウントを新規に作成してたわけだし、もう少し早く気付いて欲しかったところ。あと、改竄された事実はMLに流れましたが、その影響があまりよく説明されていないところが不安です。まあ "The attacker added an invisible link on the homepage to another Web site." としか書いてないので、変なjavascriptが埋め込まれていたとかいうわけではなさそうですが。

以上、結局のところRadiantCMS自体に問題はないわけです。とても良いCMSなだけに、こんなことで不信感を持たれてしまったらちょっと残念です。www.ruby-lang.org はRadiantCMSで運用されているのだから、もう少しセキュリティーには気をつけないとマズいのでは、と思います。