Detection rules › Sigma

Legitimate Application Writing Files In Uncommon Location

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

Detects legitimate applications writing any type of file to uncommon or suspicious locations that are not typical for application data storage or execution. Adversaries may leverage legitimate applications (Living off the Land Binaries - LOLBins) to drop or download malicious files to uncommon locations on the system to evade detection by security solutions.

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 11FileCreate

Rule body yaml

title: Legitimate Application Writing Files In Uncommon Location
id: 1cf465a1-2609-4c15-9b66-c32dbe4bfd67
related:
    - id: 2ddef153-167b-4e89-86b6-757a9e65dcac # bitsadmin dedicated rule
      type: similar
status: experimental
description: |
    Detects legitimate applications writing any type of file to uncommon or suspicious locations that are not typical for application data storage or execution.
    Adversaries may leverage legitimate applications (Living off the Land Binaries - LOLBins) to drop or download malicious files to uncommon locations on the system to evade detection by security solutions.
references:
    - https://lolbas-project.github.io/#/download
author: Swachchhanda Shrawan Poudel (Nextron Systems)
date: 2025-12-10
tags:
    - attack.stealth
    - attack.t1218
    - attack.command-and-control
    - attack.t1105
logsource:
    product: windows
    category: file_event
detection:
    selection_img:
        Image|endswith:
            # Microsoft Office Programs Dropping Executables / Rest of the apps are covered in: c7a74c80-ba5a-486e-9974-ab9e682bc5e4
            - '\eqnedt32.exe'
            - '\wordpad.exe'
            - '\wordview.exe'
            # LOLBINs that can be used to download executables
            - '\cmdl32.exe'
            - '\certutil.exe'
            - '\certoc.exe'
            - '\CertReq.exe'
            - '\bitsadmin.exe'
            - '\Desktopimgdownldr.exe'
            - '\esentutl.exe'
            - '\expand.exe'
            - '\extrac32.exe'
            - '\replace.exe'
            - '\mshta.exe'
            - '\ftp.exe'
            - '\Ldifde.exe'
            - '\RdrCEF.exe'
            - '\hh.exe'
            - '\finger.exe'
            - '\findstr.exe'
    selection_locations:
        TargetFilename|contains:
            - ':\Perflogs'
            - ':\ProgramData\'
            - ':\Temp\'
            - ':\Users\Public\'
            - ':\Windows\'
            - '\$Recycle.Bin\'
            - '\AppData\Local\'
            - '\AppData\Roaming\'
            - '\Contacts\'
            - '\Desktop\'
            - '\Favorites\'
            - '\Favourites\'
            - '\inetpub\wwwroot\'
            - '\Music\'
            - '\Pictures\'
            - '\Start Menu\Programs\Startup\'
            - '\Users\Default\'
            - '\Videos\'
    condition: all of selection_*
falsepositives:
    - Unknown
level: high
regression_tests_path: regression_data/rules/windows/file/file_event/file_event_win_susp_legitimate_app_dropping_in_uncommon_location/info.yml

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_img

selection_img:
    Image|endswith:
        - '\eqnedt32.exe'
        - '\wordpad.exe'
        - '\wordview.exe'
        - '\cmdl32.exe'
        - '\certutil.exe'
        - '\certoc.exe'
        - '\CertReq.exe'
        - '\bitsadmin.exe'
        - '\Desktopimgdownldr.exe'
        - '\esentutl.exe'
        - '\expand.exe'
        - '\extrac32.exe'
        - '\replace.exe'
        - '\mshta.exe'
        - '\ftp.exe'
        - '\Ldifde.exe'
        - '\RdrCEF.exe'
        - '\hh.exe'
        - '\finger.exe'
        - '\findstr.exe'

Stage 2: selection_locations

selection_locations:
    TargetFilename|contains:
        - ':\Perflogs'
        - ':\ProgramData\'
        - ':\Temp\'
        - ':\Users\Public\'
        - ':\Windows\'
        - '\$Recycle.Bin\'
        - '\AppData\Local\'
        - '\AppData\Roaming\'
        - '\Contacts\'
        - '\Desktop\'
        - '\Favorites\'
        - '\Favourites\'
        - '\inetpub\wwwroot\'
        - '\Music\'
        - '\Pictures\'
        - '\Start Menu\Programs\Startup\'
        - '\Users\Default\'
        - '\Videos\'

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
  • \CertReq.exe corpus 7 (sigma 7)
  • \Desktopimgdownldr.exe corpus 5 (sigma 5)
  • \Ldifde.exe corpus 4 (sigma 4)
  • \RdrCEF.exe corpus 4 (sigma 4)
  • \bitsadmin.exe corpus 29 (sigma 29)
  • \certoc.exe corpus 10 (sigma 10)
  • \certutil.exe corpus 43 (sigma 43)
  • \cmdl32.exe corpus 2 (sigma 2)
  • \eqnedt32.exe corpus 6 (sigma 6)
  • \esentutl.exe corpus 8 (sigma 8)
  • \expand.exe corpus 3 (sigma 3)
  • \extrac32.exe corpus 2 (sigma 2)
  • \findstr.exe corpus 12 (sigma 12)
  • \finger.exe corpus 8 (sigma 8)
  • \ftp.exe corpus 2 (sigma 2)
  • \hh.exe corpus 16 (sigma 16)
  • \mshta.exe corpus 67 (sigma 67)
  • \replace.exe corpus 2 (sigma 2)
  • \wordpad.exe corpus 5 (sigma 5)
  • \wordview.exe corpus 6 (sigma 6)
TargetFilenamematch
  • :\Perflogs
  • :\ProgramData\ corpus 4 (sigma 4)
  • :\Temp\ corpus 5 (sigma 5)
  • :\Users\Public\ corpus 2 (sigma 2)
  • :\Windows\
  • \$Recycle.Bin\
  • \AppData\Local\ corpus 2 (sigma 2)
  • \AppData\Roaming\ corpus 2 (sigma 2)
  • \Contacts\
  • \Desktop\ corpus 3 (sigma 3)
  • \Favorites\
  • \Favourites\
  • \Music\
  • \Pictures\
  • \Start Menu\Programs\Startup\ corpus 5 (sigma 5)
  • \Users\Default\
  • \Videos\
  • \inetpub\wwwroot\ corpus 2 (sigma 2)