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.
Sigma rule (View on GitHub)
1title: Legitimate Application Writing Files In Uncommon Location
2id: 1cf465a1-2609-4c15-9b66-c32dbe4bfd67
3related:
4 - id: 2ddef153-167b-4e89-86b6-757a9e65dcac # bitsadmin dedicated rule
5 type: similar
6status: experimental
7description: |
8 Detects legitimate applications writing any type of file to uncommon or suspicious locations that are not typical for application data storage or execution.
9 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.
10references:
11 - https://lolbas-project.github.io/#/download
12author: Swachchhanda Shrawan Poudel (Nextron Systems)
13date: 2025-12-10
14modified: 2026-10-26
15tags:
16 - attack.stealth
17 - attack.t1218
18 - attack.command-and-control
19 - attack.t1105
20logsource:
21 product: windows
22 category: file_event
23detection:
24 selection_img:
25 Image|endswith:
26 # Microsoft Office Programs Dropping Executables / Rest of the apps are covered in: c7a74c80-ba5a-486e-9974-ab9e682bc5e4
27 - '\eqnedt32.exe'
28 - '\wordpad.exe'
29 - '\wordview.exe'
30 # LOLBINs that can be used to download executables
31 - '\cmdl32.exe'
32 - '\certutil.exe'
33 - '\certoc.exe'
34 - '\CertReq.exe'
35 - '\bitsadmin.exe'
36 - '\Desktopimgdownldr.exe'
37 - '\esentutl.exe'
38 - '\expand.exe'
39 - '\extrac32.exe'
40 - '\replace.exe'
41 - '\mshta.exe'
42 - '\ftp.exe'
43 - '\Ldifde.exe'
44 - '\RdrCEF.exe'
45 - '\hh.exe'
46 - '\finger.exe'
47 - '\findstr.exe'
48 selection_locations:
49 TargetFilename|contains:
50 - ':\Perflogs'
51 - ':\ProgramData\'
52 - ':\Temp\'
53 - ':\Users\Public\'
54 - ':\Windows\'
55 - '\$Recycle.Bin\'
56 - '\AppData\Local\'
57 - '\AppData\Roaming\'
58 - '\Contacts\'
59 - '\Desktop\'
60 - '\Favorites\'
61 - '\Favourites\'
62 - '\inetpub\wwwroot\'
63 - '\Music\'
64 - '\Pictures\'
65 - '\Start Menu\Programs\Startup\'
66 - '\Users\Default\'
67 - '\Videos\'
68 filter_optional_dell_techhub_repair:
69 # Dell TechHub runs "esentutl /p" on its SRUDB copy; the repair scratch files land in the working directory (System32)
70 Image|endswith: '\esentutl.exe'
71 TargetFilename|startswith:
72 - 'C:\Windows\System32\SRUDB_'
73 - 'C:\Windows\System32\TEMPREPAIR'
74 TargetFilename|endswith:
75 - '.INTEG.RAW'
76 - '.EDB'
77 filter_optional_dell_techhub_copy:
78 Image|endswith: '\esentutl.exe'
79 TargetFilename|startswith: 'C:\ProgramData\Dell\DTP\DB\SRUDBData\'
80 filter_optional_expand_system_dpx_scratch:
81 # 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
82 Image|endswith: '\expand.exe'
83 User|contains: # covers many language settings
84 - 'AUTHORI'
85 - 'AUTORI'
86 TargetFilename|startswith: 'C:\Windows\Temp\'
87 TargetFilename|endswith: '$dpx$.tmp'
88 filter_optional_certutil_rootcas_sst:
89 # "certutil -generateSSTFromWU" run as SYSTEM (e.g. by EDR agents refreshing the trusted root list) writes RootCAs.sst into a SystemTemp subfolder
90 Image|endswith: '\certutil.exe'
91 User|contains: # covers many language settings
92 - 'AUTHORI'
93 - 'AUTORI'
94 TargetFilename|startswith: 'C:\Windows\SystemTemp\'
95 TargetFilename|endswith: '\RootCAs.sst'
96 condition: all of selection_* and not 1 of filter_optional_*
97falsepositives:
98 - Unknown
99level: high
100regression_tests_path: regression_data/rules/windows/file/file_event/file_event_win_susp_legitimate_app_dropping_in_uncommon_location/info.yml
References
Related rules
- Remote File Download Via Findstr.EXE
- Curl Download And Execute Combination
- File Download Via Windows Defender MpCmpRun.EXE
- Hidden Flag Set On File/Directory Via Chflags - MacOS
- Import LDAP Data Interchange Format File Via Ldifde.EXE