Trendmicro ServerProtect for Linux v3 を OES2 Linuxで動かす

今更、アンチウィルスがファイルサーバで必要かどうかは議論の別れるところでしょう。従来の拡散破壊型のウィルスよりも、巧妙なポイント攻撃を行うスパイウェアやボットが主流の世の中です。拡散型ウィルスであれば、セキュリティ製品メーカーもサンプルを収集して対策を立てやすいのですが、ピンポイント攻撃を行うスパイウェアでは、セキュリティ製品メーカーサンプルが収集できず対策を立てにくいのではないかと思います。

また、現実にほとんどのクライアント側PCにセキュリティソフトウェアが入っているわけですから、現実にユーザの操作でサーバにウィルス付ファイルが書き込まれるという可能性はまず少ないかもしれません。

もう従来型のサーバ上のアンチウィルス製品の市場は確実に終焉に向かっているといっていいでしょう。確実にフィッシングメールやスパイウエアをブロックするためには別な手段を検討してもいい時期なのかもしれませんね。

しかし、「何の対策もしていません」ということで堂々と経営者に説明できればまだしも、なんらかの問題が発生した場合に、「アンチウィルスソフトウェアは適切に動作していた」という言い訳は用意しておかなければなりません。(なんらかの問題がおきた時に対策のためにシステムが提案した費用をケチった経営者側が悪いという言い訳にもなるわけです)

したがって、サーバのパフォーマンスは低下するかも知れませんがアンチウィルスソフトウェアを OES2 Linux に導入してみましょうという話。

今日の課題は Trendmicro の Server Protect for Linux です。

ServerProtect for Linuxダウンロードページから最新の for Linux 3.0 版をダウンロードします。

ダウンロードができたら任意に解凍して x フラグをつけます。解凍したディレクトリの bin ファイルを実行します。

oes2test:/tmp/trendmicro/Program # ./SProtectLinux-3.0.bin

NOTICE: Trend Micro licenses its products in accordance ....
ライセンスに関する注意。最後まで読んで q で終了

Do you agree to the above license terms? (yes or no)
yes
Installing ServerProtect for Linux:
Unpacking...
Installing rpm file...
warning: waiting for exclusive lock on /var/lib/rpm/Packages
Preparing... ########################################### [100%]
1:SProtectLinux ########################################### [100%]
Do you wish to connect this SPLX server to Trend Micro Control Manager? (y/n) [y] y
SPLX will now collect information in order to complete the Control Manager settings.
Please follow the instructions and enter the required information.
[Note: If the Control Manager Web server requires authentication, you need to set the login information using the "CMconfig -P" command.]
******NETWORK******
===========================================================
List of available IP(s):
eth0 192.168.1.241
===========================================================
SPLX server name or IP address: 192.168.1.241
Do you wish to connect to Control Manager server using HTTPS? (y/n) [n] n
Control Manager server name or IP address: 192.168.1.241
Control Manager server port [80]: 82 <--- iManager やその他のサービスが動いている場合は別なポートに設定します。
Do you access Control Manager through a proxy server? (y/n) [n] n <---- プロクシがない場合
*******PRODUCT******
Please specify the name you would like to display on the Control Manager console [SPLX server name or IP address]: 192.168.1.241
Please specify a folder name for this product (for example: /SPLX) [New entity]:
New entity[そのまま Enter]

**************************************************
Control Manager network/product information entered
Control Manager server name or IP: 192.168.1.241
Control Manager port: 82
Connect using HTTPS: no
Display Name on Control Manager: 192.168.1.241
Installation folder: New entity
**************************************************
Is the above information correct? (y/n) [n] y <---- サマリを確認して Yes
Saving information to the configuration file...done.

Activate ServerProtect to continue scanning and security updates.
Activation is a two-step process that you can complete during or after installation.

Step 1. Register
Use the Registration Key that came with your product to register online
(https://olr.trendmicro.com/redirect/product_register.aspx).
(Please skip this step if the product is already registered.)

Step 2. Activate
Type the Activation Code received after registration to activate ServerProtect.
(Press [Ctrl+D] to abort activation.)

Activation Code: SP-NVSL-XAQ5x-MQUJx-ZNLKx-J35Gx-6K4Qx <- 登録した時のアクティベーションキー
Activation successful.

World Virus Tracking Program

Trend Micro consolidates virus-scanning results from worldwide customers,
compiles real-time statistics, and displays them on the Virus Map
(http://www.trendmicro.com/map). Use this map to view virus trends for
each continent and selected countries.

Yes, I would like to join the World Virus Tracking Program.
I understand that when a virus is detected on my system, aggregated
detection information, including virus names and number of detections,
will be sent to the World Virus Tracking Program. It will not send out
company names, individual names, machine names, site names, IP addresses,
or any other identifying information. I understand that I can disable
this automatic reporting function at any time by changing the
configuration to "No" within the product's management console.

No, I don't want to participate.


Please input your choice [Yes] : N <-- 後でも Yes に設定できます。
Starting services...
Starting ServerProtect for Linux:
Checking configuration file: [ OK ]
Starting splxcore:
Starting Entity: [ OK ]
Loading splx kernel module: [Not available]

Error: Kernel Hook Module (KHM) for this Linux kernel version is not
available.
Check if the KHM for your Linux kernel version is released
on the Trend Micro website at "http://www.trendmicro.com/en/products/
file-server/sp-linux/use/kernel.htm".Or,follow the instructions in the
INSTALL file in "/opt/TrendMicro/SProtectLinux/SPLX.module/src/module"
to build the KHM
for your Linux kernel version. <--- この作業が後に待っています。

Starting vsapiapp: [ OK ]
ServerProtect for Linux core started.
[ OK ]
Starting splxhttpd:
Starting splxhttpd: [ OK ]
ServerProtect for Linux httpd started.
[ OK ]
ServerProtect for Linux started.

The virus notification program is not started. This program only starts in
K Desktop Environment (KDE). Start this program using the Quick Access
console in KDE.

ServerProtect for Linux installation completed.


さてこれでインストールは完了しました。
ブラウザから http://myserver:14942 でアクセスします。

初期パスワードは設定されていません。証明書を受け入れてログインします。

Trendmicro ServerProtect for Linux v3 を OES2 Linuxで動かす_a0056607_13331425.gif


eicar から疑似餌を落として eicar.com として保存します。

Trendmicro ServerProtect for Linux v3 を OES2 Linuxで動かす_a0056607_13482581.gif


当たり前ですが、クライアント側のPCが反応して保存できないので、無視して NSS ボリュームに保存してみます。

ただし、この状態ではリアルタイムスキャンは有効に機能しません。

Trendmicro ServerProtect for Linux v3 を OES2 Linuxで動かす_a0056607_13504720.gif


/opt/Trendmicro/SProtectLinux/SPLX.module/src/module に INSTALL というテキストファイルがあるので、この手順に従って、カーネルフックを作らなければいけません。

/boot/config-My-Kernel-Version-xen を
/usr/src/Linux-MyKernel-Version-xen/.config

に上書きコピーします。

# cd /usr/src/Linux-MyKernel-Version-xen

に移動して

/usr/src/Linux-MyKernel-Version-xen # make oldconfig


myoes2:/lib/modules/2.6.16.46-0.12-xen/build # make modules_prepare


を実行します。

# cd /lib/modules/My-Kernel-Version/build

に移動します。

myoes2:/lib/modules/My-Kernel-Version/build # make menuconfig

Trendmicro ServerProtect for Linux v3 を OES2 Linuxで動かす_a0056607_17263346.gif


メニューをスクロールダウンして "Compile the kernel with debug info".

チェックが入っていないことを確認します。

Trendmicro ServerProtect for Linux v3 を OES2 Linuxで動かす_a0056607_17282622.gif


exit して save して終了します。

myoes2:/lib/modules/My-Kernel-Version/build # make module_compare

を実行します。

myoes:# cd /opt/TrendMicro/SProtectLinux/SPLX.module/src/module

に移動して

myoes2 :/opt/TrendMicro/SProtectLinux/SPLX.module/src/module # make

します。
いったんサービスを停止します。

myoes2 :/opt/TrendMicro/SProtectLinux/SPLX.module/src/module # /etc/init.d/splx stop

正しく動作しているかどうかテストします。

myoes2:/opt/TrendMicro/SProtectLinux/SPLX.module/src/module # make test
Test Program for Kernel Hook Module
==============================================
Kernel Version: 2.6.16.46-0.12-xen
Architecture: x86_64
KHM file: splxmod-2.6.16.46-0.12-xen.x86_64.o

Obtaining current user ID... 0

!! Warning !!
You are about to start testing the Kernel Hook Module (KHM).
This test program will insert the KHM file (shown above) into the Linux kernel.
This operation may cause your system to stop responding (hang) or kenrnel panic.

Do you want to continue? (yes or no) yes

Finding module file... found
Finding System.map file... found
Obtaining sys_call_table address... ffffffff802e1dc0
Obtaining do_execve address... ffffffff801879ed
Obtaining int_ret_from_sys_call address... ffffffff8010b294
Obtaining ia32_sys_call_table address... ffffffff802e2a10
Obtaining compat_do_execve address... ffffffff801a56ff
Locating any duplicated KHM in kernel... not found
Inserting KHM into kernel... success
Creating SPLX device node... success
Running test program... success
Testing system call hook operation: 'open'... success
Testing system call hook operation: 'close'... success
Testing system call hook operation: 'execve'... success
Removing KHM from kernel... success

Test successful.
You can type "make install" to install the KHM on your Linux system.
To test whether KHM is installed and working properly, please enable
real-time scan and test with an EICAR test file.


インストールします。

myoes2:/opt/TrendMicro/SProtectLinux/SPLX.module/src/module # make install
Copying bin/splxmod-2.6.16.46-0.12-xen.x86_64.o ... OK
oes2test:/opt/TrendMicro/SProtectLinux/SPLX.module/src/module # make restart
make: *** No rule to make target `restart'. Stop.
oes2test:/opt/TrendMicro/SProtectLinux/SPLX.module/src/module # /etc/init.d/splx restart
Shutting down ServerProtect for Linux:
Shutting down splxcore:
Shutting down vsapiapp: [FAILED]
Unloading splx kernel module: [FAILED]
Shutting down entity: [FAILED]
ServerProtect for Linux core not running.
[FAILED]
Shutting down splxhttpd:
Shutting down splxhttpd: [FAILED]
ServerProtect for Linux httpd not running.
[FAILED]
ServerProtect for Linux not running.
Starting ServerProtect for Linux:
Checking configuration file: [ OK ]
Starting splxcore:
Starting Entity: [ OK ]
Loading splx kernel module: [ OK ]
Starting vsapiapp: [ OK ]
ServerProtect for Linux core started.
[ OK ]
Starting splxhttpd:
Starting splxhttpd: [ OK ]
ServerProtect for Linux httpd started.
[ OK ]
ServerProtect for Linux started.


心配ならもう一度リスタートしてみましょう。

myoes2:/opt/TrendMicro/SProtectLinux/SPLX.module/src/module # /etc/init.d/splx restart
Shutting down ServerProtect for Linux:
Shutting down splxcore:
Shutting down vsapiapp: [ OK ]
Unloading splx kernel module: [ OK ]
Shutting down entity: [ OK ]
ServerProtect for Linux core stopped normally.
[ OK ]
Shutting down splxhttpd:
Shutting down splxhttpd: [ OK ]
ServerProtect for Linux httpd stopped normally.
[ OK ]
ServerProtect for Linux stopped normally.
Starting ServerProtect for Linux:
Checking configuration file: [ OK ]
Starting splxcore:
Starting Entity: [ OK ]
Loading splx kernel module: [ OK ]
Starting vsapiapp: [ OK ]
ServerProtect for Linux core started.
[ OK ]
Starting splxhttpd:
Starting splxhttpd: [ OK ]
ServerProtect for Linux httpd started.
[ OK ]
ServerProtect for Linux started.


これでリアルタイムスキャンが有効になります。
いったんブラウザを終了して、ログインしなおしてください。グレーアウトした Realtime Scan が enable になります。

Trendmicro ServerProtect for Linux v3 を OES2 Linuxで動かす_a0056607_17414287.gif


実際に eicar.com を保存して、リアルタイムスキャンに反応することを確認します。

Trendmicro ServerProtect for Linux v3 を OES2 Linuxで動かす_a0056607_17434865.gif


特に /media/nss にマウントされた OES NSS ボリュームに eicar.com を書き込んでログで確認してください。gedit で作成された eicar.com もブロックされて書き込まれていないことを確認することができます。

-アンインストール-

# rpm -e SProtectLinux

でアンインストールできますが、これでも削除できない場合は YaST の登場です。

yast > software > software management の search ボックスに SProtect で検索して Server Protect をゴミ箱アイコンに変更して accept するときれいに削除できます。
Trendmicro ServerProtect for Linux v3 を OES2 Linuxで動かす_a0056607_1874442.gif



--
リアルタイムスキャンを有効にするためにはちょっとメンドクサイのは否めませんが、 Trendmicro の Server Protect for Linux が OES2 で正しく動作することが確認できました。現場では Server Protect が機能する前にクライアント用のアンチウィルスが機能してしまうことがほとんどでしょう。また、多くのアンチウィルスソフトウェアがスパイウエアやボットに対してあまり機能しないのも実感しています。XEN 上で仮想化された OES2 に導入テストをしてみましたが、とりあえずこのように問題なく動いているのは大変大きな評価をしていいでしょう。

しかし、金払ったンだからちゃんと対策して機能しているはずだという安心感を経営者に与えるためにもこの製品は "○二つ" くらいの評価は与えていいと思います。


-キーワード-
OES2 Linux, SUSE Linux, SLES10, OES2 on XEN ウィルス対策, Anti virus, Trendmicro, ServerProtect, リアルタイムスキャン, Real time Scan

非番のエンジニア
by islandcenter | 2008-05-01 17:58 | OES Linux | Comments(0)