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.

4.5 KB
Raw Blame
id: chronicle-detection-rules-ttp-windows-w3wp-launching-encoded-powershell
name: ttp_windows_w3wp_launching_encoded_powershell
description: ttp_windows_w3wp_launching_encoded_powershell
severity: medium
enabled: false
tags:
  mitre: []
  categories:
  - endpoint
references: []
logsource:
  product: chronicle
detection:
  chronicle_yaral: "/*\n * Copyright 2025 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 ttp_windows_w3wp_launching_encoded_powershell {\n\n  meta:\n    author\
    \ = \"Google Cloud Security\"\n    rule_name = \"W3WP Launching Encoded Powershell\"\
    \n    description = \"Detects on the execution of an encoded powershell command\
    \ with a parent process of w3wp.exe.\"\n    severity = \"Medium\"\n    tactic\
    \ = \"TA0002\"\n    technique = \"T1059.001\"\n    false_positives = \"Legitimate\
    \ administrative actions to the specified URL should be rare. Some penetration\
    \ testing activity could trigger this rule. In some cases, specific third party\
    \ applications could generate similar requests, but this should be rare.\"\n \
    \   reference = \"https://nvd.nist.gov/vuln/detail/CVE-2025-49706, https://research.eye.security/sharepoint-under-siege/\"\
    \n    rule_id = \"mr_83daf64e-25e8-4b6b-8596-3adcc694e781\"\n\n  events:\n   \
    \ $e.metadata.event_type = \"PROCESS_LAUNCH\"\n    re.regex($e.principal.process.file.full_path,\
    \ `(^|\\\\)w3wp\\.exe$`) nocase\n    not re.regex($e.target.process.command_line,\
    \ `\\\\Scripts\\\\CheckDiskSpace\\.ps1'`) nocase\n    not re.regex($e.target.process.command_line,\
    \ `DQAKACQARQByAHIAbwByAEEAYwB0AGkAbwBuAFAAcgBlAGYAZQByAGUAbgBjAGUAIAA9ACAAJwBTAHQAbwBwACcADQAKAFsAdgBlAHIAcwBpAG8AbgBdACQAbQBpAG4AaQBtAHUAbQBWAGUAcgBzAGkAbwBuACAAPQAgACcAMgAuADIALgAwACcADQAKAA0ACgAkAG0AIAA9ACAASQBtAHAAbwByAHQALQBNAG8AZAB1AGwAZQAgAEEAegAuAEEAYwBjAG8AdQBuAHQAcwAg`)\
    \ nocase\n    not re.regex($e.target.process.command_line, `EncodedCommand JABQAG8AaQBuAHQAZQBlAFIAZQBzAG8AdQByAGMAZQBOAGEAbQBlACAAPQAgACcAVgBEAFAAUgB`)\
    \ nocase\n    (\n      (\n        re.regex($e.target.process.file.full_path, `(^|\\\
    \\)(pwsh|powershell)\\.exe$`) nocase and\n        re.regex($e.target.process.command_line,\
    \ `\\s-(e|en|enc|enco|encodedcommand)\\s`) nocase\n      ) or\n      re.regex($e.target.process.command_line,\
    \ `(pwsh|powershell).*\\s-(e|en|enc|enco|encodedcommand)\\s`) nocase\n    )\n\n\
    \  outcome:\n    $principal_hostname = $e.principal.hostname\n    $risk_score\
    \ = 65\n    $vendor_name = array($e.metadata.vendor_name)\n    $product_name =\
    \ $e.metadata.product_name\n    $victim_uid = $e.principal.asset.asset_id\n  \
    \  $victim_name = $e.principal.asset.hostname\n    $victim_netid = array($e.principal.ip)\n\
    \    $adversary_uid = $e.principal.user.userid\n    $adversary_name = $e.principal.user.user_display_name\n\
    \    $adversary_netid = $e.principal.user.windows_sid\n    $tmp1 = max(\n    \
    \    if($e.security_result.action != \"BLOCK\" and $e.security_result.action !=\
    \ \"UNKNOWN_ACTION\", 2)\n    )\n    $tmp2 = max(\n        if($e.security_result.action\
    \ = \"BLOCK\", 1)\n    )\n    $result = arrays.index_to_str(strings.split(\"attempted,failed,succeeded,succeeded\"\
    ), $tmp1 + $tmp2)\n    $result_time = $e.metadata.event_timestamp.seconds\n  \
    \  $event_count = 1\n\n  condition:\n    $e\n}"
  chronicle_rule_name: ttp_windows_w3wp_launching_encoded_powershell
provenance:
  source: chronicle/detection-rules
  source_id: ttp_windows_w3wp_launching_encoded_powershell
  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/microsoft/sharepoint/ttp_windows_w3wp_launching_encoded_powershell.yaral
notes:
  chronicle_meta: {}
  quarantine_reason: raw YARA-L — needs translation to AiSOC schema