Detection rules › Sigma

Suspicious File Creation In Uncommon AppData Folder

Status
test
Severity
high
Log source
product windows, category file_event
Author
Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects the creation of suspicious files and folders inside the user's AppData folder but not inside any of the common and well known directories (Local, Romaing, LocalLow). This method could be used as a method to bypass detection who exclude the AppData folder in fear of FPs

MITRE ATT&CK coverage

TacticTechniques
ExecutionNo specific technique
StealthNo specific technique

Event coverage

ProviderEventTitle
SysmonEvent ID 11FileCreate

Rule body yaml

title: Suspicious File Creation In Uncommon AppData Folder
id: d7b50671-d1ad-4871-aa60-5aa5b331fe04
status: test
description: Detects the creation of suspicious files and folders inside the user's AppData folder but not inside any of the common and well known directories (Local, Romaing, LocalLow). This method could be used as a method to bypass detection who exclude the AppData folder in fear of FPs
references:
    - Internal Research
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-08-05
modified: 2023-02-23
tags:
    - attack.execution
    - attack.stealth
logsource:
    product: windows
    category: file_event
detection:
    selection:
        TargetFilename|startswith: 'C:\Users\'
        TargetFilename|contains: '\AppData\'
        TargetFilename|endswith:
            # Add more as needed
            - '.bat'
            - '.cmd'
            - '.cpl'
            - '.dll'
            - '.exe'
            - '.hta'
            - '.iso'
            - '.lnk'
            - '.msi'
            - '.ps1'
            - '.psm1'
            - '.scr'
            - '.vbe'
            - '.vbs'
    filter_main:
        TargetFilename|startswith: 'C:\Users\'
        TargetFilename|contains:
            - '\AppData\Local\'
            - '\AppData\LocalLow\'
            - '\AppData\Roaming\'
    condition: selection and not filter_main
falsepositives:
    - Unlikely
level: high

Stages and Predicates

Stage 0: condition

selection and not filter_main

Stage 1: selection

selection:
    TargetFilename|startswith: 'C:\Users\'
    TargetFilename|contains: '\AppData\'
    TargetFilename|endswith:
        - '.bat'
        - '.cmd'
        - '.cpl'
        - '.dll'
        - '.exe'
        - '.hta'
        - '.iso'
        - '.lnk'
        - '.msi'
        - '.ps1'
        - '.psm1'
        - '.scr'
        - '.vbe'
        - '.vbs'

Stage 2: not filter_main

filter_main:
    TargetFilename|startswith: 'C:\Users\'
    TargetFilename|contains:
        - '\AppData\Local\'
        - '\AppData\LocalLow\'
        - '\AppData\Roaming\'

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
TargetFilenamematch\AppData\LocalLow\
TargetFilenamematch\AppData\Local\
TargetFilenamematch\AppData\Roaming\
TargetFilenamestarts_withC:\Users\

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
TargetFilenameends_with
  • .bat corpus 17 (sigma 17)
  • .cmd corpus 8 (sigma 8)
  • .cpl corpus 2 (sigma 2)
  • .dll corpus 23 (sigma 23)
  • .exe corpus 21 (sigma 20, splunk 1)
  • .hta corpus 13 (sigma 13)
  • .iso corpus 5 (sigma 5)
  • .lnk corpus 6 (sigma 6)
  • .msi corpus 2 (sigma 2)
  • .ps1 corpus 17 (sigma 17)
  • .psm1 corpus 4 (sigma 4)
  • .scr corpus 8 (sigma 8)
  • .vbe corpus 15 (sigma 15)
  • .vbs corpus 18 (sigma 18)
TargetFilenamematch
  • \AppData\ corpus 4 (sigma 4)
TargetFilenamestarts_with
  • C:\Users\ corpus 11 (sigma 9, elastic 2)