有効なTrend Vision Oneカスタムルールを作成した後、Container Securityにカスタムルールを有効化してインポートしてください。
手順
- カスタムルールがOCIリポジトリを使用して構成されている場合、OCIリポジトリの基本認証パラメータを含むKubernetesシークレットを作成してください。シークレット値の形式は、FALCOCTL_REGISTRY_AUTH_BASIC falcoctl環境変数と同じです。
- 次のような秘密の値を使用して、複数のOCIリポジトリの認証情報を設定します。
OCI registry,basic auth username,basic auth password;OCI registry1, basic auth username1, basic auth password
- 次のコマンドを使用して、OCIリポジトリの認証パラメータを保存するためのKubernetesシークレットを作成します。
kubectl create secret generic <oci-basic-auth-secret-name> --from-literal=falcoctl=<OCI registry,basic auth username,basic auth password;OCI registry1, basic auth username1, basic auth password1> --namespace trendmicro-system
overrides.yaml
ファイルを設定し、ローカル構成またはOCIレジストリを通じてカスタムルールをインポートしてください。-
ローカル設定を通じてカスタムルールをインポートします。
-
カスタムルールファイルを作成します。
- rule: Detect Custom Event 1 id: CR-00000001 desc: A custom rule to detect a program called detectThisCmd condition: proc.cmdline icontains "detectThisCmd" output: custom2= "%proc.cmdline", custom4= "%user.name", custom5= "%proc.pid" priority: NOTICE tags: - container custom_fields: myField: "Sensitive file read access" cmdline: "%proc.cmdline" custom3: "a string" customField: "%user.name" custom5: "%proc.pid" - rule: Shell in container id: CR-00000002 desc: Detect shell activity within a container condition: > evt.type=execve and evt.dir=< and container.id!=host and (proc.name=bash or proc.name=ksh) output: custom2= "%proc.cmdline", custom4= "%user.name", custom5= "%proc.pid" priority: INFO tags: - container - mitre_discovery custom_fields: myField: "Sensitive file read access" cmdline: "%proc.cmdline" custom3: "a string" customField: "%user.name" custom5: "%proc.pid"
-
https://github.com/trendmicro/visionone-container-security-helm から Helm リポジトリをクローンします。
-
ルールファイルをディレクトリ
visionone-container-security-helm/config/customrules
にコピーしてください。 -
visionOne.customRules.enabled=true
とvisionOne.customRules.output.visionOne.enabled=true
を設定してカスタムルール機能を有効にします。visionOne runtimeSecurity: enabled: true customRules: enabled: true output: visionOne: enabled: true
-
-
OCIレジストリを通じてカスタムルールをインポートします。
-
ルールファイルをOCIレジストリにアップロードします。通常、次のコマンドを使用して行います:
sudo falcoctl registry push <OCI-repository>:<tag> <rulesFilePath> --type rulesfile --version "<version>"
-
visionOne.customRules.enabled=true
、visionOne.customRules.output.visionOne.enabled=true
、visionOne.ociRepository.enabled=true
を設定し、artifactUrls
、rulesFile (s)
、basicAuthTokenSecretName
を指定してカスタムルール機能を有効にします。visionOne: runtimeSecurity: enabled: true customRules: enabled: true output: visionOne: enabled: true ociRepository: enabled: true artifactUrls: - docker.io/sampleRules:latest rulesFiles: - sampleRulesFile.yaml basicAuthTokenSecretName: <oci-basic-auth-secret-name>
-
-
- ポリシーをコードとして使用してポリシーの設定を完了します。カスタムルールセットはポリシーの一部です。共有ポリシーを使用する際に逸脱がないようにするために、カスタムルール機能はユーザにクラスター管理ポリシーでコードとしてポリシーを使用することを要求します。クラスター管理ポリシーについて詳しく学んでください。