Cloud One Workload Security(Deep Security)がRocky Linux OSに対応したのでインストールしてみた

Cloud One Workload Security(Deep Security)がRocky Linux OSに対応したのでインストールしてみた

Cloud One Workload Security(Deep Security)がRocky Linux OSに対応したのでインストールしてみました。
Clock Icon2021.11.05 10:07

この記事は公開されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。

こんにちは、コカコーラが大好きなカジです。

Cloud One Workload Security(以後C1WS、旧Deep Security)が、Rocky Linuxに対応したのでインストールしてみたいと思います。

Rocky Linuxについて

Rocky Linux 0S 8についてや、構築方法については以下のブログを参照ください。

Rocky LinuxにおけるCloud One Workload Securityの対応可能な機能について

詳細は以下のドキュメントに記載されています。

Deep Security Agent 20の以下のバージョンからサポートされていますので注意してください。

Note 7: Rocky Linux 8 is currently supported on Deep Security Agent 20.0.0-3288+ for Red Hat Enterprise Linux 8, since Rocky Linux 8 is a direct fork of RHEL 8.

また、対応機能は以下のようになっています。

2021/11/05時点での上記のRocky Linuxサポート機能の画像は以下でした。 Amazon LinuxやCentOS/RHELと同じ機能に対応しておりました。

Deep Security Agentをインストール

C1WSにてポリシー作成を完了しておいて下さい。

C1WSにて以下を実行

サポート情報 > インストールスクリプト をクリック

インストール対象のOSをLinuxで選択し、「インストール後にAgentを自動的に有効化」をチェックします。

「セキュリティポリシー」にて設定したいポリシーを選択し、スクリプトをクリップボードへコピーします。

EC2にSSHでログインして以下を実行(SSMのRun CommandでAWS-RunShellScriptでも可能)

インストールスクリプトをviで作成し、貼り付けて保存し実行します。

後で気づいたのですが、Rocky Linuxは、SSM Agentがインストールされており、EC2 IAM Roleで権限を与えることで、SSMのRun CommandのAWS-RunShellScriptでもインストール可能でした。

$ vi dsa_install.sh
画像のインストールスクリプトを出力して貼り付けて保存
$ chmod 755 dsa_install.sh
$ sudo ./dsa_install.sh
sudo ./dsa-install.sh
Downloading agent package...
Installing agent package...
警告: /tmp/agent.rpm: ヘッダー V4 RSA/SHA256 Signature、鍵 ID e1051cbd: NOKEY
Verifying...                                     (100%)
準備しています...                                   (100%)
Host platform - NAME="Rocky Linux"
更新中 / インストール中...
   1:ds_agent-20.0.0-3288.el8          ################################# [100%]
enable ds_agent service with systemd
Created symlink /etc/systemd/system/multi-user.target.wants/ds_agent.service → /usr/lib/systemd/system/ds_agent.service.
Install the agent package successfully
HTTP Status: 200 - OK
Activation will be re-attempted 30 time(s) in case of failure
dsa_control
HTTP Status: 200 - OK
Response:
Attempting to connect to https://agents.deepsecurity.trendmicro.com:443/
SSL handshake completed successfully - initiating command session.
Connected with (NONE) to peer at agents.deepsecurity.trendmicro.com
Received a 'GetHostInfo' command from the manager.
Received a 'SetDSMCert' command from the manager.
Received a 'SetAgentCredentials' command from the manager.
Received a 'GetAgentEvents' command from the manager.
Received a 'SetAgentStatus' command from the manager.
Received a 'GetInterfaces' command from the manager.
Received a 'GetAgentEvents' command from the manager.
Received a 'GetHostMetaData' command from the manager.
Received a 'GetHostMetaData' command from the manager.
Received a 'GetAgentStatus' command from the manager.
Received a 'GetAgentEvents' command from the manager.
Received a 'GetDockerVersion' command from the manager.
Received a 'SetXDRInformation' command from the manager.
Received a 'SetSecurityConfiguration' command from the manager.
Received a 'GetAgentEvents' command from the manager.
Received a 'GetAgentStatus' command from the manager.
Received a 'GetIoT' command from the manager.
Received a 'SetDSMCACert' command from the manager.
Received a 'Metrics' command from the manager.
Command session completed.

C1WSのコンソールでコンピュータ登録されていることを確認します。

EICARテストファイルを使って検知させてみる

curlコマンドでEICARテストファイルをダウンロードし、不正プログラム機能によりリアルタイムで退避されるため、ファイルが存在しないことを確認

$ curl -OL https://secure.eicar.org/eicar.com.txt
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    68  100    68    0     0     47      0  0:00:01  0:00:01 --:--:--    47
$ ls -ltr
total 4
-rwxr-xr-x. 1 ec2-user ec2-user 3084 Oct 29 08:50 dsa_install.sh
$

不正プログラム機能によりリアルタイムで退避されるため、ファイルが存在しない

Cloud One Workload Securityのコンソールでも検知を確認します。

まとめ

Deep Security Agent 20.0.0-3165以降のバージョンで利用可能なことに気をつけましょう 省略しましたが、EC2のRocky Linuxは、SSM Agentがプリインストールされており、SSHログインしなくてもDeep Security Agentインストール可能でした。どなたかのお役に立てれば光栄です。

参考元

この記事をシェアする

facebook logohatena logotwitter logo

© Classmethod, Inc. All rights reserved.