규칙에서 컨텍스트 보강 데이터 사용

조사 중 보안 분석가를 사용 설정하기 위해 Google Security Operations는 다양한 소스의 문맥 데이터를 수집하고 수집된 데이터를 분석하며 고객 환경의 아티팩트에 대한 추가 컨텍스트를 제공합니다. 이 문서에서는 분석가가 감지 엔진 규칙에서 컨텍스트 보강 데이터를 사용하는 방법을 보여주는 예시를 제공합니다.

데이터 보강에 대한 자세한 내용은 Google Security Operations에서 이벤트 및 항목 데이터를 보강하는 방법을 참조하세요.

규칙에서 발생률 보강 필드 사용

다음 예시에서는 Detection Engine에서 보급 관련 보강 필드를 사용하는 방법을 보여줍니다. 자세한 내용은 보급 관련 보강 필드 목록을 참조하세요.

보급률이 낮은 도메인 액세스 식별

이 감지 규칙은 일치 항목이 발견되면 감지 알림이 아닌 감지 이벤트를 생성합니다. 이는 주로 애셋을 조사할 때 보조 지표로 사용됩니다. 예를 들면 이슈를 트리거한 심각도가 높은 다른 알림이 있는 경우입니다.

$enrichment.graph.metadata.entity_type = "FILE"
$enrichment.graph.metadata.product_name = "VirusTotal Relationships"
$enrichment.graph.metadata.vendor_name = "VirusTotal"

필터를 추가하여 규칙 성능을 개선하는 방법에 대한 자세한 내용은 이벤트 유형 필터 추가를 참조하세요.

각 보강 유형에 대한 자세한 내용은 Google Security Operations가 이벤트 및 항목 데이터를 보강하는 방법을 참조하세요.

규칙에서 발생률 보강 필드 사용

다음 예시에서는 Detection Engine에서 보급 관련 보강 필드를 사용하는 방법을 보여줍니다. 자세한 내용은 보급 관련 보강 필드 목록을 참조하세요.

보급률 점수가 낮은 도메인에 대한 액세스 식별

이 규칙은 보급률 점수가 낮은 도메인에 대한 액세스를 감지하는 데 사용될 수 있습니다. 적용하려면 아티팩트의 보급률 점수 기준이 있어야 합니다. 다음 예시에서는 참조 목록을 사용하여 결과를 조정하고 임곗값 보급률 값을 적용합니다.

rule network_prevalence_low_prevalence_domain_access {
  meta:
    author = "Google Security Operations"
    description = "Detects access to a low prevalence domain. Requires baseline of prevalence be in place for effective deployment."
    severity = "LOW"

  events:
        $e.metadata.event_type = "NETWORK_HTTP"
        $e.principal.ip = $ip

        // filter out URLs with RFC 1918 IP addresses, i.e., internal assets
        not re.regex($e.target.hostname, `(127(?:\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$)|(10(?:\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$)|(192\.168(?:\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){2}$)|(172\.(?:1[6-9]|2\d|3[0-1])(?:\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){2})`)

        // used an explicit exclusion reference list
        not $e.target.hostname in %exclusion_network_prevalence_low_prevalence_domain_access

        // only match valid FQDN, filter out background non-routable noise
        re.regex($e.target.hostname, `(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]`)

        $domainName = $e.target.hostname

        //join event ($e) to entity graph ($d)
        $e.target.hostname = $d.graph.entity.domain.name

        $d.graph.metadata.entity_type = "DOMAIN_NAME"

        // tune prevalence as fits your results
        $d.graph.entity.domain.prevalence.rolling_max > 0
        $d.graph.entity.domain.prevalence.rolling_max <= 10

  match:
        $ip over 1h

  outcome:
    $risk_score = max(
        // increment risk score based upon rolling_max prevalence
        if ( $d.graph.entity.domain.prevalence.rolling_max >= 10, 10) +
        if ( $d.graph.entity.domain.prevalence.rolling_max >= 2 and $d.graph.entity.domain.prevalence.rolling_max <= 9 , 20) +
        if ( $d.graph.entity.domain.prevalence.rolling_max = 1, 30)
    )

    $domain_list = array_distinct($domainName)
    $domain_count = count_distinct($domainName)

  condition:
    $e and #d > 10
}

IOC 일치율로 발생률이 낮은 도메인 식별

이 감지 규칙은 감지 알림을 생성하며 알려진 IOC라고도 하는 보급률이 낮은 도메인을 비교하는 높은 일치도를 제공합니다.

rule network_prevalence_uncommon_domain_ioc_match {

  meta:
    author = "Google Security Operations"
    description = "Lookup Network DNS queries against Entity Graph for low prevalence domains with a matching IOC entry."
    severity = "MEDIUM"

  events:
    $e.metadata.event_type = "NETWORK_DNS"
    $e.network.dns.questions.name = $hostname

    //only match FQDNs, e.g., exclude chrome dns access tests and other internal hosts
    $e.network.dns.questions.name = /(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/

    //prevalence entity graph lookup
    $p.graph.metadata.entity_type = "DOMAIN_NAME"
    $p.graph.entity.domain.prevalence.rolling_max > 0
    $p.graph.entity.domain.prevalence.rolling_max <= 3
    $p.graph.entity.domain.name = $hostname

    //ioc entity graph lookup
    $i.graph.metadata.vendor_name = "ET_PRO_IOC"
    $i.graph.metadata.entity_type = "DOMAIN_NAME"
    $i.graph.entity.hostname = $hostname

  match:
    $hostname over 10m

  outcome:
    $risk_score = max(
        //increment risk score based upon rolling_max prevalence
        if ( $p.graph.entity.domain.prevalence.rolling_max = 3, 50) +
        if ( $p.graph.entity.domain.prevalence.rolling_max = 2, 70) +
        if ( $p.graph.entity.domain.prevalence.rolling_max = 1, 90)
    )

  condition:
    $e and $p and $i
}

규칙에서 항목의 첫 번째 발생 시간 사용

항목 레코드에서 first_seen_time 또는 last_seen_time 필드를 포함하는 규칙을 작성할 수 있습니다.

first_seen_timelast_seen_time 필드는 도메인, IP 주소, 파일(해시)을 설명하는 항목으로 채워집니다. 사용자 또는 애셋을 설명하는 항목의 경우 first_seen_time 필드만 채워집니다. 이러한 값은 그룹 또는 리소스와 같은 다른 유형을 설명하는 항목의 경우 계산되지 않습니다.

채워진 UDM 필드 목록은 항목의 최초 발생 시간 및 마지막 확인 시간 계산을 참조하세요.

다음은 규칙에서 first_seen_time을 사용하는 방법을 보여주는 예시입니다.

rule first_seen_data_exfil {
    meta:
        author = "Google Security Operations"
        description = "Example usage first_seen data"
        severity = "LOW"

    events:
        $first_access.metadata.event_type = "NETWORK_HTTP"
        $ip = $first_access.principal.ip

        // Join first_access event with entity graph to use first/last seen data.
        $ip = $first_last_seen.graph.entity.ip
        $first_last_seen.graph.metadata.entity_type = "IP_ADDRESS"

        // Check that the first_access UDM event is the first_seen occurrence in the enterprise.
        $first_last_seen.graph.entity.artifact.first_seen_time.seconds = $first_access.metadata.event_timestamp.seconds
        $first_last_seen.graph.entity.artifact.first_seen_time.nanos   = $first_access.metadata.event_timestamp.nanos

        // Check for another access event that appears shortly after the first_seen event,
        // where lots of data is being sent.
        $next_access_data_exfil.metadata.event_type = "NETWORK_CONNECTION"
        // Next access event goes to the same IP as the first.
        $next_access_data_exfil.principal.ip = $ip

        // Next access occurs within 60 seconds after first access.
        $next_access_data_exfil.metadata.event_timestamp.seconds > $first_access.metadata.event_timestamp.seconds
        60 > $next_access_data_exfil.metadata.event_timestamp.seconds  - $first_access.metadata.event_timestamp.seconds

        // Lots of data is being sent over the next access event.
        $next_access_data_exfil.network.sent_bytes > 10 * 1024 * 1024 * 1024 // 10GB

        // Extract hostname of next access event, for match section.
        $hostname = $next_access_data_exfil.principal.hostname

    match:
        $hostname over 1h

    condition:
        $first_access and $next_access_data_exfil and $first_last_seen
}

규칙에서 위치정보가 보강된 필드 사용

위치정보가 보강된 데이터를 저장하는 UDM 필드를 감지 엔진 규칙에 사용할 수 있습니다. 채워지는 UDM 필드 목록은 위치정보 데이터로 이벤트 보강을 참조하세요.

다음 예시는 사용자 항목이 여러 개별 상태에서 인증하는지 여부를 감지하는 방법을 보여줍니다.

rule geoip_user_login_multiple_states_within_1d {

  meta:
    author = "Google Security Operations"
    description = "Detect multiple authentication attempts from multiple distinct locations using geolocation-enriched UDM fields."
    severity = "INFORMATIONAL"

  events:
    $geoip.metadata.event_type = "USER_LOGIN"
    (
      $geoip.metadata.vendor_name = "Google Workspace" or
      $geoip.metadata.vendor_name = "Google Cloud Platform"
    )
    /* optionally, detect distinct locations at a country */
    (
      $geoip.principal.ip_geo_artifact.location.country_or_region != "" and
      $geoip.principal.ip_geo_artifact.location.country_or_region = $country
    )
    (
      $geoip.principal.ip_geo_artifact.location.state != "" and
      $geoip.principal.ip_geo_artifact.location.state = $state
    )

    $geoip.target.user.email_addresses = $user

  match:
    $user over 1d

  condition:
    $geoip and #state > 1
}

규칙에서 세이프 브라우징 보강 필드 사용

Google Security Operations는 파일 해시와 관련된 위협 목록에서 데이터를 수집합니다. 이 보강 정보는 Google Security Operations에서 항목으로 저장됩니다.

채워지는 UDM 필드 목록은 세이프 브라우징 위협 목록의 정보로 항목 보강을 참조하세요.

감지 엔진 규칙을 만들어 세이프 브라우징에서 수집된 항목에 대한 일치 항목을 식별할 수 있습니다. 다음은 이 보강된 정보를 대상으로 쿼리하여 컨텍스트 인식 분석을 빌드하는 Detection Engine 규칙의 예시입니다.

rule safe_browsing_file_execution {
    meta:
        author = "Google Security Operations"
        description = "Example usage of Safe Browsing data, to detect execution of a file that's been deemed malicious"
        severity = "LOW"

    events:
        // find a process launch event, match on hostname
        $execution.metadata.event_type = "PROCESS_LAUNCH"
        $execution.principal.hostname = $hostname

        // join execution event with Safe Browsing graph
        $sb.graph.entity.file.sha256 = $execution.target.process.file.sha256

        // look for files deemed malicious
        $sb.graph.metadata.entity_type = "FILE"
        $sb.graph.metadata.threat.severity = "CRITICAL"
        $sb.graph.metadata.product_name = "Google Safe Browsing"
        $sb.graph.metadata.source_type = "GLOBAL_CONTEXT"

    match:
        $hostname over 1h

    condition:
        $execution and $sb
}

규칙에서 WHOIS 보강 필드 사용

도메인을 나타내는 항목에서 WHOIS 보강 필드를 검색하는 규칙을 작성할 수 있습니다. 이러한 항목에는 entity.metadata.entity_type 필드가 DOMAIN_NAME으로 설정되어 있습니다. 채워진 UDM 필드 목록은 WHOIS 데이터로 항목 보강을 참조하세요.

다음은 이를 수행하는 방법을 보여주는 예시 규칙입니다. 이 규칙에는 events 섹션에 규칙의 성능을 최적화하도록 돕는 다음 필터 필드가 포함됩니다.

$whois.graph.metadata.entity_type = "DOMAIN_NAME"
$whois.graph.metadata.product_name = "WHOISXMLAPI Simple Whois"
$whois.graph.metadata.vendor_name = "WHOIS"
rule whois_expired_domain_executable_download {
 meta:
   author = "Google Security Operations"
   description = "Example usage of WHOIS data, detecting an executable file download from a domain that's recently expired"
   severity = "LOW"

 events:
        $access.metadata.event_type = "NETWORK_HTTP"
        $hostname = $access.principal.hostname

        // join access event to entity graph to use WHOIS data
        $whois.graph.entity.domain.name = $access.target.hostname

        // use WHOIS data to look for expired domains
        $whois.graph.metadata.entity_type = "DOMAIN_NAME"
        $whois.graph.metadata.product_name = "WHOISXMLAPI Simple Whois"
        $whois.graph.metadata.vendor_name = "WHOIS"
        $whois.graph.entity.domain.expiration_time.seconds < $access.metadata.event_timestamp.seconds

        // join access event with executable file creation event by principal hostname
        $creation.principal.hostname = $access.principal.hostname
        $creation.metadata.event_type = "FILE_CREATION"
        $creation.target.file.full_path = /exe/ nocase

        // file creation comes after expired domain access
        $creation.metadata.event_timestamp.seconds >
           $access.metadata.event_timestamp.seconds

   match:
       $hostname over 1h

 condition:
        $access and $whois and $creation
}

Google Cloud 위협 인텔리전스 데이터 쿼리

Google Security Operations는 해당 환경에서 활동을 조사할 때 사용할 수 있는 컨텍스트 정보를 제공하는 Google Cloud 위협 인텔리전스(GCTI) 데이터 소스에서 데이터를 수집합니다. 다음 데이터 소스를 쿼리할 수 있습니다.

  • GCTI Tor 종료 노드
  • GCTI 양성 바이너리
  • GCTI 원격 액세스 도구

이러한 위협 피드 및 채워진 모든 필드에 대한 설명은 Google Cloud 위협 인텔리전스 데이터 수집 및 저장을 참조하세요.

이 문서에서 자리표시자 <variable_name>은 규칙에서 UDM 레코드를 식별하는 데 사용되는 고유한 변수 이름을 나타냅니다.

Tor 종료 노드 IP 주소 쿼리

다음 예시 규칙은 NETWORK_CONNECTION 이벤트에 GCTI Tor Exit Nodes 데이터 소스에도 있는 target.ip 필드에 저장된 IP 주소가 포함된 경우 감지를 반환합니다. 규칙에 <variable_name>.graph.metadata.threat.threat_feed_name, <variable_name>.graph.metadata.vendor_name, <variable_name>.graph.metadata.product_name 필드를 반드시 포함하세요.

다음은 시간이 지정된 데이터 소스입니다. 이벤트는 해당 시점의 데이터 소스 스냅샷과 일치합니다.

rule gcti_tor_exit_nodes {
  meta:
    author = "Google Cloud Threat Intelligence"
    description = "Alert on known Tor exit nodes."
    severity = "High"

  events:
    // Event
    $e.metadata.event_type = "NETWORK_CONNECTION"
    $e.target.ip = $tor_ip

    // Tor IP search in GCTI Feed
    $tor.graph.entity.artifact.ip = $tor_ip
    $tor.graph.metadata.entity_type = "IP_ADDRESS"
    $tor.graph.metadata.threat.threat_feed_name = "Tor Exit Nodes"
    $tor.graph.metadata.source_type = "GLOBAL_CONTEXT"
    $tor.graph.metadata.vendor_name = "Google Cloud Threat Intelligence"
    $tor.graph.metadata.product_name = "GCTI Feed"

  match:
    $tor_ip over 1h

  outcome:
    $tor_ips = array_distinct($tor_ip)
    $tor_geoip_country = array_distinct($e.target.ip_geo_artifact.location.country_or_region)
    $tor_geoip_state = array_distinct($e.target.ip_geo_artifact.location.state)

  condition:
    $e and $tor
}

무해한 운영체제 파일 쿼리

다음 예시 규칙은 Benign BinariesTor Exit Nodes 데이터 소스를 결합하여 무해한 바이너리가 Tor 종료 노드에 연결될 때 알림을 반환합니다. 이 규칙은 Google Security Operations에서 대상 IP 주소를 통해 보강한 위치정보 데이터를 사용하여 위험 점수를 계산합니다. 규칙에 Benign BinariesTor Exit Nodes 데이터 소스 모두에 <variable_name>.graph.metadata.vendor_name, <variable_name>.graph.metadata.product_name, <variable_name>.graph.metadata.threat.threat_feed_name가 포함되어야 합니다.

이 소스는 시간이 없는 데이터 소스입니다. 이벤트는 시간에 관계없이 항상 데이터 소스의 최신 스냅샷과 일치합니다.

rule gcti_benign_binaries_contacts_tor_exit_node {
 meta:
   author = "Google Cloud Threat Intelligence"
   description = "Alert on Benign Binary contacting a Tor IP address."
   severity = "High"

 events:
   // Event
   $e.metadata.event_type = "NETWORK_CONNECTION"
   $e.principal.process.file.sha256 = $benign_hash
   $e.target.ip = $ip
   $e.principal.hostname = $hostname

   // Benign File search in GCTI Feed
   $benign.graph.entity.file.sha256 = $benign_hash
   $benign.graph.metadata.entity_type = "FILE"
   $benign.graph.metadata.threat.threat_feed_name = "Benign Binaries"
   $benign.graph.metadata.source_type = "GLOBAL_CONTEXT"
   $benign.graph.metadata.vendor_name = "Google Cloud Threat Intelligence"
   $benign.graph.metadata.product_name = "GCTI Feed"

   // Tor IP search in GCTI Feed
   $tor.graph.entity.artifact.ip = $ip
   $tor.graph.metadata.entity_type = "IP_ADDRESS"
   $tor.graph.metadata.threat.threat_feed_name = "Tor Exit Nodes"
   $tor.graph.metadata.source_type = "GLOBAL_CONTEXT"
   $tor.graph.metadata.vendor_name = "Google Cloud Threat Intelligence"
   $tor.graph.metadata.product_name = "GCTI Feed"

 match:
   $hostname over 1h

 outcome:
   $risk_score = max(
       if($tor.graph.metadata.threat.confidence = "HIGH_CONFIDENCE", 70) +
       // Unauthorized target geographies
       if($e.target.ip_geo_artifact.location.country_or_region = "Cuba", 20) +
       if($e.target.ip_geo_artifact.location.country_or_region = "Iran", 20) +
       if($e.target.ip_geo_artifact.location.country_or_region = "North Korea", 20) +
       if($e.target.ip_geo_artifact.location.country_or_region = "Russia", 20) +
       if($e.target.ip_geo_artifact.location.country_or_region = "Syria", 20)
   )
   $benign_hashes = array_distinct($benign_hash)
   $benign_files = array_distinct($e.principal.process.file.full_path)
   $tor_ips = array_distinct($ip)
   $tor_geoip_country = array_distinct($e.target.ip_geo_artifact.location.country_or_region)
   $tor_geoip_state = array_distinct($e.target.ip_geo_artifact.location.state)

 condition:
   $e and $benign and $tor
}

원격 액세스 도구에 대한 데이터 쿼리

다음 예시 규칙은 PROCESS_LAUNCH 이벤트 유형에 Google Cloud Threat Intelligence 원격 액세스 도구 데이터 소스에도 있는 해시가 포함된 경우 감지를 반환합니다.

이 소스는 시간이 없는 데이터 소스입니다. 이벤트는 시간에 관계없이 항상 데이터 소스의 최신 스냅샷과 일치합니다.

rule gcti_remote_access_tools {
 meta:
   author = "Google Cloud Threat Intelligence"
   description = "Alert on Remote Access Tools."
   severity = "High"

 events:
    // find a process launch event
    $e.metadata.event_type = "PROCESS_LAUNCH"
    $e.target.process.file.sha256 != ""
    $rat_hash = $e.target.process.file.sha256

    // join graph and event hashes
    $gcti.graph.entity.file.sha256 = $rat_hash

    // look for files identified as likely remote access tools
    $gcti.graph.metadata.entity_type = "FILE"
    $gcti.graph.metadata.vendor_name = "Google Cloud Threat Intelligence"
    $gcti.graph.metadata.product_name = "GCTI Feed"
    $gcti.graph.metadata.threat.threat_feed_name = "Remote Access Tools"

  match:
    $rat_hash over 5m

 outcome:
   $remote_hash = array_distinct($e.target.process.file.sha256)

  condition:
    $e and $gcti

}

규칙에서 VirusTotal 보강 메타데이터 필드 사용

다음 규칙은 특정 파일 유형의 파일 생성 또는 프로세스 실행을 감지함으로써 관심 목록에 추가된 일부 해시가 시스템에 있음을 나타냅니다. 위험 점수는 VirusTotal 파일 메타데이터 보강을 사용하여 파일에 exploit 태그가 지정될 때 설정됩니다.

채워지는 모든 UDM 필드 목록은 VirusTotal 파일 메타데이터로 이벤트 보강을 참조하세요.

rule vt_filemetadata_hash_match_ioc {
 meta:
   author = "Google Cloud Threat Intelligence"
   description = "Detect file/process events that indicate watchlisted hashes are on a system"
   severity = "High"

 events:
   // Process launch or file creation events
   $process.metadata.event_type = "PROCESS_LAUNCH" or $process.metadata.event_type ="FILE_CREATION"
   $process.principal.hostname = $hostname
   $process.target.file.sha256 != ""
   $process.target.file.sha256 = $sha256
   $process.target.file.file_type = "FILE_TYPE_DOCX"

   // IOC matching
   $ioc.graph.metadata.product_name = "MISP"
   $ioc.graph.metadata.entity_type = "FILE"
   $ioc.graph.metadata.source_type = "ENTITY_CONTEXT"
   $ioc.graph.entity.file.sha256 = $sha256

 match:
   $hostname over 15m

 outcome:
   $risk_score = max(
       // Tag enrichment from VirusTotal file metadata
       if($process.target.file.tags = "exploit", 90)
   )
   $file_sha256 = array($process.target.file.sha256)
   $host = array($process.principal.hostname)

 condition:
   $process and $ioc
}

규칙에서 VirusTotal 관계 데이터 사용

Google Security Operations에서는 VirusTotal 관련 연결에서 데이터를 수집합니다. 이 데이터는 파일 해시와 파일, 도메인, IP 주소, URL 간의 관계에 대한 정보를 제공합니다. 이 보강 정보는 Google Security Operations에 항목으로 저장됩니다.

감지 엔진 규칙을 만들어 VirusTotal에서 수집된 항목과 일치하는 항목을 식별할 수 있습니다. 다음 규칙은 VirusTotal 관계를 통해 알려진 IP 주소로부터 알려진 파일 해시를 다운로드하는 경우 알림을 전송합니다. 위험 점수는 VirusTotal 파일 메타데이터의 파일 형식과 태그를 기반으로 합니다.

이 데이터는 특정 VirusTotal 및 Google Security Operations 라이선스에서만 사용할 수 있습니다. 계정 관리자에게 사용 권한을 확인합니다. 채워진 모든 UDM 필드 목록은 VirusTotal 관계 데이터로 항목 보강을 참조하세요.

rule virustotal_file_downloaded_from_url {
  meta:
    author = "Google Cloud Threat Intelligence"
    description = "Alerts on downloading a known file hash from a known IP with VirusTotal relationships. The risk score is based on file type and tags from VirusTotal file metadata."
    severity = "High"

  events:
    // Filter network HTTP events
    $e1.metadata.event_type = "NETWORK_HTTP"
    $e1.principal.user.userid = $userid
    $e1.target.url = $url

    // Filter file creation events
    $e2.metadata.event_type = "FILE_CREATION"
    $e2.target.user.userid = $userid
    $e2.target.file.sha256 = $file_hash

    // The file creation event timestamp should be equal or greater than the network http event timestamp
    $e1.metadata.event_timestamp.seconds <= $e2.metadata.event_timestamp.seconds

    // Join event file hash with VirusTotal relationships entity graph
    $vt.graph.metadata.entity_type = "FILE"
    $vt.graph.metadata.source_type = "GLOBAL_CONTEXT"
    $vt.graph.metadata.vendor_name = "VirusTotal"
    $vt.graph.metadata.product_name = "VirusTotal Relationships"
    $vt.graph.entity.file.sha256 = $file_hash

    // Join network HTTP target URL with VirusTotal relationships entity graph
    $vt.graph.relations.entity_type = "URL"
    $vt.graph.relations.relationship = "DOWNLOADED_FROM"
    $vt.graph.relations.entity.url = $url

  match:
    $userid over 1m

  outcome:
      $risk_score = max(
        // Tag enrichment from VirusTotal file metadata
        if($e2.target.file.tags = "via-tor" or $e2.target.file.tags = "malware" or $e2.target.file.tags = "crypto", 50) +
        // File types enrichment from VirusTotal file metadata
        if($e2.target.file.file_type = "FILE_TYPE_HTML", 5) +
        if($e2.target.file.file_type = "FILE_TYPE_ELF", 10) +
        if($e2.target.file.file_type = "FILE_TYPE_PE_DLL",15) +
        if($e2.target.file.file_type = "FILE_TYPE_PE_EXE", 20)
    )

  condition:
    $e1 and $e2 and $vt and $risk_score >= 50
}

다음 단계

다른 Google Security Operations 기능과 함께 보강된 데이터를 사용하는 방법은 다음을 참조하세요.