Trend Vision One Container Securityで使用されるカスタムルールは、Falcoで使用されるカスタムルールとは異なります。既存のフィールドを変更する必要はありませんが、Trend Vision Oneと互換性を持たせるために新しいフィールドを追加する必要があります。
Trend Vision One カスタムルールフィールドの説明
Trend Vision Oneのカスタムルールには、ルールファイルを有効にするためにいくつかの新しいフィールドを含める必要があります。
フィールド名 | フィールドの説明 | 例 |
id |
ルールIDは「CR-」で始まり、カスタムルール全体で一意である必要があります。ルールIDは必須の「CR-」プレフィックスを含めて20文字以下である必要があります。
|
id: CR-00000001 |
custom_fields |
このフィールドはYAMLオブジェクトでなければなりません。
Container SecurityイベントはFalco
output_fields を使用して生成され、追加の出力を設定することができます。カスタムフィールドは任意の文字列キーと文字列値であり、値にはFalco出力フィールドが含まれる場合があります。
custom_fields に含まれるFalco出力フィールドは、出力フィールドにも存在している必要があります。 |
custom_fields: myField: "Sensitive file read access" custom_fields: myField: "Sensitive file read access" cmdline: "%proc.cmdline" custom3: "a string" customField: "%user.name" custom5: "%proc.pid" |
action |
このルールが検出されたときに実行された処理。許可される値:
log 、isolate 、terminate 。 |
action: ログ |
Falcoルールを変更
以下は、機密ファイルへのアクセスをモニタするFalcoルールの例です。
- rule: Monitor Sensitive File Access desc: Detect any read access to sensitive files condition: > (syscall.type = openat and fd.name startswith "/etc/" and evt.arg.flags contains "O_RDONLY") output: "Sensitive file read access (user=%user.name command=%proc.cmdline file=%fd.name)" priority: info
このルールをTrend Vision Oneと互換性を持たせるために、次のようにルールを変更してください。
- rule: Monitor Sensitive File Access id: CR-00000001 desc: Detect any read access to sensitive files condition: > (syscall.type = openat and fd.name startswith "/etc/" and evt.arg.flags contains "O_RDONLY") output: "Sensitive file read access (user=%user.name command=%proc.cmdline file=%fd.name)" custom_fields: myField: "Sensitive file read access" priority: info action: log
Trend Vision Oneでは、
output
フィールドは直接使用されません。代わりに、outputからフィールドを抽出してTrend Vision Oneと互換性のあるイベント形式を作成します。これは、outputフィールド内のフィールドが同じであるため、前のルールが次のルールと機能的に同一であることを意味します。- rule: Monitor Sensitive File Access id: CR-00000001 desc: Detect any read access to sensitive files condition: > (syscall.type = openat and fd.name startswith "/etc/" and evt.arg.flags contains "O_RDONLY") output: %user.name %proc.cmdline %fd.name custom_fields: myField: "Sensitive file read access" priority: info action: log
サポートされているFalco出力フィールド
すべてのFalco出力フィールドがTrend Vision Oneでサポートされているわけではありません。以下の表は、サポートされているFalcoフィールドとTrend Vision Oneでのフィールド名を示しています。
![]() |
注意Container Securityでサポートされていないフィールドを使用するには、Trend Vision One カスタムルールフィールドの説明で説明されているように
custom_fields を使用してください。 |
サポートされているFalcoフィールド
|
Trend Vision One の名前
|
k8s.ns.name |
k8sNamespace |
k8s.pod.name |
k8sPodName |
k8s.pod.id |
k8sPodId |
container.name |
containerName |
container.id |
containerId |
container.image.repository |
containerImgRepo |
container.image.tag |
containerImgTag |
container.image.digest |
containerImageDigest |
proc.name |
processName |
proc.pid |
processPid |
proc.exeline |
processCmd |
proc.pname |
parentName |
proc.ppid |
parentPid |
proc.pcmdline |
parentCmd |
fd.filename |
objectFileName |
fd.directory |
objectFileDir |
fd.sip |
dst |
fd.sport |
dpt |
fd.cip |
src |
fd.cport |
spt |
fd.proto |
アプリ |
fd.l4proto |
proto |
fd.name |
fileDesc |
オプションルールフィールド
以下のルールフィールドはContainer Securityのカスタムルールにおいて任意であり、通常のFalcoルールガイドラインに従って記述できます。
タグフィールドを使用してルールに一般的なタグを追加します。
tags: - container - filesystem
![]() |
注意タグフィールドはTrend Vision Oneで
customTags として表示されます。 |
除外フィールドを使用してイベントをフィルタリングします。トレンドマイクロのサービスは、通常は最小限で安全に無視できるいくつかのイベントをトリガーする可能性があります。指定されたKubernetesネームスペース内でこれらをフィルタリングするために、以下の除外をルール定義に追加してください。
exceptions: - name: trend_namespace fields: [k8s.ns.name] comps: [=] values: - [trendmicro-system]