Detection rules › Sigma

Suspicious File Write to SharePoint Layouts Directory

Status
experimental
Severity
high
Log source
product windows, category file_event
Author
Swachchhanda Shrawan Poudel (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects suspicious file writes to SharePoint layouts directory which could indicate webshell activity or post-exploitation. This behavior has been observed in the exploitation of SharePoint vulnerabilities such as CVE-2025-49704, CVE-2025-49706 or CVE-2025-53770.

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 11FileCreate

Rule body yaml

title: Suspicious File Write to SharePoint Layouts Directory
id: 1f0489be-b496-4ddf-b3a9-5900f2044e9c
status: experimental
description: |
    Detects suspicious file writes to SharePoint layouts directory which could indicate webshell activity or post-exploitation.
    This behavior has been observed in the exploitation of SharePoint vulnerabilities such as CVE-2025-49704, CVE-2025-49706 or CVE-2025-53770.
references:
    - https://unit42.paloaltonetworks.com/microsoft-sharepoint-cve-2025-49704-cve-2025-49706-cve-2025-53770/
    - https://www.microsoft.com/en-us/security/blog/2025/07/22/disrupting-active-exploitation-of-on-premises-sharepoint-vulnerabilities/
author: Swachchhanda Shrawan Poudel (Nextron Systems)
date: 2025-07-24
tags:
    - attack.initial-access
    - attack.t1190
    - attack.persistence
    - attack.t1505.003
logsource:
    product: windows
    category: file_event
detection:
    selection:
        Image|endswith:
            - '\cmd.exe'
            - '\powershell_ise.exe'
            - '\powershell.exe'
            - '\pwsh.exe'
            - '\w3wp.exe'
        TargetFilename|startswith:
            - 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\'
            - 'C:\Program Files (x86)\Common Files\Microsoft Shared\Web Server Extensions\'
        TargetFilename|contains:
            - '\15\TEMPLATE\LAYOUTS\'
            - '\16\TEMPLATE\LAYOUTS\'
        TargetFilename|endswith:
            - '.asax'
            - '.ascx'
            - '.ashx'
            - '.asmx'
            - '.asp'
            - '.aspx'
            - '.bat'
            - '.cmd'
            - '.cer'
            - '.config'
            - '.hta'
            - '.js'
            - '.jsp'
            - '.jspx'
            - '.php'
            - '.ps1'
            - '.vbs'
    condition: selection
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    Image|endswith:
        - '\cmd.exe'
        - '\powershell_ise.exe'
        - '\powershell.exe'
        - '\pwsh.exe'
        - '\w3wp.exe'
    TargetFilename|startswith:
        - 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\'
        - 'C:\Program Files (x86)\Common Files\Microsoft Shared\Web Server Extensions\'
    TargetFilename|contains:
        - '\15\TEMPLATE\LAYOUTS\'
        - '\16\TEMPLATE\LAYOUTS\'
    TargetFilename|endswith:
        - '.asax'
        - '.ascx'
        - '.ashx'
        - '.asmx'
        - '.asp'
        - '.aspx'
        - '.bat'
        - '.cmd'
        - '.cer'
        - '.config'
        - '.hta'
        - '.js'
        - '.jsp'
        - '.jspx'
        - '.php'
        - '.ps1'
        - '.vbs'

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
Imageends_with
  • \cmd.exe corpus 130 (sigma 130)
  • \powershell.exe corpus 182 (sigma 182)
  • \powershell_ise.exe corpus 41 (sigma 41)
  • \pwsh.exe corpus 168 (sigma 168)
  • \w3wp.exe corpus 6 (sigma 6)
TargetFilenameends_with
  • .asax
  • .ascx
  • .ashx corpus 3 (sigma 3)
  • .asmx
  • .asp corpus 4 (sigma 4)
  • .aspx corpus 5 (sigma 5)
  • .bat corpus 17 (sigma 17)
  • .cer corpus 2 (sigma 2)
  • .cmd corpus 8 (sigma 8)
  • .config
  • .hta corpus 13 (sigma 13)
  • .js corpus 9 (sigma 9)
  • .jsp corpus 5 (sigma 4, splunk 1)
  • .jspx
  • .php
  • .ps1 corpus 17 (sigma 17)
  • .vbs corpus 18 (sigma 18)
TargetFilenamematch
  • \15\TEMPLATE\LAYOUTS\ corpus 2 (sigma 2)
  • \16\TEMPLATE\LAYOUTS\ corpus 2 (sigma 2)
TargetFilenamestarts_with
  • C:\Program Files (x86)\Common Files\Microsoft Shared\Web Server Extensions\ corpus 2 (sigma 2)
  • C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\ corpus 2 (sigma 2)