[アップデート] Amazon FSx for NetApp ONTAPがファイルシステムの異常なアクティビティを検出するAutonomous Ransomware Protection(ARP)をサポートしました

[アップデート] Amazon FSx for NetApp ONTAPがファイルシステムの異常なアクティビティを検出するAutonomous Ransomware Protection(ARP)をサポートしました

ランサムウェアへの多層防御の一環として導入を検討しよう
Clock Icon2025.04.08

ファイルシステム内で発生した異常なアクティビティを検出したい

こんにちは、のんピ(@non____97)です。

皆さんはファイルシステム内で発生した異常なアクティビティを検出したいなと思ったことはありますか? 私はあります。

EFSやFSxにアンチマルウェアソフトやEDRを直接インストールすることはできません。マウントしている領域について定期的にスキャンして、異常なファイルを検出する方式もありますが、異常なアクティビティのリアルタイム検知は難しいでしょう。

このような理由からセキュリティ要件的にマネージドサービスの導入が見送られるのはもったいないことです。

今回、Amazon FSx for NetApp ONTAP(以降FSxN)がAutonomous Ransomware Protectionをサポートしました。

https://aws.amazon.com/jp/about-aws/whats-new/2025/04/amazon-fsx-netapp-ontap-autonomous-ransomware-protection/

これにより異常なアクティビティをニアリアルタイムで検出することが可能です。

以降、このアップデートについて紹介します。

Autonomous Ransomware Protection とは

概要

Autonomous Ransomware Protection(以降ARP)とは過去のNFSおよびSMBアクセスの分析結果から、ランサムウェア攻撃の可能性がある異常なアクティビティを検出し、Snapshotを取得する機能です。

「異常なアクティビティ」と判定する要素は以下の3つです。

  1. エントロピー : ファイル内のデータのランダム性の評価
  2. 拡張子 : 通常の拡張子タイプと一致しない拡張子
  3. ファイルIOPS : 作成/名前変更/削除されたファイルの数 (データ暗号化による異常なボリュームアクティビティの急増を検出する目的)

TCP/IPのレイヤーやAWSのAPIではなく、実際のNASアクセスを見て検出することが可能というのがポイントです。

GuardDutyはVPC Flow LogsやDNSログ、CloudTrailを見ており、それらのログではこのようなイベントを検出することはできません。

GuardDutyでカバーできなかった範囲について検出できるようになったのは非常に嬉しいですね。

ただし、ARPを過信するのではなく、FPolicyやSnapshot、SnapLock、Tamperproof Snapshotについても併せて利用することが推奨されています。

ONTAPランサムウェア対策戦略

ランサムウェアの効果的な検出戦略には、複数の保護レイヤを含める必要があります。

例えとして、車両の安全機能が挙げられます。シートベルトなどの単一の機能に頼らず、事故時に完全に身を守ることができます。エアバッグ、アンチロックブレーキ、前方衝突警告はすべて、より良い結果につながる追加の安全機能です。ランサムウェアからの保護についても同様の見方をする必要があります。

ONTAPには、ランサムウェアからの保護に役立つFPolicy、Snapshot、SnapLock、Active IQデジタルアドバイザ(別名デジタルアドバイザ)などの機能が含まれていますが、以下では機械学習機能を備えたARP搭載機能に焦点を当てて説明します。

それぞれの機能について紹介している記事は以下のとおりです。

https://dev.classmethod.jp/articles/fsx-for-ontap-native-file-blocking/

https://dev.classmethod.jp/articles/amazon-fsx-netapp-ontap-snaplock/

https://dev.classmethod.jp/articles/amazon-fsx-for-netapp-ontap-snapshots/

https://dev.classmethod.jp/articles/amazon-fsx-for-netapp-ontap-tamperproof-snapshot/

ARPの概要は以下動画およびNetApp公式ドキュメント、AWS公式ドキュメントでも紹介されています。

https://youtu.be/Ep-_s_Q_CFw?si=NMG8t1H7sZH5mTw7

https://docs.netapp.com/ja-jp/ontap/anti-ransomware/

https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/ARP.html

検出時の挙動

ARPが異常なアクティビティを検出した際の挙動は以下のとおりです。

  • EMSイベントの発行
    • Attack Probabilitymoderateの場合
  • Snapshotの取得

つまりは検知をした上で、異常なアクティビティを検出した瞬間に戻せるようなSnapshotを取得するということです。

EMSイベントについての説明は以下記事をご覧ください。

https://dev.classmethod.jp/articles/fsxn-ems-events/

ブロックまでは行わないので注意しましょう。

攻撃の可能性を示すAttack Probabilityは未知のファイル拡張子の数によって判定され、それぞれSnapshotの挙動が変わります。

Attack Probabilityの説明とSnapshotの挙動は以下のとおりです。

Attack Probability 説明
none • 攻撃とはみなされない
• Snapshotのすべてのオプションは設定値通りに適用される
• スナップショットが1つだけ2日経過している場合、別のスナップショットが2日経過するか、このスナップショットが5日経過するまで削除されない
low • ファイル拡張子の数、またはファイル拡張子+高エントロピーの数が十分でない場合に設定される
• その後のイベント(同じ範囲の20以上のファイルが検出されるかどうか)によってnoneまたはmoderateに変化する可能性がある
• ARPによってスナップショットが取得された後、それ以上の攻撃イベントが発生しなければ5日後にnoneに変化する (5日間という閾値の調整は不可)
• lowの間は、最終的にnoneまたはmodelateに変わるかわからないため、スナップショットは保持される
moderate • 攻撃とみなされる
• arw.snap.max.countとarw.snap.create.xxxオプションは考慮され、カウントされる
• modelateの場合のスナップショットの最大保持時間は完全には適用されない
• 攻撃直前に作成されたスナップショットは、管理者が攻撃を誤検知としてマークするまで保持される
• 同じボリュームに複数のARPスナップショットが存在する場合、攻撃をクリアすると一度にすべて削除される
• 不審なアクティビティの後に作成されたスナップショットは、保持期間後に削除される

参考 : Understanding ARP snapshot protection and attack detection - NetApp Knowledge Base

Snapshotのすべてのオプションは設定値通りに適用されるのオプションは以下NetApp公式ドキュメントで紹介されています。

https://docs.netapp.com/ja-jp/ontap/anti-ransomware/modify-automatic-snapshot-options-task.html

ARP導入のステップ

ARPを導入するにあたって以下2つのステップを踏む必要があります。

  • 学習モード
  • アクティブモード

ARPはNASアクセスの分析結果を元に異常なアクティビティの判定を行います。そのために、基準となるNASアクセスを理解するために学習期間を設ける必要があります。

ということで、まずは学習モードで設定して、通常時のエントロピーや拡張子を把握させます。

学習モードの期間はデフォルトではARPが自動的に決定します。最大では30日間です。

Beginning with ONTAP 9.13.1, ARP automatically determines the optimal learning period interval and automates the switch, which might occur before 30 days.

Switch to active mode in ONTAP ARP after a learning period

少なくとも7日間は学習させることが推奨とされています。

実際に異常なアクティビティを検出するのはアクティブモードに入ってからです。

アクティブモード後に再度学習モードに変更をして、再学習をすることも可能ですが、その場合は過去の学習データは削除されます。

はい、Autonomous Ransomware Protectionをアクティブモードに切り替えた後で再学習することは可能ですが、以前の学習データは消去されます。

ARPをアクティブモードに切り替えた後で再学習することはできますか。 - NetApp

また、ベースラインはアクティブモードに切り替えた後の挙動も反映されるようです。

The baseline value (Historical Statistics) and the surge observed can be seen below (can be seen on System Manager as well).
According to the workload's change, the baseline value still will be updated periodically (actual workload average value per 20 minutes) after switching from “Learning mode” to “Active mode”.

Understanding ARP snapshot protection and attack detection - NetApp Knowledge Base

料金

追加料金は発生しません。

その他の注意点

その他FSxNでARPを利用するにあたっての注意点は以下のとおりです。

  • 2025/4/8時点では、Autonomous Ransomware Protection with Artificial Intelligence(以降ARP/AI)は未対応
    • ARP/AIはONTAP 9.16.1からの機能
    • 2025/4/8時点のFSxNはONTAP 9.15.1
  • 以下非推奨なワークロードへの適用
    • ファイルが頻繁に作成または削除されるワークロード
    • アプリケーションがファイルを暗号化する処理を実施しているワークロード
    • ボリューム数が多いワークロード
  • スループットとIOPSへの影響
  • 以下のボリュームでの採用
    • FlexGroup (ARP/AIは使用不可)
    • FlexCache のキャッシュボリューム
    • オフラインボリューム
    • SnapLockボリューム

ARP/AIはNetAppがトレーニングをしたモデルを用いることによってランサムウェアを99%の精度で検出することが可能です。また、ARP/AIには学習期間を設ける必要がありません。すぐに精度の高いランサムウェア対策を導入できるのは大きいですね。

Autonomous Ransomware Protection with Artificial Intelligence (ARP/AI)

Beginning with ONTAP 9.16.1, ARP improves cyber resiliency by adopting a machine-learning model for anti-ransomware analytics that detects constantly evolving forms of ransomware with 99% accuracy. ARP's machine-learning model is pre-trained on a large dataset of files both before and after a simulated ransomware attack. This resource-intensive training is done outside ONTAP, but the learning from this training is used for the model inside ONTAP.

Immediate transition to active protection for ARP/AI with FlexVol volumes

With ARP/AI and FlexVol volumes, there is no learning period. ARP/AI is enabled and active immediately after installation or upgrade to 9.16. After upgrading your cluster to ONTAP 9.16.1, ARP/AI will be automatically enabled for existing and new FlexVol volumes if ARP is already enabled for those volumes.

Learn about ONTAP Autonomous Ransomware Protection

ARPが有効になっている状態でONTAP 9.16.1にアップデートされると、自動的にARP/AIが有効になります。

ARPは、ONTAP 9.16.1以降、人工知能(ARP/AI)を使用した自律型ランサムウェア対策を採用し、脅威の検出と対応を強化しています。クラスタをONTAP 9 .16.1にアップグレードすると、FlexVolボリュームでARP / AIがすでに有効になっている場合、それらのボリュームでARP / AIが自動的に有効になります。ARPを有効にしていない場合、またはクラスタの自動更新を有効にしていない場合は、この手順に記載されているいずれかのシナリオに従う必要があります。

自動更新でONTAP ARP/AIを有効にする

ARPを有効化した場合のワークロードの負荷は最小限とされていますが、かかるにはかかります。特にボリューム数が多い場合はIOPSに影響があるとのことなので注意しましょう。

ARP can have a minimal impact on system performance as measured in throughput and peak IOPS. The impact of the ARP feature depends on the specific volume workloads. For common workloads, the following configuration limits are recommended:

Workload characteristics Recommended volume limit per node **Performance degradation when per-node volume limit is exceeded ***
Read-intensive or the data can be compressed. 150 4% of maximum IOPS
Write-intensive and the data cannot be compressed. 60 10% of maximum IOPS

System performance is not degraded beyond these percentages regardless of the number of volumes added in excess of the recommended limits.

抜粋 : ONTAP Autonomous Ransomware Protection use cases and considerations

やってみる

検証環境

実際に試してみましょう。

NFSクライアントからでFSxNのボリューム上で操作を行い、ARPによって検出がされることを確認します。

ONTAPのバージョンは9.15.1P7です。

::> version
NetApp Release 9.15.1P7: Sat Jan 18 21:34:02 UTC 2025

ARPのEMSイベントカタログの確認

まず、EMSでどのような種類のイベントがあるのか、ARPのEMSイベントカタログを確認します。

::> event catalog  show -message-name *arw*
Message                          Severity         SNMP Trap Type
-------------------------------- ---------------- -----------------
arw.analytics.ext.report         NOTICE           Severity-based
arw.analytics.high.entropy       ERROR            Severity-based
arw.analytics.probability        ERROR            Severity-based
arw.analytics.report             NOTICE           Severity-based
arw.analytics.suspects           ERROR            Severity-based
arw.volume.state                 NOTICE           Severity-based
arw.vserver.state                NOTICE           Severity-based
callhome.arw.activity.seen       ALERT            Severity-based
8 entries were displayed.

::> event catalog  show -message-name *arw* -instance

     Message Name: arw.analytics.ext.report
         Severity: NOTICE
      Description: This message occurs when anti-ransomware analytics generates or updates the "suspicious file extensions" report for a volume.
Corrective Action: NONE
   SNMP Trap Type: Severity-based
    Is Deprecated: true

     Message Name: arw.analytics.high.entropy
         Severity: ERROR
      Description: This message occurs when the number of high entropy data log messages (pertaining to ransomware detection and analysis) that were generated for a volume cross the predefined threshold.
Corrective Action: To correct this issue: 1) Restore data from the last Snapshot copy that were saved before high entropy data was detected. 2) Refer to the anti-ransomware documentation to learn how to implement ransomware protection and mitigation strategies.
   SNMP Trap Type: Severity-based
    Is Deprecated: true

     Message Name: arw.analytics.probability
         Severity: ERROR
      Description: This message occurs when an anti-ransomware attack probability has changed from "low" to "high" on a volume.
Corrective Action: To correct this issue: 1) Restore to the last safe Snapshot copy before attack probabilty became high. 2) Refer to the anti-ransomware documentation to diagnose further and take remedial measures.
   SNMP Trap Type: Severity-based
    Is Deprecated: true

     Message Name: arw.analytics.report
         Severity: NOTICE
      Description: This message occurs when an anti-ransomware analytics report is generated or updated for a volume.
Corrective Action: NONE
   SNMP Trap Type: Severity-based
    Is Deprecated: true

     Message Name: arw.analytics.suspects
         Severity: ERROR
      Description: This message occurs when a list of suspects generated by anti-ransomware analytics grows to a point where further investigation is needed.
Corrective Action: NONE
   SNMP Trap Type: Severity-based
    Is Deprecated: true

     Message Name: arw.volume.state
         Severity: NOTICE
      Description: This message occurs when the anti-ransomware state of a volume is changed.
Corrective Action: NONE
   SNMP Trap Type: Severity-based
    Is Deprecated: false

     Message Name: arw.vserver.state
         Severity: NOTICE
      Description: This message occurs when the anti-ransomware state of a Vserver is changed.
Corrective Action: NONE
   SNMP Trap Type: Severity-based
    Is Deprecated: false

     Message Name: callhome.arw.activity.seen
         Severity: ALERT
      Description: This message occurs when ransomware activity is detected. To protect the data, a Snapshot copy has been created, which can be used to restore the original data. If your system is configured to do so, it generates and transmits an AutoSupport (or "call home") message to NetApp technical support and to the configured destinations. Successful delivery of an AutoSupport message significantly improves problem determination and resolution.
Corrective Action: Use the "security anti-ransomware volume attack generate-report" command to generate the report file of the suspected attack on the volume. Search the knowledge base of the NetApp technical support web site for the "callhome.arw.activity.seen" keyword and refer to ONTAP anti-ransomware documentation to take remedial measures for ransomware activity. If you need further assistance, contact NetApp technical support.
   SNMP Trap Type: Severity-based
    Is Deprecated: false
8 entries were displayed.

Is Deprecatedが多いですね。

Is Deprecatedがtrueとなっているものについては今後削除される予定のようです。

arw.analytics.high.entropy Eventは未使用のEMSであり、今後のONTAPバージョンで削除される予定です。

高エントロピーデータ検出でARW.ANALYS.HIGHエントロピーイベントをトリガーできない - NetApp

実際にARPで異常なアクティビティを検出した場合はcallhome.arw.activity.seenが発行されそうですね。

なお、今回はEMSイベントをトリガーにメール通知やSNMPトラップをするといったことは行いません。イベントフィルターはデフォルトのままです。

::> event filter show
Filter      Rule Rule                                    SNMP Trap
Name        Posn Type     Message Name     Severity      Type      Parameters
----------- ---- -------- ---------------- ------------- --------- -----------
default-trap-events
            1    include  *                EMERGENCY, ALERT
                                                         *         *=*
            2    include  callhome.*       ERROR         *         *=*
            3    include  *                *             Standard, Built-in
                                                                   *=*
            4    exclude  *                *             *         *=*
important-events
            1    include  *                EMERGENCY, ALERT
                                                         *         *=*
            2    include  callhome.*       ERROR         *         *=*
            3    exclude  *                *             *         *=*
no-info-debug-events
            1    include  *                EMERGENCY, ALERT, ERROR, NOTICE
                                                         *         *=*
            2    exclude  *                *             *         *=*
9 entries were displayed.

::> event notification destination show
This table is currently empty.

デフォルトのARP設定確認

デフォルトのARP設定確認をします。

ARPの設定はsecurity anti-ransomware配下のサブコマンドで行います。

::> security anti-ransomware volume ?
  attack>                       Anti-ransomware Volume Suspected Attack Related Details/operations
  attack-detection-parameters>  Manage attack detection parameters of anti-ransomware enabled volume
  auto-switch-to-enable-mode>   The auto-switch-to-enable-mode directory
  disable                       Disable anti-ransomware on a volume
  dry-run                       Dry-run anti-ransomware on a volume
  enable                        Enable anti-ransomware on a volume
  event-log>                    The event-log directory
  pause                         Pause anti-ransomware on a volume
  resume                        Resume anti-ransomware on a volume
  show                          Show anti-ransomware related information of volumes
  space>                        Manage space usage of anti-ransomware enabled volume
  workload-behavior>            Manage anti-ransomware operations on the volume

ARP関連の操作が色々行えそうですね。

ARPの有効化状況を確認します。

::> security anti-ransomware volume show
Vserver    Volume           State            Dry Run Start Time
---------- ---------------- ---------------- ------------------
svm        vol1             disabled         -

::> security anti-ransomware volume show -instance

      Vserver Name: svm
       Volume Name: vol1
             State: disabled
Dry Run Start Time: -
Attack Probability: -
   Attack Timeline: -
 Number of Attacks: -

ARPはボリューム単位で有効化するものであることが分かりますね。

攻撃検出パラメーターを確認します。

::> security anti-ransomware volume attack-detection-parameters show -vserver svm -volume *

Error: The value "*" contains one or more query characters and queries are not supported for the "-volume" parameter. To use query characters as literals
       add quotes around the value.

::> security anti-ransomware volume attack-detection-parameters show -vserver svm -volume
    svm_root vol1

::> security anti-ransomware volume attack-detection-parameters show -vserver svm -volume vol1

Error: show failed: Anti-ransomware is either disabled or disable is in progress on volume "vol1" in Vserver "svm".

ARPが有効ではないタイミングでは確認できないようです。

SVMのARP関連の設定を確認します。

::> vserver show -vserver svm

.
.
(中略)
.
.
Anti-ransomware Auto-switch from Learning to Enabled: true
Anti-ransomware Auto-switch Minimum Incoming Data (in percentage): 5%
Anti-ransomware Auto-switch Duration Without New File Extension (in Days): 3
Anti-ransomware Auto-switch Minimum Learning Period: 10
    Anti-ransomware Auto-switch Minimum File Count: 200
Anti-ransomware Auto-switch Minimum File Extension: 10
  Storage Reserved for In-flight Volume Operations: -

::*> vserver options

FsxId0a7a62750166a62fb
    replication.throttle.incoming.max_kbs
                                      -                    -
    replication.throttle.outgoing.max_kbs
                                      -                    -
2 entries were displayed.

Auto-switch関連のパラメーターのみですね。

Auto-switchは学習モードからアクティブモードへの切り替えを自動で行うものです。

現在の設定だと以下のようになっています。

設定項目
学習モードから有効モードへの自動切替 有効
自動切替に必要な最小データ書き込み量 5%
新しいファイル拡張子がない状態での自動切替期間 3日
自動切替に必要な最小学習期間 10日
自動切替に必要な最小ファイル数 200
自動切替に必要な最小ファイル拡張子数 10

このいずれの条件を満たしている場合、学習モードからアクティブモードに自動的に切り替えられます。

もし、その挙動が困る場合はvserver modify svm_name -anti-ransomware-auto-switch-from-learning-to-enabled falseで無効にしておきましょう。

https://kb.netapp.com/on-prem/ontap/Ontap_OS/OS-KBs/How_to_prevent_ARP_from_auto-switching_volume_from_dry-run_to_active-mode

学習モードの有効化

学習モードの有効化を行います。

::>  security anti-ransomware volume dry-run -vserver svm -volume vol1
Volume modify successful on volume vol1 of Vserver svm.

::> security anti-ransomware volume show
Vserver    Volume           State            Dry Run Start Time                                                                                           ---------- ---------------- ---------------- ------------------
svm        vol1             dry-run          4/8/2025 01:04:20

::> security anti-ransomware volume show -instance

      Vserver Name: svm
       Volume Name: vol1
             State: dry-run
Dry Run Start Time: 4/8/2025 01:04:20
Attack Probability: none
   Attack Timeline: -
 Number of Attacks: -

dry-runと学習モードになったことが確認できます。

このタイミングで攻撃検出のパラメーターを確認できるようになっていました。

::> security anti-ransomware volume attack-detection-parameters show -vserver svm -volume vol1
                                             Vserver Name : svm
                                              Volume Name : vol1
            Is Detection Based on High Entropy Data Rate? : true
  Is Detection Based on Never Seen before File Extension? : false
                  Is Detection Based on File Create Rate? : true
                  Is Detection Based on File Rename Rate? : true
                  Is Detection Based on File Delete Rate? : true
           Is Detection Relaxing Popular File Extensions? : true
                High Entropy Data Surge Notify Percentage : 100
                 File Create Rate Surge Notify Percentage : 100
                 File Rename Rate Surge Notify Percentage : 100
                 File Delete Rate Surge Notify Percentage : 100
 Never Seen before File Extensions Count Notify Threshold : 20
       Never Seen before File Extensions Duration in Hour : 24

ファイルの作成/削除/リネーム、エントロピーのレートが閾値を超過した場合に検出するようですね。

過検知されて困っている場合はここの値を調整することになるでしょう。

一般的な拡張子の緩和を行うIs Detection Relaxing Popular File Extensionsが有効になっており、Is Detection Based on Never Seen before File Extensionも無効であることから、学習モード中に.mp3.txtなどのよく使われるファイル拡張子を学習しなくとも、アクティブモードで検出はされないようですね。

アクティブモード時に検出の基準となるレートについてはsecurity anti-ransomware volume workload-behavior showで確認できます。

::> security anti-ransomware volume workload-behavior show -vserver svm -volume vol1
                                         Vserver: svm
                                          Volume: vol1
                        File Extensions Observed: -
              Number of File Extensions Observed: -

 Historical Statistics
              High Entropy Data Write Percentage: -
   High Entropy Data Write Peak Rate (KB/Minute): -
              File Create Peak Rate (per Minute): -
              File Delete Peak Rate (per Minute): -
              File Rename Peak Rate (per Minute): -

 Surge Observed
                                  Surge Timeline: -
              High Entropy Data Write Percentage: -
   High Entropy Data Write Peak Rate (KB/Minute): -
              File Create Peak Rate (per Minute): -
              File Delete Peak Rate (per Minute): -
              File Rename Peak Rate (per Minute): -
                  Newly Observed File Extensions: -
        Number of Newly Observed File Extensions: -

また、ボリューム側のAuto-switch情報は以下のとおりです。

::> security anti-ransomware volume auto-switch-to-enable-mode show
 Vserver                                                      : svm
 Volume                                                       : vol1
 Amount of Write (in KB) Received during Dry-run Mode         : 0
 Number of Days Completed in Dry-run Mode                     : 0
 Number of Days Without a New Extension seen in Dry-run Mode  : 0
 Number of Files created during Dry-run Period                : 0
 Number of File extensions observed in Dry-run period         : 0

ARPによって未知の拡張子を検出した場合とSnapshot作成時にEMSイベントを発行するかについては、いずれも無効になっていました。

::> security anti-ransomware volume event-log show
                  Vserver : svm
                   Volume : vol1
            Is Enabled on
  New File Extension Seen : false
            Is Enabled on
   Snapshot Copy Creation : false

ファイル操作

学習モード中にファイルの操作をします。

まずは以下のようなファイルを用意しました。

$ ls -l /mnt/fsxn/vol1
total 300
-rw-r--r--. 1 root root 44890 Apr  8 03:19  6ioQbhIrWyzc.png
-rw-r--r--. 1 root root 26016 Apr  8 03:05 'AWS DataSyncのタスクを複数個作成しようとした時に空きIPアドレス不足となってしまった場合の対処方法.md'
-rw-r--r--. 1 root root 25214 Apr  8 03:19  CvT0uHnaX4RK.png
-rw-r--r--. 1 root root 51377 Apr  8 03:03  EC2インスタンスのインスタンスタイプを変更する場合はアプリケーションがNUMAをサポートしているかも気をつけよう.md
-rw-r--r--. 1 root root 56715 Apr  8 03:04 'Linux OSを移行する時に確認する設定をまとめてみた.md'
-rw-r--r--. 1 root root 21809 Apr  8 03:02 "SMBファイルサーバー上のアクセス権限がないフォルダを参照しようとしたときに There's a problem accessing と長期間エラーメッセージが表示される場合はWinRMのポートへのアクセスを疑おう.md"
-rw-r--r--. 1 root root 14298 Apr  8 03:17  vpn-0131825b1b238aa4b.txt
-rw-r--r--. 1 root root 24056 Apr  8 03:04  プリセールスエンジニアとしてよくヒアリングしていることをまとめてみた.md

このタイミングでworkload-behaviorを確認します。

::*> security anti-ransomware volume workload-behavior show -vserver svm -volume vol1
                                         Vserver: svm
                                          Volume: vol1
                        File Extensions Observed: -
              Number of File Extensions Observed: -

 Historical Statistics
              High Entropy Data Write Percentage: -
   High Entropy Data Write Peak Rate (KB/Minute): -
              File Create Peak Rate (per Minute): -
              File Delete Peak Rate (per Minute): -
              File Rename Peak Rate (per Minute): -

 Surge Observed
                                  Surge Timeline: -
.
.
(中略)
.
.
        Number of Newly Observed File Extensions: -

まだ反映されていませんね。

しばらく様子見します。

::*> security anti-ransomware volume workload-behavior show -vserver svm -volume vol1
                                         Vserver: svm
                                          Volume: vol1
                        File Extensions Observed: swp, swx, md, swpx
              Number of File Extensions Observed: 4

 Historical Statistics
              High Entropy Data Write Percentage: -
   High Entropy Data Write Peak Rate (KB/Minute): -
              File Create Peak Rate (per Minute): -
              File Delete Peak Rate (per Minute): -
              File Rename Peak Rate (per Minute): -

 Surge Observed
                                  Surge Timeline: -
.
.
(中略)
.
.
        Number of Newly Observed File Extensions: -

viで作成したのでmdの他にswp``swpxなどが拡張子として検出されていました。

さらに放置すると、以下のように検出されました。

::> security anti-ransomware volume workload-behavior show -vserver svm -volume vol1
                                         Vserver: svm
                                          Volume: vol1
                        File Extensions Observed: swp, swx, md, swpx, png, txt
              Number of File Extensions Observed: 6

 Historical Statistics
              High Entropy Data Write Percentage: -
   High Entropy Data Write Peak Rate (KB/Minute): -
              File Create Peak Rate (per Minute): 1
              File Delete Peak Rate (per Minute): 1
              File Rename Peak Rate (per Minute): -

 Surge Observed
                                  Surge Timeline: -
.
.
(中略)
.
.
        Number of Newly Observed File Extensions: -

ようやくpngtxtも追加されました。ファイル作成と削除のレートも記録されていますね。

ドキュメントを眺めていると、こちらは20分ごとに更新されるようです。

Surge Observed セクションのカウンタは20分ごとに更新されます。
Newly Observed File Extensions の数は、コマンドが実行されるタイミングによって増加しないことが想定されます。

新たに検出されたカウンタに値が表示されないが、検出されたファイル拡張子の数は増え続けている - NetApp

アクティブモードへの切り替え

学習が完了したとして、アクティブモードへ切り替えます。

::> security anti-ransomware volume enable -vserver svm -volume vol1
Volume modify successful on volume vol1 of Vserver svm.

::> security anti-ransomware volume show -instance

      Vserver Name: svm
       Volume Name: vol1
             State: enabled
Dry Run Start Time: -
Attack Probability: none
   Attack Timeline: -
 Number of Attacks: -

enabledとなり、アクティブモードに切り替わったことが分かります。

dd コマンドによるファイルの追加

それでは/dev/urandomをソースとして、ddでいくつかの1GiBのファイルを作成します。

$ sudo dd if=/dev/urandom of=/mnt/fsxn/vol1/random_pattern_binary_block_1GiB bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 6.54569 s, 164 MB/s
.
.
(中略)
.
.
[ec2-user@ip-172-31-9-4 ~]$ sudo dd if=/dev/urandom of=/mnt/fsxn/vol1/random_pattern_binary_block_1GiB_8 bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 6.58727 s, 163 MB/s

$ ls -l /mnt/fsxn/vol1
total 8421996
-rw-r--r--. 1 root root      44890 Apr  8 03:19  6ioQbhIrWyzc.png
-rw-r--r--. 1 root root      26016 Apr  8 03:05 'AWS DataSyncのタスクを複数個作成しようとした時に空きIPアドレス不足となってしまった場合の対処方法.md'
-rw-r--r--. 1 root root      25214 Apr  8 03:19  CvT0uHnaX4RK.png
-rw-r--r--. 1 root root      51377 Apr  8 03:03  EC2インスタンスのインスタンスタイプを変更する場合はアプリケーションがNUMAをサポートしているかも気をつけよう.md
-rw-r--r--. 1 root root      56715 Apr  8 03:04 'Linux OSを移行する時に確認する設定をまとめてみた.md'
-rw-r--r--. 1 root root      21809 Apr  8 03:02 "SMBファイルサーバー上のアクセス権限がないフォルダを参照しようとしたときに There's a problem accessing と長期間エラーメッセージが表示される場合はWinRMのポートへのアクセスを疑おう.md"
-rw-r--r--. 1 root root 1073741824 Apr  8 04:14  random_pattern_binary_block_1GiB
-rw-r--r--. 1 root root 1073741824 Apr  8 04:15  random_pattern_binary_block_1GiB_2
-rw-r--r--. 1 root root 1073741824 Apr  8 04:15  random_pattern_binary_block_1GiB_3
-rw-r--r--. 1 root root 1073741824 Apr  8 04:15  random_pattern_binary_block_1GiB_4
-rw-r--r--. 1 root root 1073741824 Apr  8 04:16  random_pattern_binary_block_1GiB_5
-rw-r--r--. 1 root root 1073741824 Apr  8 04:16  random_pattern_binary_block_1GiB_6
-rw-r--r--. 1 root root 1073741824 Apr  8 04:17  random_pattern_binary_block_1GiB_7
-rw-r--r--. 1 root root 1073741824 Apr  8 04:18  random_pattern_binary_block_1GiB_8
-rw-r--r--. 1 root root      14298 Apr  8 03:17  vpn-0131825b1b238aa4b.txt
-rw-r--r--. 1 root root      24056 Apr  8 03:04  プリセールスエンジニアとしてよくヒアリングしていることをまとめてみた.md

今まではテキスト形式の書き込みのみだったところ、バイナリとすることでエントロピーが高い状況を作り出します。

検出されたのか確認します。

::> security anti-ransomware volume show -instance

      Vserver Name: svm
       Volume Name: vol1
             State: enabled
Dry Run Start Time: -
Attack Probability: none
   Attack Timeline: -
 Number of Attacks: -

はい、noneのままです。

EMSイベントも発行されていません。

::> event log show -severity *
Time                Node             Severity      Event
------------------- ---------------- ------------- ---------------------------
4/8/2025 04:12:26   FsxId0a7a62750166a62fb-01
                                     NOTICE        arw.volume.state: Anti-ransomware state was changed to "enabled" on volume "vol1" (UUID: "78c4dc06-1413-11f0-9089-911f8ef0d71b") in Vserver "svm" (UUID: "15792416-1413-11f0-9089-911f8ef0d71b").
4/8/2025 01:04:20   FsxId0a7a62750166a62fb-01
                                     NOTICE        arw.volume.state: Anti-ransomware state was changed to "dry-run" on volume "vol1" (UUID: "78c4dc06-1413-11f0-9089-911f8ef0d71b") in Vserver "svm" (UUID: "15792416-1413-11f0-9089-911f8ef0d71b").
4/8/2025 00:50:31   FsxId0a7a62750166a62fb-01
                                     NOTICE        arw.volume.state: Anti-ransomware state was changed to "disabled" on volume "vol1" (UUID: "78c4dc06-1413-11f0-9089-911f8ef0d71b") in Vserver "svm" (UUID: "15792416-1413-11f0-9089-911f8ef0d71b").
.
.
(中略)
.
.
Press <space> to page down, <return> for next line, or 'q' to quit...
10 entries were displayed.

Snapshotが取得されているのか確認します。

::> snapshot show -volume vol1 -instance

                                   Vserver: svm
                                    Volume: vol1
                    cp Count (for sorting): 70
                                  Snapshot: Anti_ransomware_backup.2025-04-08_0414
                             Creation Time: Tue Apr 08 04:14:32 2025
                             Snapshot Busy: false
.
.
(中略)
.
.
           Label for SnapMirror Operations: anti-ransomware-main-backup
                            Snapshot State: -
                      Constituent Snapshot: false
                               Expiry Time: -
                      SnapLock Expiry Time: -
         Has the SnapLock Snapshot Expired: -
Seconds until the SnapLock Snapshot Expiry: -

はい、Snapshotは取得されています。

noneであっても高エントロピーとなったタイミングでSnapshotを取得するのは仕様です。

  • It is ONTAP's expected behavior that ARP snapshots auto-creation happens even when the high-entropy data percentage is just 1%.
  • The ARP snapshots are being created at regular intervals as long as the workload generates high-entropy data.
    • If ONTAP only generates ARP snapshots after an attack or surge is detected, it is late because the snapshot will have most of the user data already encrypted.
    • The sheer presence of ARP snapshots should not be considered a threat.
    • ARP snapshot creation & deletion is a regular event unless there is a report of an attack.
    • These ARP snapshots can be ignored since they can be eventually recycled.

ARP snapshots are generated without attack or surge detection - NetApp Knowledge Base

Snapshotディレクトリを覗いてみましょう。

$ ls -l /mnt/fsxn/vol1/.snapshot/
total 4
drwxr-xr-x. 3 root root 4096 Apr  8 04:14 Anti_ransomware_backup.2025-04-08_0414
[ec2-user@ip-172-31-9-4 ~]$ ls -l /mnt/fsxn/vol1/.snapshot/Anti_ransomware_backup.2025-04-08_0414
total 33204
-rw-r--r--. 1 root root    44890 Apr  8 03:19  6ioQbhIrWyzc.png
-rw-r--r--. 1 root root    26016 Apr  8 03:05 'AWS DataSyncのタスクを複数個作成しようとした時に空きIPアドレス不足となってしまった場合の対処方法.md'
-rw-r--r--. 1 root root    25214 Apr  8 03:19  CvT0uHnaX4RK.png
-rw-r--r--. 1 root root    51377 Apr  8 03:03  EC2インスタンスのインスタンスタイプを変更する場合はアプリケーションがNUMAをサポートしているかも気をつけよう.md
-rw-r--r--. 1 root root    56715 Apr  8 03:04 'Linux OSを移行する時に確認する設定をまとめてみた.md'
-rw-r--r--. 1 root root    21809 Apr  8 03:02 "SMBファイルサーバー上のアクセス権限がないフォルダを参照しようとしたときに There's a problem accessing と長期間エラーメッセージが表示される場合はWinRMのポートへのアクセスを疑おう.md"
-rw-r--r--. 1 root root 33554432 Apr  8 04:14  random_pattern_binary_block_1GiB
-rw-r--r--. 1 root root    14298 Apr  8 03:17  vpn-0131825b1b238aa4b.txt
-rw-r--r--. 1 root root    24056 Apr  8 03:04  プリセールスエンジニアとしてよくヒアリングしていることをまとめてみた.md

ddで作成した一つ目のファイルrandom_pattern_binary_block_1GiBを書き込んでいるSnapshotを取得したことが分かりますね。

レポートは何か出力されているでしょうか。レポートを生成します。

::> security anti-ransomware volume attack generate-report -volume vol1 -dest-path svm:vol1/
Report "report_file_svm_vol1_08-04-2025_04-29-48" available at path "svm:vol1/".

出力されたレポートのサイズは0と、何も検出はされていないようです。modelateである必要があるかもしれないですね。

$ ls -l /mnt/fsxn/vol1 | grep report
-r--r--r--. 1 root root          0 Apr  8 04:29 report_file_svm_vol1_08-04-2025_04-29-48

workload-behavior showの結果は以下のとおりです。

::> security anti-ransomware volume workload-behavior show -vserver svm -volume vol1
                                         Vserver: svm
                                          Volume: vol1
                        File Extensions Observed: swp, swx, md, swpx, png, txt
              Number of File Extensions Observed: 6

 Historical Statistics
              High Entropy Data Write Percentage: 100
   High Entropy Data Write Peak Rate (KB/Minute): 111740
              File Create Peak Rate (per Minute): 1
              File Delete Peak Rate (per Minute): 1
              File Rename Peak Rate (per Minute): -

 Surge Observed
                                  Surge Timeline: -
.
.
(中略)
.
.
        Number of Newly Observed File Extensions: -

書き込みピークのレートが更新されたことが分かります。

大量のファイルの暗号化

それでは大量にファイルを暗号化して検出されるか否かを確認しましょう。

NetApp公式ドキュメントを見ると、デフォルトでは未知の拡張子を持つファイル数が24時間以上に20個以上が基準のようです。

Threat assessment and ARP snapshots

When active and not in learning mode, ARP assesses threat probability based on incoming data measured against learned analytics. A measurement is assigned when ARP detects a threat:

  • Low: The earliest detection of an abnormality in the volume (for example, a new file extension is observed in the volume). This level of detection is only available in versions prior to ONTAP 9.16.1 that do not have ARP/AI.
  • Moderate: Multiple files with the same never-seen-before file extension are observed.
    • In ONTAP 9.10.1, the threshold for escalation to moderate is 100 or more files.
    • Beginning with ONTAP 9.11.1, the file quantity is modifiable; its default value is 20.

Learn about ONTAP Autonomous Ransomware Protection

調整したい場合はsecurity anti-ransomware volume attack-detection-parameters modify-never-seen-before-file-extn-count-notify-threshold-never-seen-before-file-extn-duration-in-hoursで調整しましょう。

20個以上になるようにいくつかhtmlファイルを配置した上で、以下スクリプトでファイルを暗号化します。

# 暗号化パスワード
ENCRYPTION_PASSWORD="non-97"

# 暗号化対象ファイルのリスト
mapfile -t FILE_LIST < <(find . -maxdepth 3 -type f ! -name "*.lckd" ! -name "*.key")

# 各ファイルを処理
for file in "${FILE_LIST[@]}"; do
    echo "暗号化中: $file"
    
    FULL_PATH="$(pwd)/$file"
    TEMP_FILE="${FULL_PATH}.processing.lckd"
    ENCRYPTED_FILE="${FULL_PATH}.lckd"
    
    # ファイルを一時ファイルに移動
    if sudo mv "$FULL_PATH" "$TEMP_FILE" 2>/dev/null; then
        # OpenSSLで暗号化
        if sudo openssl enc -aes-256-cbc -salt -in "$TEMP_FILE" -out "$ENCRYPTED_FILE" -pass "pass:$ENCRYPTION_PASSWORD" 2>/dev/null; then
            # 一時ファイルを削除
            sudo rm "$TEMP_FILE" 2>/dev/null
            echo "暗号化完了: $file"
        else
            echo "暗号化失敗: $file"
            # 失敗した場合、元のファイルに戻す
            sudo mv "$TEMP_FILE" "$FULL_PATH" 2>/dev/null
        fi
    else
        echo "ファイル処理失敗: $file"
    fi

    echo "---"
    
    sleep 0.2
done
暗号化中: ./CvT0uHnaX4RK.png
暗号化完了: ./CvT0uHnaX4RK.png
---
暗号化中: ./SMBファイルサーバー上のアクセス権限がないフォルダを参照しようとしたときに There's a problem accessing と長期間エラーメッセージが表示される場合はWinRMのポートへのアクセスを疑おう.md
ファイル処理失敗: ./SMBファイルサーバー上のアクセス権限がないフォルダを参照しようとしたときに There's a problem accessing と長期間エラーメッセージが表示される場合はWinRMのポートへのアクセスを疑おう.md
---
.
.
(中略)
.
.
---
暗号化中: ./aws-datasync-verification-checksum-calculation-timing.html
暗号化完了: ./aws-datasync-verification-checksum-calculation-timing.html
---

ファイルが暗号化されたことを確認します。

$ ls -l /mnt/fsxn/vol1
total 8425512
-rw-r--r--. 1 root root      44912 Apr  8 05:16  6ioQbhIrWyzc.png.lckd
-rw-r--r--. 1 root root      26048 Apr  8 05:16 'AWS DataSyncのタスクを複数個作成しようとした時に空きIPアドレス不足となってしまった場合の対処方法.md.lckd'
-rw-r--r--. 1 root root      25232 Apr  8 05:16  CvT0uHnaX4RK.png.lckd
-rw-r--r--. 1 root root      51408 Apr  8 05:16  EC2インスタンスのインスタンスタイプを変更する場合はアプリケーションがNUMAをサポートしているかも気をつけよう.md.lckd
-rw-r--r--. 1 root root      56736 Apr  8 05:16 'Linux OSを移行する時に確認する設定をまとめてみた.md.lckd'
-rw-r--r--. 1 root root      21809 Apr  8 03:02 "SMBファイルサーバー上のアクセス権限がないフォルダを参照しようとしたときに There's a problem accessing と長期間エラーメッセージが表示される場合はWinRMのポートへのアクセスを疑おう.md"
-rw-r--r--. 1 root root    1287808 Apr  8 05:17  amazon-fsx-for-netapp-ontap-client-vpn-smb-connection.html.lckd
-rw-r--r--. 1 root root     453200 Apr  8 05:17  amazon-fsx-netapp-ontap-no-charges-snaplock-licensing.html.lckd
-rw-r--r--. 1 root root     713904 Apr  8 05:17  aws-datasync-verification-checksum-calculation-timing.html.lckd
-rw-r--r--. 1 root root     646160 Apr  8 05:17  aws-waf-count-traffic-query-cloudwatch-logs-insights-field-index-attempt.html.lckd
-rw-r--r--. 1 root root     433520 Apr  8 05:17  jaws-days-2025-sessions-C-6-aurora-postgresql-cloudwatch-logs-cost-reduction.html.lckd
-rw-r--r--. 1 root root 1073741856 Apr  8 05:16  random_pattern_binary_block_1GiB.lckd
.
.
(中略)
.
.
-rw-r--r--. 1 root root 1073741856 Apr  8 05:17  random_pattern_binary_block_1GiB_8.lckd
-rw-r--r--. 1 root root         32 Apr  8 05:17  report_file_svm_vol1_08-04-2025_04-29-48.lckd
-rw-r--r--. 1 root root      14320 Apr  8 05:16  vpn-0131825b1b238aa4b.txt.lckd
-rw-r--r--. 1 root root      24080 Apr  8 05:16  プリセールスエンジニアとしてよくヒアリングしていることをまとめてみた.md.lckd

検出されているか確認します。

::> security anti-ransomware volume show -instance

      Vserver Name: svm
       Volume Name: vol1
             State: enabled
Dry Run Start Time: -
Attack Probability: none
   Attack Timeline: -
 Number of Attacks: -

::> snapshot show -volume vol1 -fields create-time
vserver volume snapshot                               create-time
------- ------ -------------------------------------- ------------------------
svm     vol1   Anti_ransomware_backup.2025-04-08_0414 Tue Apr 08 04:14:32 2025

::> security anti-ransomware volume workload-behavior show -vserver svm -volume vol1
                                         Vserver: svm
                                          Volume: vol1
                        File Extensions Observed: swp, swx, md, html, swpx,
                                                  png, lckd, txt
              Number of File Extensions Observed: 8

 Historical Statistics
              High Entropy Data Write Percentage: 100
   High Entropy Data Write Peak Rate (KB/Minute): 111740
              File Create Peak Rate (per Minute): 1
              File Delete Peak Rate (per Minute): 1
              File Rename Peak Rate (per Minute): -

 Surge Observed
                                  Surge Timeline: -
.
.
(中略)
.
.
        Number of Newly Observed File Extensions: -

特に検出されていないですし、新規にSnapshotも取得されていません。

もっと激しい挙動が必要なのでしょうか。

以下のように適当なテキストファイルを50個ほど作成します。

for i in {1..50}; do
  # ランダムなファイル名を生成(8文字)
  filename=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 8 | head -n 1)
  
  # ランダムな内容を生成(100〜500文字)
  content_length=$(( RANDOM % 401 + 100 ))  # 100から500までのランダムな数
  content=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w "$content_length" | head -n 1)
  
  # ファイルを作成
  echo "$content" | sudo tee "$(pwd)/test_$filename.txt" > /dev/null
  
  echo "作成: $(pwd)/test_$filename.txt"
done
作成: /mnt/fsxn/vol1/test_wUakbF6M.txt
作成: /mnt/fsxn/vol1/test_twZNqguh.txt
.
.
(中略)
.
.
作成: /mnt/fsxn/vol1/test_tlR4RsSI.txt
作成: /mnt/fsxn/vol1/test_kNwOpq38.txt

作成したファイルについて上述のスクリプトで暗号化を行います。

$ ls -l /mnt/fsxn/vol1
total 8425712
-rw-r--r--. 1 root root      44912 Apr  8 05:16  6ioQbhIrWyzc.png.lckd
.
.
(中略)
.
.
-rw-r--r--. 1 root root        464 Apr  8 05:28  test_0JBmGNPJ.txt.lckd
.
.
(中略)
.
.
-rw-r--r--. 1 root root        288 Apr  8 05:28  test_yNuRVIlr.txt.lckd
-rw-r--r--. 1 root root      14320 Apr  8 05:16  vpn-0131825b1b238aa4b.txt.lckd
-rw-r--r--. 1 root root      24080 Apr  8 05:16  プリセールスエンジニアとしてよくヒアリングしていることをまとめてみた.md.lckd

検知されたか確認します。

::> security anti-ransomware volume show -instance

      Vserver Name: svm
       Volume Name: vol1
             State: enabled
Dry Run Start Time: -
Attack Probability: moderate
   Attack Timeline: 4/8/2025 05:16:38
 Number of Attacks: 1

moderateとなっていますね!

ただ、05:16:38とタイミングとしては最初に暗号化を実施したタイミングのようです。

EMSイベントを確認すると、05:29:00に発行されていました。

::> event log show -severity *
Time                Node             Severity      Event
------------------- ---------------- ------------- ---------------------------
4/8/2025 05:29:00   FsxId0a7a62750166a62fb-01
                                     ALERT         callhome.arw.activity.seen: Call home message for POSSIBLE RANSOMWARE ACTIVITY DETECTED, Volume: vol1 (UUID: 78c4dc06-1413-11f0-9089-911f8ef0d71b) in Vserver: svm (UUID: 15792416-1413-11f0-9089-911f8ef0d71b)
4/8/2025 04:12:26   FsxId0a7a62750166a62fb-01
                                     NOTICE        arw.volume.state: Anti-ransomware state was changed to "enabled" on volume "vol1" (UUID: "78c4dc06-1413-11f0-9089-911f8ef0d71b") in Vserver "svm" (UUID: "15792416-1413-11f0-9089-911f8ef0d71b").
.
.
(中略)
.
.
Press <space> to page down, <return> for next line, or 'q' to quit...
10 entries were displayed.

若干ラグがあるというのは注意が必要ですね。

Snapshotが取得されているか確認します。

::> snapshot show -volume vol1 -fields create-time, snapmirror-label, snaplock-expiry-time
vserver volume snapshot                               create-time              snapmirror-label            snaplock-expiry-time
------- ------ -------------------------------------- ------------------------ --------------------------- --------------------
svm     vol1   Anti_ransomware_backup.2025-04-08_0414 Tue Apr 08 04:14:32 2025 anti-ransomware-main-backup -

おや、新規に取得されていません。

既に直近noneで取得されている場合はmoderateになったタイミングではSnapshotを取得しないのでしょうか。

NetApp KBによると高エントロピーによって取得されたSnapshotのインターバルは30分です。

A snapshot for new-extension is created if all conditions below are true:

a. The last high-entropy snapshot is more than 30 minutes old.
b. The last new-extension snapshot is more than 4 hours old.
c. The last new-extension snapshot is more than 48 hours old. (Beginning with ONTAP 9.13)

.
.
(中略)
.
.

  • ONTAP 9.13 or later:
    • T: Snapshot created due to high-entropy data.
    • T + 20 mins: A new file extension .abcd with 20+ files observed. Snapshot not created for reason a.
    • T + 30 mins: A new file extension .efgh with 20+ files observed. Snapshot created. (The next snapshot for new-extension will not be created until 48 hours from this point)
    • T + 40 mins: A new file extension .ijkl with 20+ files observed. Snapshot not created for reason c.

How ARP creates Snapshots - NetApp Knowledge Base

今回は1時間以上間は空いていますがSnapshotは取得されませんでした。ちょっと謎です。

workload-behavior showは以下のとおりです。

::> security anti-ransomware volume workload-behavior show -vserver svm -volume vol1
                                         Vserver: svm
                                          Volume: vol1
                        File Extensions Observed: swp, swx, md, html, swpx,
                                                  png, lckd, txt
              Number of File Extensions Observed: 8

 Historical Statistics
              High Entropy Data Write Percentage: 100
   High Entropy Data Write Peak Rate (KB/Minute): 111740
              File Create Peak Rate (per Minute): 1
              File Delete Peak Rate (per Minute): 1
              File Rename Peak Rate (per Minute): -

 Surge Observed
                                  Surge Timeline: -
.
.
(中略)
.
.
        Number of Newly Observed File Extensions: -

lckdの拡張子が追加されている以外は特に変化はないですね。

レポートを確認しましょう。

レポートを生成します。

::> security anti-ransomware volume attack generate-report -volume vol1 -dest-path svm:vol1/
Report "report_file_svm_vol1_08-04-2025_05-33-32" available at path "svm:vol1/".

生成したレポートを確認します。

$ ls -l report_file_svm_vol1_08-04-2025_05-33-32
-r--r--r--. 1 root root 191 Apr  8 05:33 report_file_svm_vol1_08-04-2025_05-33-32

$ cat report_file_svm_vol1_08-04-2025_05-33-32
1 "4/8/2025 05:16:38" /EC2インスタンスのインスタンスタイプを変更する場合はアプリケーションがNUMAをサポートしているかも気をつけよう.md.lckd 2

ファイル名および時刻から、1回目の暗号化のタイミングで検出したことが分かります。

偽陽性の報告

ARPで取得されたSnapshotは削除することはできません。

::> snapshot delete -vserver svm -volume vol1 -snapshot Anti_ransomware_backup.2025-04-08_0414

Error: command failed: This Snapshot copy is currently used as a reference Snapshot copy by Job IDs: anti_ransomware. Deleting the Snapshot copy can fail
       the jobs.

このボリュームはSnapLockボリュームではないですし、Tamper-proof Snapshotでもないのですが、削除できません。

modelateとして検知され、ARPで取得されたSnapshotを削除するためには拡張子について報告する必要があります。

偽陽性ではない = 真陽性として報告した場合は7日、偽陽性と報告した場合は24時間Snapshotが保持されます。

The anti-ransomware volume attack clear-suspect command removes the specified files from suspect files report. When no optional parameters are provided, the suspect report file is cleared. If the attack is marked as a true positive, by setting the false-positive parameter to false , the snapshot is retained for 7 days. If marked as a false positive, by setting the false-positive parameter to true , the snapshot is retained for 24 hours.

security anti-ransomware volume attack clear-suspect

今回はlckdを偽陽性と報告します。

::> security anti-ransomware volume attack clear-suspect -vserver svm -volume vol1 -extension lckd -false-positive true
Suspect records cleared: 9.

Snapshotおよび検知状態、workload-behavior showの確認します。

::> snapshot show -volume vol1 -fields create-time, snapmirror-label, snaplock-expiry-time
There are no entries matching your query.

::> security anti-ransomware volume show -instance

      Vserver Name: svm
       Volume Name: vol1
             State: enabled
Dry Run Start Time: -
Attack Probability: none
   Attack Timeline: -
 Number of Attacks: -

::> security anti-ransomware volume workload-behavior show -vserver svm -volume vol1
                                         Vserver: svm
                                          Volume: vol1
                        File Extensions Observed: swp, swx, md, html, swpx,
                                                  png, lckd, txt
              Number of File Extensions Observed: 8

 Historical Statistics
              High Entropy Data Write Percentage: 100
   High Entropy Data Write Peak Rate (KB/Minute): 111740
              File Create Peak Rate (per Minute): 5
              File Delete Peak Rate (per Minute): 2
              File Rename Peak Rate (per Minute): 2

 Surge Observed
                                  Surge Timeline: -
.
.
(中略)
.
.
        Number of Newly Observed File Extensions: -

Snapshotは即座に削除され、Attack Probabilitynoneとなりましたね。workload-behavior showの結果は変わらずといった具合です。

ランサムウェアへの多層防御の一環として導入を検討しよう

Amazon FSx for NetApp ONTAPがファイルシステムの異常なアクティビティを検出するAutonomous Ransomware Protection(ARP)をサポートしたアップデートを紹介しました。

少しクセがあるため、慣れるのには少し時間がかかる印象を持ちました。

また、あくまでARPはエントロピーと拡張子、ファイルIOPSによる検出とSnapshotの取得までです。ARPにランサムウェア対策の一手を担わせるのではなく、あくまで多層防御の一環として導入するのが良さそうです。

個人的にはEventBridgeやGuardDuty、Security Hubなど他AWSサービスと連携して検出できるようになって欲しいです。現状だとARPで検出してくれても、なかなか気づくことは難しいのではないでしょうか。対応としては、NetApp BlueXPといったAWS外の別製品に頼ったり、手組みしたりする必要があります。

この記事が誰かの助けになれば幸いです。

以上、クラウド事業本部 コンサルティング部の のんピ(@non____97)でした!

Share this article

facebook logohatena logotwitter logo

© Classmethod, Inc. All rights reserved.