PEAK XOOPS - インストーラアタック in englishin japanese

Archive | RSS |
XOOPS
XOOPS : インストーラアタック
Poster : GIJOE on 2007-06-03 06:40:29 (9365 reads)

in englishin japanese
XOOPS (Cube2.1も) でinstallフォルダを残しておくと、管理画面で警告が出ます。
というのも、installフォルダを経由すれば、DBパスワードなどがダダもれになってしまうからです。

ただ現実に、アップグレード時にintallフォルダもアップロードしてしまうとか、installフォルダを簡単なリネーム(_installとか)だけして放置しておく、なんてことは当然考えられます。

その対策って、とても簡単であることにふと気づきました。
'_INSTALL_CHARSET' という定数が定義された状態で、mainfile.php を実行されることは、インストーラ以外にないのです。この定数は、X2,本家2.2, XCLegacy 2.1 いずれでも共通なので、そのまま使えます。

だから、Protectorのprecheckにおいて、この定義があった時点で強制終了するだけでOKです。この方法であれば、_install などの簡単なリネームがバレたケースにも対応できます。もし、なんらかの理由で、本当にインストーラを利用したければ、Protectorを一時的に外せば良いでしょう。

少なくともインストール後、Protectorさえちゃんとインストールすれば、後からinstallフォルダをアップロードしてしまう等のミスをやっても情報漏洩はある程度防げます。(インストール途中で放置しちゃったケースでは対応できませんが、まあ、まだサービス開始もしていないサイトならDBパスワードなどを一通り変更して、もう一度最初からやり直せば良いでしょう)

というわけで、Protector-3.03にそのチェックを入れました。定数定義のチェックが1行あるだけなので、速度的な影響はほとんどないはずです。

Printer friendly page Send this story to a friend

Comments list

GIJOE  Posted on 2007/6/3 17:01 | Last modified
hi tl.

Quote:

tl wrotes:
Well, if people have been reminded constantly by Xoops Admin and don't even bother to remove the install directory, they may deserve to be attacked and not worthy of Protector protection?

I know several XOOPS sites with '_install' directory.
Attackers can know the sites informations easily via accessing XOOPS_URL/_install/index.php

Of course, there are too many patterns of renaming by users.
(install_, install.bak etc.)
admin.php cannot search all patterns.

Just adding a line checking whether '_INSTALL_CHARSET' is defined or not makes all patterns safe.
(The line is enough light to be ignored)

Thus, I've judged this is worthy code for Protector.
tl  Posted on 2007/6/3 8:22
Well, if people have been reminded constantly by Xoops Admin and don't even bother to remove the install directory, they may deserve to be attacked and not worthy of Protector protection?
Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!