Server Protect for Linuxインストール
AmazonLinux_CentOS,OperatingSystem,セキュリティ関連
Contents
概要
- 今回は、EC2上に起動したCentOS 7 OSに、Server Protect for Linux 3.0をインストールした際の手順をまとめてみました。
- Server Protect for Linuxは、トレンドマイクロ社の製品であり、Linuxサーバにおいて、ウイルス/スパイウェアをリアルタイムで検出、削除するウィルス対策のソフトウェアです。
- ベースとなるソフトウェアのインストール手順は他の方が作成されていましたが、Patchのインストール手順までは記載がなかったため本記事にまとめております。
- また、Server Protect for Linuxには、専用のApacheが組み込まれています(splxhttpd)。今回ベースのモジュールにSP1 Patch8およびCirtical Patchを適用して、Apache 2.2.29 から2.4.34にアップデートする手順を含みます。
Server Protect for Linuxインストール
ベースモジュールのインストール
- ベースとなるモジュールをインストールします。先ずは、対象のOS Version を確認します。
$ cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
$ uname -a
Linux linux-server01 3.10.0-957.1.3.el7.x86_64 #1 SMP Thu Nov 29 14:49:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
- 次に、事前に必要となるパッケージをインストールします。(事前に必要となるパッケージは、トレンドマイクロのウェブにシステム要件として記載されています)
- こちらの環境では、compat-libstdc++, perl-Sys-Syslogの2つのパッケージが不足していましたので、追加インストールしています。
← パッケージのインストール状態を確認
$ yum list installed | egrep "glibc|zlib|compat-libstd c++|libuuid|nss-softokn-freebl|libgcc|perl-Sys-Syslog"
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
glibc.x86_64 2.17-260.el7 @base
glibc-common.x86_64 2.17-260.el7 @base
glibc-devel.x86_64 2.17-260.el7 @base
glibc-headers.x86_64 2.17-260.el7 @base
libgcc.x86_64 4.8.5-36.el7_6.1 @updates
libuuid.x86_64 2.23.2-59.el7 @base
nss-softokn-freebl.x86_64 3.36.0-5.el7_5 @base
zlib.x86_64 1.2.7-18.el7 @base
zlib-devel.x86_64 1.2.7-18.el7 @base
← 事前に必要となるパッケージをインストール
$ sudo yum install compat-libstdc++-33.x86_64
$ sudo yum install perl-Sys-Syslog.x86_64
← パッケージのインストール状態を再確認(追加でインストールされたこと)
$ yum list installed | egrep "glibc|zlib|compat-libstd c++|libuuid|nss-softokn-freebl|libgcc|perl-Sys-Syslog"
compat-libstdc++-33.x86_64 3.2.3-72.el7 @base
glibc.x86_64 2.17-260.el7 @base
glibc-common.x86_64 2.17-260.el7 @base
glibc-devel.x86_64 2.17-260.el7 @base
glibc-headers.x86_64 2.17-260.el7 @base
libgcc.x86_64 4.8.5-36.el7_6.1 @updates
libuuid.x86_64 2.23.2-59.el7 @base
nss-softokn-freebl.x86_64 3.36.0-5.el7_5 @base
perl-Sys-Syslog.x86_64 0.33-3.el7 @base
zlib.x86_64 1.2.7-18.el7 @base
zlib-devel.x86_64 1.2.7-18.el7 @base
- ベースとなるモジュールをダウンロードします。ブラウザでアクセスする場合は、こちらのURLから探すことができます。「RedHat 7 / CentOS 7 / SUSE 12」のモジュールです(2019/10/16時点、最新はビルド:3.0.1061 / Service Pack 1 Patch 6 適用済の状態)。実際には、ブラウザではなく、curlコマンドでダウンロードします。
$ cd /tmp
$ curl -OL https://files.trendmicro.com/products/splx/SPLX30_X64.tgz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 0:00:01 0:00:01 --:--:-- 55.6M
- ベースとなるモジュールを展開して、インストールします。
$ tar xvzf SPLX30_X64.tgz
SProtectLinux-3.0.bin
SProtectLinux-3.0.bin.md5
$ sudo ./SProtectLinux-3.0.bin -f -n -s -S SP-XXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
Installing ServerProtect for Linux:
Unpacking...
Installing rpm file...
準備しています... ################################# [100%]
更新中 / インストール中...
1:SProtectLinux-3.0-1061 ################################# [100%]
/var/tmp/rpm-tmp.u8oieO: 行 158: bzcat: コマンドが見つかりません
Activation successful.
Warning!!!
ServerProtect services will not be added into system initial services!
Please use "/sbin/chkconfig --level 345 splx on" to add splx into system initial services.
Instead of commands, you can execute "/opt/TrendMicro/SProtectLinux/SPLX.util/add_splx_service".
ServerProtect for Linux installation completed.
カーネルフックモジュール(KHM)のインストール
- KHMをダウンロードします。先ずブラウザから、こちらのURLにアクセスし、前述の操作で確認したKernel Versionに対応したモジュールを調べて、URLをコピーします。Cent OS, Red Hat があり、Kernel Versionは同一ですので、ご注意ください。次の作業でコピーしたURLを指定し、curlコマンドでダウンロードします。
- 所定の場所でKHMを展開、配置します。
← KHMを展開するディレクトリまで移動
# cd /opt/TrendMicro/SProtectLinux/SPLX.module/
← 前述の確認にて調べたURLを指定
# curl -OL http://files.trendmicro.com/products/kernel/splx_kernel_module-3.0.1.0018.CentOS7_3.10.0-957.1.3.el7.x86_64.x86_64.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 1126k
← KHMを展開します
# tar zxvf splx_kernel_module-3.0.1.0018.CentOS7 _3.10.0-957.1.3.el7.x86_64.x86_64.tar.gz
splxmod-3.10.0-957.1.3.el7.x86_64.x86_64.o
splxmod-3.10.0-957.1.3.el7.x86_64.x86_64.o.md5
# ls
splx_kernel_module-3.0.1.0018.CentOS7_3.10.0-957.1.3.el7.x86_64.x86_64.tar.gz
splxmod-3.10.0-123.1.2.el7.x86_64.x86_64.o
splxmod-3.10.0-123.4.2.el7.x86_64.x86_64.o
splxmod-3.10.0-123.el7.x86_64.x86_64.o
splxmod-3.10.0-957.1.3.el7.x86_64.x86_64.o
splxmod-3.10.0-957.1.3.el7.x86_64.x86_64.o.md5
splxmod.tgz
src
splxサービスの起動
- splx(Server Protect for Linux)サービスはレガシーのchkconfigで管理されています。chkconfigを使用して、サービスの自動起動設定を有効化します。また、サービスの起動を行います。
← サービスの起動設定を確認(デフォルトのランレベルで起動しない)
# chkconfig --list
注記: この出力に含まれるのは SysV サービスのみです。ネイティブな
systemd サービスは含まれません。SysV の設定データはネイティブな
systemd 設定で上書きされる場合があります。
systemd サービスを一覧表示する場合は 'systemctl list-unit-files' を使用します。
特定のターゲットで有効になっているサービスを確認する場合は
'systemctl list-dependencies [target]'を使用します。
awslogs 0:off 1:off 2:on 3:on 4:on 5:on 6:off
netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
rpsxps 0:off 1:off 2:on 3:on 4:on 5:on 6:off
splx 0:off 1:off 2:off 3:off 4:off 5:off 6:off
← サービスの自動起動設定を有効化
# chkconfig splx on
# chkconfig --list
注記: この出力に含まれるのは SysV サービスのみです。ネイティブな
systemd サービスは含まれません。SysV の設定データはネイティブな
systemd 設定で上書きされる場合があります。
systemd サービスを一覧表示する場合は 'systemctl list-unit-files' を使用します。
特定のターゲットで有効になっているサービスを確認する場合は
'systemctl list-dependencies [target]'を使用します。
awslogs 0:off 1:off 2:on 3:on 4:on 5:on 6:off
netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
rpsxps 0:off 1:off 2:on 3:on 4:on 5:on 6:off
splx 0:off 1:off 2:on 3:on 4:on 5:on 6:off
← サービスの起動
# /etc/init.d/splx start
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.
PatchをインストールしてApacheをアップデート
- splx(Server Protect for Linux)に標準で組み込まれているApache のバージョンが2.2.x のため、Patchをインストールし、2.4.x にアップデートします。こちらのURLにアクセスし、Patchの有無を確認し、URLをコピーします。2019/10/16現在、SP1 Patch8 (build:1575) (ファイル名: splx_30_lx_en_sp1_patch8.tar.gz)、Critical Patch (build: 1576) (ファイル名: splx_30_lx_en_criticalpatch1576.tar.gz)が提供されています。
← Patch適用前のsplxhttpdバージョンを確認
$ /opt/TrendMicro/SProtectLinux/SPLX.httpd/bin/splxhttpd -v
Server version: Apache/2.2.29 (Unix)
Server built: Apr 17 2015 14:36:41
← SP1 Patch8をダウンロード
# curl -OL http://files.trendmicro.com/products/splx/splx_30_lx_en_sp1_patch8.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 112M
# tar zxvf splx_30_lx_en_sp1_patch8.tar.gz
splx_30_lx_en_sp1_patch8.bin
← SP1 Patch8をインストール
# ./splx_30_lx_en_sp1_patch8.bin
Installing ServerProtect for Linux 3.0 Service Pack 1 patch 8:
Patch 8 must remove the previous SPLX 3.0 Patch RPM information from the RPM Database to avoid inconsistencies if a rollback is required.
The removed RPM information will be stored in /opt/TrendMicro/SProtectLinux/Version.ini .
For more detailed information, please refer to the patch readme file.
Do you want to continue and remove the previous RPM information? (yes or no)
yes
rpm: no packages given for erase
Unpacking...
Installing rpm file...
Preparing... ################################# [100%]
Updating / installing...
1:splx-3.0-sp1-patch8-1.0-1575 ################################# [100%]
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.
ServerProtect for Linux 3.0 Service Pack 1 patch 8 installation completed.
← Critical Patchをダウンロード
# curl -OL http://files.trendmicro.com/products/serverprotect/splx_30_lx_en_criticalpatch1576.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 5830
# tar zxvf splx_30_lx_en_criticalpatch1576.tar.gz
splx_30_lx_en_criticalpatch1576/
splx_30_lx_en_criticalpatch1576/ALL/
splx_30_lx_en_criticalpatch1576/ALL/x86_64/
splx_30_lx_en_criticalpatch1576/RedHat/
splx_30_lx_en_criticalpatch1576/RedHat/x86_64/
splx_30_lx_en_criticalpatch1576/RedHat/i686/
splx_30_lx_en_criticalpatch1576/install.sh
splx_30_lx_en_criticalpatch1576/RedHat6/
splx_30_lx_en_criticalpatch1576/RedHat6/x86_64/
splx_30_lx_en_criticalpatch1576/RedHat6/i686/
splx_30_lx_en_criticalpatch1576/SuSE/
splx_30_lx_en_criticalpatch1576/SuSE/x86_64/
splx_30_lx_en_criticalpatch1576/SuSE/i686/
# cd splx_30_lx_en_criticalpatch1576
← Critical Patchをインストール
# ./install.sh
Check system ......
Starting to install package. Please wait.
The current installation of ServerProtect on your system is SProtectLinux-3.0-1061.x86_64.
Stopping splx ......
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 splx ......
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.
Successfully install package.
← Patch適用後のsplxhttpdバージョンを確認
# sudo /opt/TrendMicro/SPro tectLinux/SPLX.httpd/bin/splxhttpd -v
Server version: Apache/2.4.34 (Unix)
Server built: Aug 9 2018 10:13:49
動作確認
- ブラウザからServer Protect for Linuxの管理コンソールアクセスしましょう。

AmazonLinux_CentOS,OperatingSystem,セキュリティ関連
Posted by takaaki
関連記事
やさしいopensslコマンドによるSSL証明書の確認方法
概要 はじめに 今回は、opensslコマンドを使って、SSL証明書の情報を確認 ...
SSMからEC2 Windowsをsysprepする方法
Windowsにログインせず、SSM(CLI)からsysprepを投げる 概要 ...
yes or no を使ったbashスクリプト
bashスクリプトで、yes or no を入力させたい 目的 bashスクリプ ...
https通信をtcpdumpでキャプチャしてWiresharkする方法
概要 はじめに 今回は、サーバーを通過するhttps通信のパケットをキャプチャし ...
aws cli 実行時にpython 2.7 ImportError発生
概要 トラブル備忘録です。昨日AMIコピーで起動したCentOS 環境において、 ...
ディスカッション
コメント一覧
まだ、コメントがありません