Threat Intel の最適化
このページでは、脅威をスキャンするログおよびイベント タイプに基づいて、Threat Intel クイック分析アプリケーション クエリをさらに最適化して強化する方法を説明します。
Threat Intel クイック分析アプリケーションは、基準値のクエリを提供します。脅威をスキャンするログ/イベント タイプによって、これらのクエリをさらに最適化して強化できます。以下のガイドラインを使用して、Threat Intel クエリをカスタマイズします。
- Threat Intel lookup operator を使用する前に不要なログを除外する
- キーワードを使用する
where
operator を使用する- 一般的な検索最適化ルールを使用する
例:
_sourceCategory=cylance "IP Address" | parse regex "(?<ip_address>\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})" | where !isNull(ip_address) | where ip_address != "0.0.0.0" and ip_address != "127.0.0.1" | lookup type, actor, raw, threatlevel as malicious_confidence from sumo://threat/cs on threat=ip_address
FER (Field Extraction Rules)
FER (Field Extraction Rules) を使用して、メッセージが取り込まれた時点のログ メッセージからフィールドを parse するため、クエリ レベルでフィールドを parse する必要がなくなります。Threat Intel lookup operator と共にこれらの parse されたフィールドを使用します。
- FER を作成します。たとえば、Cylance セキュリティ イベントの場合、次の FER を作成して使用します。
parse "Event Type: *, Event Name: *, Device Name: *, IP Address: (*, *), File Name: *, Path: *, Drive Type: *, SHA256: *, MD5: *, Status: *, Cylance Score: *, Found Date: *, File Type: *, Is Running: *, Auto Run: *, Detected By: *" as event_type,event_name,device_name,src_ip,dest_ip,file_name,path,drive_type,sha,md5,status,score,found,file_type,isRunning,autoRun,detected - クエリをカスタマイズして、Threat Intel lookup operator と共に FER の parse されたフィールドを使用できるようにします。例:
| lookup type, actor, raw, threatlevel as malicious_confidence from sumo://threat/cs on threat=src_ip | json field=raw "labels[*].name" as label_name | replace(label_name, "\\/","->") as label_name | replace(label_name, "\""," ") as label_name | where type="ip_address" and !isNull(malicious_confidence) | if (isEmpty(actor), "Unassigned", actor) as Actor | count as threat_count by src_ip, malicious_confidence, Actor, _source, label_name | sort by threat_count
src_ip は、FER の parse されたフィールドです (ステップ 1 を参照)。
Scheduled View
Threat Lookup operator と共に Scheduled View を使用して、脅威を見つけます。Scheduled View は、集計データを最小限まで削減し、データを生成するのに必要な未処理結果のみが含まれるようにします。クエリの実行前にデータが事前に集計されているため、Scheduled View に対して実行されるクエリは非常に迅速に検索結果を返すことができます。Scheduled View のクエリは毎分 1 回、継続的に実行されます。
- Scheduled View を作成します。たとえば、Cylance の場合、most_recent という Scheduled View を作成します。
例:
_sourceCategory=cylance | lookup type, actor, raw, threatlevel as malicious_confidence from sumo://threat/cs on threat=src_ip
| json field=raw "labels[*].name" as label_name
| replace(label_name, "\\/","->") as label_name
| replace(label_name, "\"","") as label_name
| where type="ip_address" and !isNull(malicious_confidence)
| if (isEmpty(actor), "Unassigned", actor) as Actor
| lookup latitude, longitude, country_code, country_name, region, city, postal_code, area_code, metro_code from geo://default on ip = src_ip
| count as threat_count by src_ip, malicious_confidence, Actor, _source, label_name, city, country_name, raw - これで、このビューの上部で Threat Intel クエリを実行できます。
_view=cylance_threat
| count by src_ip