Detection rules › Sigma
Files With System DLL Name In Unsuspected Locations
Detects the creation of a file with the ".dll" extension that has the name of a System DLL in uncommon or unsuspected locations. (Outisde of "System32", "SysWOW64", etc.). It is highly recommended to perform an initial baseline before using this rule in production.
Known false positives
- Third party software might bundle specific versions of system DLLs.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Telemetry coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 11: FileCreate |
Rule body
title: Files With System DLL Name In Unsuspected Locations
id: 13c02350-4177-4e45-ac17-cf7ca628ff5e
status: test
description: |
Detects the creation of a file with the ".dll" extension that has the name of a System DLL in uncommon or unsuspected locations. (Outisde of "System32", "SysWOW64", etc.).
It is highly recommended to perform an initial baseline before using this rule in production.
references:
- Internal Research
author: Nasreddine Bencherchali (Nextron Systems)
date: 2024-06-24
tags:
- attack.stealth
- attack.t1036.005
logsource:
category: file_event
product: windows
detection:
selection:
TargetFilename|endswith:
# Note: Add more System DLL that can be abused for DLL sideloading to increase coverage
- '\secur32.dll'
- '\tdh.dll'
filter_main_generic:
# Note: It is recommended to use a more robust filter instead of this generic one, to avoid false negatives.
TargetFilename|contains:
# - '\SystemRoot\System32\'
- 'C:\$WINDOWS.~BT\'
- 'C:\$WinREAgent\'
- 'C:\Windows\SoftwareDistribution\'
- 'C:\Windows\System32\'
- 'C:\Windows\SysWOW64\'
- 'C:\Windows\WinSxS\'
- 'C:\Windows\uus\'
condition: selection and not 1 of filter_main_*
falsepositives:
- Third party software might bundle specific versions of system DLLs.
# Note: Upgrade to high after an initial baseline to your environement.
level: medium
regression_tests_path: regression_data/rules/windows/file/file_event/file_event_win_creation_system_dll_files/info.yml
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_*Stage 1: selection
selection:
TargetFilename|endswith:
- '\secur32.dll'
- '\tdh.dll'
Stage 2: not filter_main_generic
filter_main_generic:
TargetFilename|contains:
- 'C:\$WINDOWS.~BT\'
- 'C:\$WinREAgent\'
- 'C:\Windows\SoftwareDistribution\'
- 'C:\Windows\System32\'
- 'C:\Windows\SysWOW64\'
- 'C:\Windows\WinSxS\'
- 'C:\Windows\uus\'
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
TargetFilename | match | C:\$WINDOWS.~BT\ | excludes:TargetFilename field:"TargetFilename" value:"C:\$WINDOWS.~BT\" |
TargetFilename | match | C:\$WinREAgent\ | excludes:TargetFilename field:"TargetFilename" value:"C:\$WinREAgent\" |
TargetFilename | match | C:\Windows\SoftwareDistribution\ | excludes:TargetFilename field:"TargetFilename" value:"C:\Windows\SoftwareDistribution\" |
TargetFilename | match | C:\Windows\SysWOW64\ | excludes:TargetFilename field:"TargetFilename" value:"C:\Windows\SysWOW64\" |
TargetFilename | match | C:\Windows\System32\ | excludes:TargetFilename field:"TargetFilename" value:"C:\Windows\System32\" |
TargetFilename | match | C:\Windows\WinSxS\ | excludes:TargetFilename field:"TargetFilename" value:"C:\Windows\WinSxS\" |
TargetFilename | match | C:\Windows\uus\ | excludes:TargetFilename field:"TargetFilename" value:"C:\Windows\uus\" |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
TargetFilename | ends_with |
| field:"TargetFilename" kind:ends_with |