Detection rules › YARA-L

YARA-L rules: 00

SharePoint CVE-2025-49706 Exploitation

#
Severity
high
Time window
5m
Match by
prnc_ip, trgt_ip
Author
Google Cloud Security
Source
github.com/chronicle/detection-rules

This rule detects attempts to exploit CVE-2025-49706 in SharePoint by observing POST requests to a vulnerable aspx path, which could result in code execution or server compromise.

Known 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.

MITRE ATT&CK Coverage

TacticTechniques
Lateral Movement

References

Rule Body

// Copyright 2025 Google LLC. Licensed under Apache-2.0.

rule ttp_sharepoint_cve_2025_49706_exploitation {

  meta:
    author = "Google Cloud Security"
    rule_name = "SharePoint CVE-2025-49706 Exploitation"
    description = "This rule detects attempts to exploit CVE-2025-49706 in SharePoint by observing POST requests to a vulnerable aspx path, which could result in code execution or server compromise."
    severity = "High"
    tactic = "TA0002"
    technique = "T1210"
    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."
    reference = "https://nvd.nist.gov/vuln/detail/CVE-2025-49706, https://research.eye.security/sharepoint-under-siege/"
    rule_id = "mr_661defd1-34e0-47ef-8073-a761244714e3"

 events:
    $e.network.http.method = "POST"
    $e.target.url = /_layouts\/1(5|6)\/ToolPane\.aspx/ nocase
    $e.target.url = /DisplayMode=Edit/ nocase
    $e.target.url = /a=\/ToolPane\.aspx/ nocase
    $e.network.http.referral_url = /^\S*\/_layouts\/1(5|6)\/signout\.aspx(\?.*)?$/ nocase
    $e.network.application_protocol = "HTTP" // Prefilter for HTTP protocol

    $prnc_ip = $e.principal.ip
    $trgt_ip = $e.target.ip

 match:
    $prnc_ip, $trgt_ip over 5m

 outcome:
    $risk_score = max(90)
    $vendor_name = array_distinct($e.metadata.vendor_name)
    $product_name = array_distinct($e.metadata.product_name)
    $result = "attempted"
    $result_time = max($e.metadata.event_timestamp.seconds)
    $target_url = array_distinct($e.target.url)
    $user_agent = array_distinct($e.network.http.user_agent)
    $referrer = array_distinct($e.network.http.referral_url)
    $principal_ip = array($prnc_ip)
    $target_ip = array($trgt_ip)
    $event_count = count($e.metadata.id)
    $target_application = array_distinct($e.target.application)

 condition:
    $e
}

YARA-L Rule Structure

Condition

Fires when at least one $e event in the 5m window.

Events

$e

  • network.http.method = "POST"
  • target.url matches "_layouts\/1(5|6)\/ToolPane\.aspx"
  • target.url matches "DisplayMode=Edit"
  • target.url matches "a=\/ToolPane\.aspx"
  • network.http.referral_url matches "^\S*\/_layouts\/1(5|6)\/signout\.aspx(\?.*)?$"
  • network.application_protocol = "HTTP"

Match and Correlation

Match key
$prnc_ip, $trgt_ip
Within
5m

Outcome

Outcome variables add context to a detection. When the rule generates an alert, $risk_score is displayed with it.

FieldExpression
risk_scoremax(90)
vendor_namearray_distinct($e.metadata.vendor_name)
product_namearray_distinct($e.metadata.product_name)
result_timemax($e.metadata.event_timestamp.seconds)
target_urlarray_distinct($e.target.url)
user_agentarray_distinct($e.network.http.user_agent)
referrerarray_distinct($e.network.http.referral_url)
principal_iparray($prnc_ip)
target_iparray($trgt_ip)
event_countcount($e.metadata.id)
target_applicationarray_distinct($e.target.application)

Successful SharePoint Webshell Creation CVE-2025-53770

#
Severity
critical
Time window
5m
Match by
hostname
Author
Google Cloud Security
Source
github.com/chronicle/detection-rules

Detects the creation of a file containing 'spinstall0' in specific SharePoint LAYOUTS directories. This activity is a strong indicator of successful post-exploitation of the SharePoint Server vulnerability CVE-2025-53770, where an attacker has likely placed a web shell for persistent access.

Known False Positives

  • Extremely Low, as the filename and location are highly specific to this exploit.

MITRE ATT&CK Coverage

References

Telemetry Coverage

ProviderRecord / event type
SysmonEvent ID 11: FileCreate

Rule Body

// Copyright 2025 Google LLC. Licensed under Apache-2.0.

rule ttp_windows_sharepoint_cve_2025_53770_webshell_succeeded {

   meta:
      author = "Google Cloud Security"
      rule_name = "Successful SharePoint Webshell Creation CVE-2025-53770"
      description = "Detects the creation of a file containing 'spinstall0' in specific SharePoint LAYOUTS directories. This activity is a strong indicator of successful post-exploitation of the SharePoint Server vulnerability CVE-2025-53770, where an attacker has likely placed a web shell for persistent access."
      severity = "Critical"
      tactic = "TA0003"
      technique = "T1505.003"
      false_positives = "Extremely Low, as the filename and location are highly specific to this exploit."
      reference = "https://msrc.microsoft.com/blog/2025/07/customer-guidance-for-sharepoint-vulnerability-cve-2025-53770/"
      rule_id = "mr_91fc647d-5d75-4e06-97a1-8326c9be4488"

   events:
      // Event must be a file creation on a Windows system
      (
         $e.metadata.event_type = "FILE_CREATION" or
         $e.metadata.event_type = "STATUS_UPDATE"
      )
      // The file path must be within the SharePoint 15 or 16 hive's LAYOUTS directory.
      $e.target.file.full_path = /[\x2F\x5C]+(?:Program\ Files|Progra~[1-9])[\x2F\x5C]+(?:Common\ Files|Common~[1-9])[\x2F\x5C]+(?:Microsoft\ Shared|Micros~[1-9])[\x2F\x5C]+(?:Web\ Server\ Extensions|WebSer~[1-9])[\x2F\x5C]+(15|16)[\x2F\x5C]+TEMPLATE[\x2F\x5C]+LAYOUTS[\x2F\x5C]+spinstall0\.aspx/ nocase
      $e.security_result.action = "ALLOW"
      // Capture hostname for match
      $hostname = strings.coalesce($e.principal.asset_id, $e.principal.asset.asset_id, $e.principal.hostname)

   match:
      $hostname over 5m

   outcome:
      $risk_score = max(95)
      $vendor_name = array_distinct($e.metadata.vendor_name)
      $product_name = array_distinct($e.metadata.product_name)
      $event_count = count_distinct($e.metadata.id)
      $victim_name = array_distinct($hostname)
      $victim_asset_id = array_distinct($e.principal.asset.asset_id)
      $victim_ip = array_distinct($e.principal.asset.ip)
      $result = "succeeded"
      $result_time = min($e.metadata.event_timestamp.seconds)
      $file_paths = array_distinct($e.target.file.full_path)

   condition:
      $e
}

YARA-L Rule Structure

Condition

Fires when at least one $e event in the 5m window.

Events

$e FILE_CREATION (11)

  • target.file.full_path matches "[\x2F\x5C]+(?:Program\ Files|Progra~[1-9])[\x2F\x5C]+(?:Common\ Files|Common~[1-9])[\x2F\x5C]+(?:Microsoft\ Shared|Micros~[1-9])[\x2F\x5C]+(?:Web\ Server\ Extensions|WebSer~[1-9])[\x2F\x5C]+(15|16)[\x2F\x5C]+TEMPLATE[\x2F\x5C]+LAYOUTS[\x2F\x5C]+spinstall0\.aspx"
  • security_result.action = "ALLOW"

Match and Correlation

Match key
$hostname
Within
5m

Outcome

Outcome variables add context to a detection. When the rule generates an alert, $risk_score is displayed with it.

FieldExpression
risk_scoremax(95)
vendor_namearray_distinct($e.metadata.vendor_name)
product_namearray_distinct($e.metadata.product_name)
event_countcount_distinct($e.metadata.id)
victim_namearray_distinct($hostname)
victim_asset_idarray_distinct($e.principal.asset.asset_id)
victim_iparray_distinct($e.principal.asset.ip)
result_timemin($e.metadata.event_timestamp.seconds)
file_pathsarray_distinct($e.target.file.full_path)

Back to all YARA-L rules