Sigma Rule Library

Legitimate Application Writing Files In Uncommon Location

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.

View on GitHubOpen raw file

Detection logic

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

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\

filter_optional_dell_techhub_repair

Image|endswith: \esentutl.exe
TargetFilename|startswith:
  - C:\Windows\System32\SRUDB_
  - C:\Windows\System32\TEMPREPAIR
TargetFilename|endswith:
  - .INTEG.RAW
  - .EDB

filter_optional_dell_techhub_copy

Image|endswith: \esentutl.exe
TargetFilename|startswith: C:\ProgramData\Dell\DTP\DB\SRUDBData\

filter_optional_expand_system_dpx_scratch

Image|endswith: \expand.exe
User|contains:
  - AUTHORI
  - AUTORI
TargetFilename|startswith: C:\Windows\Temp\
TargetFilename|endswith: $dpx$.tmp

filter_optional_certutil_rootcas_sst

Image|endswith: \certutil.exe
User|contains:
  - AUTHORI
  - AUTORI
TargetFilename|startswith: C:\Windows\SystemTemp\
TargetFilename|endswith: \RootCAs.sst

Condition

all of selection_* and not 1 of filter_optional_*

Raw 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
modified: 2026-10-26
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\'
    filter_optional_dell_techhub_repair:
        # Dell TechHub runs "esentutl /p" on its SRUDB copy; the repair scratch files land in the working directory (System32)
        Image|endswith: '\esentutl.exe'
        TargetFilename|startswith:
            - 'C:\Windows\System32\SRUDB_'
            - 'C:\Windows\System32\TEMPREPAIR'
        TargetFilename|endswith:
            - '.INTEG.RAW'
            - '.EDB'
    filter_optional_dell_techhub_copy:
        Image|endswith: '\esentutl.exe'
        TargetFilename|startswith: 'C:\ProgramData\Dell\DTP\DB\SRUDBData\'
    filter_optional_expand_system_dpx_scratch:
        # expand.exe run as SYSTEM by services (e.g. the Waves MaxxAudio driver service unpacking MaxxAudio_Data.cab) writes its own "<hex>$dpx$.tmp" scratch files into the Windows Temp folder
        Image|endswith: '\expand.exe'
        User|contains: # covers many language settings
            - 'AUTHORI'
            - 'AUTORI'
        TargetFilename|startswith: 'C:\Windows\Temp\'
        TargetFilename|endswith: '$dpx$.tmp'
    filter_optional_certutil_rootcas_sst:
        # "certutil -generateSSTFromWU" run as SYSTEM (e.g. by EDR agents refreshing the trusted root list) writes RootCAs.sst into a SystemTemp subfolder
        Image|endswith: '\certutil.exe'
        User|contains: # covers many language settings
            - 'AUTHORI'
            - 'AUTORI'
        TargetFilename|startswith: 'C:\Windows\SystemTemp\'
        TargetFilename|endswith: '\RootCAs.sst'
    condition: all of selection_* and not 1 of filter_optional_*
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

False positives

  • Unknown

References

Similar rules