ビュー:
TrendAI Vision One™ Container Securityで使用されるカスタムルールは、Falcoで使用されるカスタムルールとは異なります。既存のフィールドを変更する必要はありませんが、TrendAI Vision One™と互換性を持たせるために新しいフィールドを追加する必要があります。

TrendAI Vision One™ カスタムルールフィールドの説明

TrendAI Vision One™のカスタムルールには、ルールファイルを有効にするためにいくつかの新しいフィールドを含める必要があります。
フィールド名 フィールドの説明
id
ルールIDは「CR-」で始まり、カスタムルール全体で一意である必要があります。ルールIDは必須の「CR-」プレフィックスを含めて20文字以下である必要があります。
id: CR-00000001
userDefinedFields
このフィールドはYAMLオブジェクトでなければなりません。
Container SecurityイベントはFalcooutput_fieldsを使用して生成され、追加の出力を設定することができます。
カスタムフィールドは任意の文字列キーと文字列値であり、値にはfalco出力フィールドが含まれる場合があります。userDefinedFieldsに含まれるfalco出力フィールドは、出力フィールドにも存在している必要があります。
userDefinedFields:
    myField: "Sensitive file read access"

userDefinedFields:
    myField: "Sensitive file read access"
    cmdline: "%proc.cmdline"
    custom3: "a string"
    customField: "%user.name"
    custom5: "%proc.pid"
action
このルールが検出されたときに実行された処理。許可される値: logisolateterminate
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
このルールをTrendAI 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)"
  userDefinedFields:
     myField: "Sensitive file read access"
  priority: info
  action: log
TrendAI Vision One™では、outputフィールドは直接使用されません。代わりに、outputからフィールドを抽出してTrendAI 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
  userDefinedFields:
    myField: "Sensitive file read access"
  priority: info
  action: log

サポートされているFalco出力フィールド

すべてのFalco出力フィールドがTrendAI Vision One™でサポートされているわけではありません。以下の表は、サポートされているFalcoフィールドとTrendAI Vision One™でのフィールド名を示しています。
注意
注意
Container Securityでサポートされていないフィールドを使用するには、TrendAI Vision One™ カスタムルールフィールドの説明で説明されているようにuserDefinedFieldsを使用してください。
サポートされているFalcoフィールド
TrendAI 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
注意
注意
タグフィールドはTrendAI Vision One™customTagsとして表示されます。
除外フィールドを使用してイベントをフィルタリングします。TrendAI™サービスは、通常は最小限で無視しても安全なイベントをトリガーすることがあります。指定されたKubernetesネームスペース内でこれらをフィルタリングするために、以下の除外をルール定義に追加してください。
exceptions:
  - name: trend_namespace
  fields: [k8s.ns.name]
  comps: [=]
  values:
  - [trendmicro-system]