← Back to SOC feed Coverage →

Suspicious File Write to Webapps Root Directory

sigma MEDIUM SigmaHQ
T1505.003T1190
imFileEvent
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at SigmaHQ →
Retrieved: 2026-03-25T03:05:59Z · Confidence: low

Hunt Hypothesis

Adversaries may be deploying web shells or other malicious payloads by writing files to the root directory of web applications, which is a common technique for establishing persistent access. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and mitigate potential web application compromises early.

Detection Rule

Sigma (Original)

title: Suspicious File Write to Webapps Root Directory
id: 89c42960-f244-4dad-9151-ae9b1a3287a2
status: experimental
description: |
    Detects suspicious file writes to the root directory of web applications, particularly Apache web servers or Tomcat servers.
    This may indicate an attempt to deploy malicious files such as web shells or other unauthorized scripts.
references:
    - https://labs.watchtowr.com/guess-who-would-be-stupid-enough-to-rob-the-same-vault-twice-pre-auth-rce-chains-in-commvault/
author: Swachchhanda Shrawan Poudel (Nextron Systems)
date: 2025-10-20
tags:
    - attack.persistence
    - attack.t1505.003
    - attack.initial-access
    - attack.t1190
logsource:
    product: windows
    category: file_event
detection:
    # Add more suspicious processes or paths or extensions as needed
    selection_susp_img:
        Image|endswith:
            - '\dotnet.exe'
            - '\w3wp.exe'
            - '\java.exe'
    selection_servers:
        TargetFilename|contains:
            - '\apache'
            - '\tomcat'
    selection_path:
        TargetFilename|contains: '\webapps\ROOT\'
    selection_susp_extensions:
        TargetFilename|endswith: '.jsp'
    condition: all of selection_*
falsepositives:
    - Unknown
level: medium

KQL (Azure Sentinel)

imFileEvent
| where (TargetFilePath endswith "\\dotnet.exe" or TargetFilePath endswith "\\w3wp.exe" or TargetFilePath endswith "\\java.exe") and (TargetFileName contains "\\apache" or TargetFileName contains "\\tomcat") and TargetFileName contains "\\webapps\\ROOT\\" and TargetFileName endswith ".jsp"

False Positive Guidance

MITRE ATT&CK Context

Original source: https://github.com/SigmaHQ/sigma/blob/master/rules/windows/file/file_event/file_event_win_susp_file_write_in_webapps_root.yml