Skip to content

armgit / AiSOC

Public Imported from GitHub
0

Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.

6.2 KB
Raw Blame
id: chronicle-detection-rules-high-risk-user-download-executable-from-macro
name: high_risk_user_download_executable_from_macro
description: high_risk_user_download_executable_from_macro
severity: medium
enabled: false
tags:
  mitre: []
  categories:
  - endpoint
references: []
logsource:
  product: chronicle
detection:
  chronicle_yaral: "/*\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache\
    \ License, Version 2.0 (the \"License\");\n * you may not use this file except\
    \ in compliance with the License.\n * You may obtain a copy of the License at\n\
    \ *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required\
    \ by applicable law or agreed to in writing, software\n * distributed under the\
    \ License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS\
    \ OF ANY KIND, either express or implied.\n * See the License for the specific\
    \ language governing permissions and\n * limitations under the License.\n */\n\
    \nrule high_risk_user_download_executable_from_macro {\n\n  meta:\n    author\
    \ = \"Google Cloud Security\"\n    description = \"Executable downloaded by Microsoft\
    \ Excel by user with GCP entity relationship\"\n    rule_id = \"mr_352c77a7-67b6-4dfb-95e5-75fef8fa4a6c\"\
    \n    rule_name = \"High Risk User Download Executable From Macro\"\n    type\
    \ = \"alert\"\n    data_source = \"zscaler nss, crowdstrike\"\n    tags = \"user\
    \ entity, resource entity\"\n    severity = \"High\"\n    priority = \"High\"\n\
    \    platform = \"Windows\"\n    assumption = \"This rule assumes that GCP DLP\
    \ has been deployed and resources have been assigned to a user context\"\n   \
    \ tactic = \"TA0002\"\n    technique = \"T1204.002\"\n\n  events:\n    // proxy\
    \ event with suspected executable download\n    $proxy_event.metadata.event_type\
    \ = \"NETWORK_HTTP\"\n    $proxy_event.target.url =  /.*\\.exe$/ or\n    $proxy_event.network.received_bytes\
    \ > 102400\n    $proxy_event.principal.user.userid = $user\n    $proxy_event.principal.user.userid\
    \ != /test/\n    $proxy_event.target.hostname = $hostname\n\n    // correlate\
    \ with EDR event indicating Excel activity\n    $edr_event.target.user.userid\
    \  = $user\n    $edr_event.target.process.file.full_path = /excel/ nocase\n  \
    \  ($edr_event.metadata.event_type = \"NETWORK_HTTP\" or $edr_event.metadata.event_type\
    \ = \"NETWORK_CONNECTION\")\n    $edr_event.target.hostname = $hostname\n\n  \
    \  // first hop into entity graph to find the permissions\n    $user_entity.graph.entity.user.userid\
    \ = $user\n    $user_entity.graph.metadata.entity_type = \"USER\"\n    $user_entity.graph.metadata.source_type\
    \ = \"ENTITY_CONTEXT\"\n    $user_entity.graph.relations.entity.resource.name\
    \ != \"\"\n    $user_entity.graph.relations.entity.resource.name = $table_name\n\
    \n    // second hop for the table context\n    $table_context.graph.entity.resource.product_object_id\
    \ = $table_name\n    $table_context.graph.metadata.entity_type = \"RESOURCE\"\n\
    \    $table_context.graph.metadata.source_type = \"ENTITY_CONTEXT\"\n    $table_context.graph.metadata.product_name\
    \ = \"GCP DLP CONTEXT\"\n\n  match:\n    $user, $hostname over 5m\n\n  outcome:\n\
    \    $risk_score = max(if($table_context.graph.entity.resource.attribute.labels.value\
    \ = \"US_SOCIAL_SECURITY_NUMBER\", 80))\n    $entity_resource_name = array_distinct($table_context.graph.entity.resource.name)\n\
    \    // added to populate alert graph with additional context\n    $principal_hostname\
    \ = array_distinct($proxy_event.principal.hostname)\n    // Commented out target.hostname\
    \ because it is already represented in graph as match variable. If match changes,\
    \ can uncomment to add to results\n    //$target_hostname = array_distinct($proxy_event.target.hostname)\n\
    \    $principal_process_pid = array_distinct($edr_event.principal.process.pid)\n\
    \    $principal_process_command_line = array_distinct($edr_event.principal.process.command_line)\n\
    \    $principal_process_file_sha256 = array_distinct($edr_event.principal.process.file.sha256)\n\
    \    $principal_process_file_full_path = array_distinct($edr_event.principal.process.file.full_path)\n\
    \    $principal_process_product_specific_process_id = array_distinct($edr_event.principal.process.product_specific_process_id)\n\
    \    $principal_process_parent_process_product_specific_process_id = array_distinct($edr_event.principal.process.parent_process.product_specific_process_id)\n\
    \    $target_process_pid = array_distinct($edr_event.target.process.pid)\n   \
    \ $target_process_command_line = array_distinct($edr_event.target.process.command_line)\n\
    \    $target_process_file_sha256 = array_distinct($edr_event.target.process.file.sha256)\n\
    \    $target_process_file_full_path = array_distinct($edr_event.target.process.file.full_path)\n\
    \    $target_process_product_specific_process_id = array_distinct($edr_event.target.process.product_specific_process_id)\n\
    \    $target_process_parent_process_product_specific_process_id = array_distinct($edr_event.target.process.parent_process.product_specific_process_id)\n\
    \    // Commented out principal.user.userid because it is already represented\
    \ in graph as match variable. If match changes, can uncomment to add to results\n\
    \    //$principal_user_userid = array_distinct($edr_event.principal.user.userid)\n\
    \    $target_user_userid = array_distinct($edr_event.target.user.userid)\n   \
    \ $target_url = array_distinct($proxy_event.target.url)\n\n  condition:\n    $proxy_event\
    \ and $edr_event and $user_entity and $table_context\n}"
  chronicle_rule_name: high_risk_user_download_executable_from_macro
provenance:
  source: chronicle/detection-rules
  source_id: high_risk_user_download_executable_from_macro
  source_commit: 74dd490
  license: Apache-2.0
  license_url: https://github.com/chronicle/detection-rules/blob/main/LICENSE
  imported_at: '2026-05-04'
  imported_by: chronicle_importer
  upstream_path: rules/community/network/high_risk_user_download_executable_from_macro.yaral
notes:
  chronicle_meta: {}
  quarantine_reason: raw YARA-L — needs translation to AiSOC schema