AIDE(Advanced Intrusion Detection Environment)ログを収集する

以下でサポートされています。

このドキュメントでは、Bindplane を使用して AIDE(Advanced Intrusion Detection Environment)ログを Google Security Operations に取り込む方法について説明します。AIDE は、Linux/Unix システム上のファイルの変更を検出するファイル整合性モニタリング ツールです。

始める前に

次の前提条件を満たしていることを確認してください。

  • Google SecOps インスタンス
  • AIDE バージョン 0.18 以降(JSON 形式のサポート用)を実行する systemd を搭載した Linux ホスト
  • プロキシの背後で実行している場合は、Bindplane エージェントの要件に従ってファイアウォール ポートが開いていることを確認してください
  • AIDE 構成ファイルへの特権アクセス

Google SecOps の取り込み認証ファイルを取得する

  1. Google SecOps コンソールにログインします。
  2. [SIEM 設定] > [収集エージェント] に移動します。
  3. Ingestion Authentication File をダウンロードします。
  4. Bindplane をインストールするシステムにファイルを安全に保存します。

Google SecOps のお客様 ID を取得する

  1. Google SecOps コンソールにログインします。
  2. [SIEM 設定] > [プロファイル] に移動します。
  3. [組織の詳細情報] セクションから [お客様 ID] をコピーして保存します。

Bindplane エージェントをインストールする

次の手順に沿って、Linux オペレーティング システムに Bindplane エージェントをインストールします。

Linux へのインストール

  1. root 権限または sudo 権限でターミナルを開きます。
  2. 次のコマンドを実行します。

    sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
    

その他のインストール リソース

その他のインストール オプションについては、こちらのインストール ガイドをご覧ください。

Syslog を取り込んで Google SecOps に送信するように Bindplane エージェントを構成する

  1. 構成ファイルにアクセスします。

    • config.yaml ファイルを見つけます。通常、Linux の /etc/bindplane-agent/ ディレクトリにあります。
    • テキスト エディタ(nanovi など)を使用してファイルを開きます。
  2. config.yaml ファイルを次のように編集します。

    receivers:
      udplog:
        # Replace the port and IP address as required
        listen_address: "0.0.0.0:514"
    
    exporters:
      chronicle/chronicle_w_labels:
        compression: gzip
        # Adjust the path to the credentials file you downloaded in Step 1
        creds_file_path: '/path/to/ingestion-authentication-file.json'
        # Replace with your actual customer ID from Step 2
        customer_id: <CUSTOMER_ID>
        endpoint: malachiteingestion-pa.googleapis.com
        # Add optional ingestion labels for better organization
        log_type: 'AIDE'
        raw_log_field: body
        ingestion_labels:
    
    service:
      pipelines:
        logs/source0__chronicle_w_labels-0:
          receivers:
            - udplog
          exporters:
            - chronicle/chronicle_w_labels
    
    • 自社のインフラストラクチャでの必要性に応じて、ポートと IP アドレスを置き換えます。
    • <CUSTOMER_ID> は、実際の顧客 ID に置き換えます。
    • /path/to/ingestion-authentication-file.json を、ステップ 1 で認証ファイルを保存したファイルパスに更新します。

Bindplane エージェントを再起動して変更を適用する

  • Linux で Bindplane エージェントを再起動するには、次のコマンドを実行します。

    sudo systemctl restart observiq-otel-collector
    

AIDE で Syslog 転送を構成する

  1. AIDE 構成ファイルを開きます。

    sudo vi /etc/aide/aide.conf
    
  2. [Reporting](レポート)に移動して

  3. 次の構成を追加します。

    • report_level: 「list_entries」と入力します。
    • report_format: json(AIDE 0.18 以降の場合)または plain と入力します。
    • report_url: 「syslog:authpriv」と入力します。

    構成の例:

    ```ini
    report_level=list_entries
    report_format=json
    report_url=syslog:authpriv
    ```
    
  4. 構成を保存します。

  5. AIDE ログを Bindplane エージェントに転送するように rsyslog を構成します。rsyslog 構成を開きます。

    sudo vi /etc/rsyslog.d/aide-forward.conf
    
  6. authpriv ファシリティ ログを Bindplane エージェントに転送する次の構成を追加します。

    authpriv.* @<BINDPLANE_AGENT_IP>:514
    
    • <BINDPLANE_AGENT_IP> は、Bindplane エージェント ホストの IP アドレスに置き換えます。
    • UDP 転送には @、TCP 転送には @@ を使用します。
  7. rsyslog を再起動します。

    sudo systemctl restart rsyslog
    
  8. 新規インストールの場合は、AIDE データベースを初期化します。

    sudo aide --init
    sudo mv /var/lib/aide/aide.db.new /var/lib/aide/aide.db
    
  9. 構成をテストします。

    sudo aide --check
    
  10. cron を使用して自動チェックを設定します。

    sudo crontab -e
    
  11. 次の行を追加して、毎日午前 4 時 5 分に AIDE を実行します。

    05 4 * * * root /usr/sbin/aide --check
    

UDM マッピング テーブル

ログフィールド UDM マッピング ロジック
added_label principal.asset.attribute.labels 統合済み
changed_label principal.asset.attribute.labels 統合済み
old_acl_label principal.asset.attribute.labels 統合済み
old_md5_label principal.asset.attribute.labels 統合済み
old_perms_label principal.asset.attribute.labels 統合済み
old_sha256_label principal.asset.attribute.labels 統合済み
old_ts_label principal.asset.attribute.labels 統合済み
removed_label principal.asset.attribute.labels 統合済み
total_label principal.asset.attribute.labels 統合済み
file_path principal.file.full_path 直接マッピングされます。
path principal.file.full_path 直接マッピングされます。
old_size principal.file.size 直接マッピングされます。
host principal.hostname 直接マッピングされます。
sr security_result 統合済み
new_acl_label target.asset.attribute.labels 統合済み
new_md5_label target.asset.attribute.labels 統合済み
new_perms_label target.asset.attribute.labels 統合済み
new_sha256_label target.asset.attribute.labels 統合済み
new_ts_label target.asset.attribute.labels 統合済み
path target.file.full_path 直接マッピングされます。
new_size target.file.size 直接マッピングされます。
なし metadata.event_type 定数: GENERIC_EVENT
なし metadata.product_name 定数: AIDE
なし metadata.vendor_name 定数: AIDE
なし principal.application 定数: aide
なし principal.file.size 定数: sizedata
なし target.file.size 定数: sizedata_target

さらにサポートが必要な場合コミュニティ メンバーや Google SecOps のプロフェッショナルから回答を得ることができます。