Sigma rule: Windows Shell/Scripting Application File Write to Suspicious Folder

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-4ec244f6d994, updated 2023-03-29T00:00:00.000Z.

Rule

Title
Windows Shell/Scripting Application File Write to Suspicious Folder
Status
test
Level
high
Author
Florian Roth (Nextron Systems)
Date
2021-11-20
Modified
2023-03-29
File
rules/windows/file/file_event/file_event_win_shell_write_susp_directory.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects Windows shells and scripting applications that write files to suspicious folders

Log source

product
windows
category
file_event

Detection

selection_1:
    Image|endswith:
        - '\bash.exe'
        - '\cmd.exe'
        - '\cscript.exe'
        - '\msbuild.exe'  # https://github.com/elastic/detection-rules/blob/c76a39796972ecde44cb1da6df47f1b6562c9770/rules/windows/defense_evasion_execution_msbuild_started_by_office_app.toml
        - '\powershell.exe'
        - '\pwsh.exe'
        - '\sh.exe'
        - '\wscript.exe'
    TargetFilename|startswith:
        - 'C:\PerfLogs\'
        - 'C:\Users\Public\'
selection_2:
    Image|endswith:
        - '\certutil.exe'
        - '\forfiles.exe'
        - '\mshta.exe'
        # - '\rundll32.exe' # Potential FP
        - '\schtasks.exe'
        - '\scriptrunner.exe'
        - '\wmic.exe'  # https://app.any.run/tasks/c903e9c8-0350-440c-8688-3881b556b8e0/
    TargetFilename|contains:
        - 'C:\PerfLogs\'
        - 'C:\Users\Public\'
        - 'C:\Windows\Temp\'
condition: 1 of selection_*

False positives (as the rule lists them)

  • Unknown

Tags

  • attack.execution
  • attack.t1059

MITRE ATT&CK ids this rule names

References

  • Internal Research

Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/file/file_event/file_event_win_shell_write_susp_directory.yml

Sources and licences

  • SigmaHQ

    "Windows Shell/Scripting Application File Write to Suspicious Folder" by Florian Roth (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/file/file_event/file_event_win_shell_write_susp_directory.yml.
    Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License

    Detection Rule License (DRL) 1.1

Cite this page

Dragons Eye Ransomware Tracker, "Sigma rule: Windows Shell/Scripting Application File Write to Suspicious Folder",
entity page, dataset version ref-4ec244f6d994, updated 2023-03-29T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/1277f594-a7d1-4f28-a2d3-73af5cbeab43 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 1277f594-a7d1-4f28-a2d3-73af5cbeab43, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.

Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.