Detection rules › Sigma

Creation Of a Suspicious ADS File Outside a Browser Download

Status
test
Severity
medium
Log source
product windows, category create_stream_hash
Author
frack113
Source
github.com/SigmaHQ/sigma

Detects the creation of a suspicious ADS (Alternate Data Stream) file by software other than browsers

MITRE ATT&CK coverage

TacticTechniques
StealthNo specific technique

Event coverage

ProviderEventTitle
SysmonEvent ID 15FileCreateStreamHash

Rule body yaml

title: Creation Of a Suspicious ADS File Outside a Browser Download
id: 573df571-a223-43bc-846e-3f98da481eca
status: test
description: Detects the creation of a suspicious ADS (Alternate Data Stream) file by software other than browsers
references:
    - https://www.bleepingcomputer.com/news/security/exploited-windows-zero-day-lets-javascript-files-bypass-security-warnings/
author: frack113
date: 2022-10-22
modified: 2023-06-12
tags:
    - attack.stealth
logsource:
    product: windows
    category: create_stream_hash
detection:
    selection:
        Contents|startswith: '[ZoneTransfer]  ZoneId=3'
        TargetFilename|endswith: ':Zone.Identifier'
        TargetFilename|contains:
            - '.exe'
            - '.scr'
            - '.bat'
            - '.cmd'
            - '.docx'
            - '.hta'
            - '.jse'
            - '.lnk'
            - '.pptx'
            - '.ps'
            - '.reg'
            - '.sct'
            - '.vb'
            - '.wsc'
            - '.wsf'
            - '.xlsx'
    filter_optional_brave:
        Image|endswith: '\brave.exe'
    filter_optional_chrome:
        Image:
            - 'C:\Program Files\Google\Chrome\Application\chrome.exe'
            - 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'
    filter_optional_firefox:
        Image:
            - 'C:\Program Files\Mozilla Firefox\firefox.exe'
            - 'C:\Program Files (x86)\Mozilla Firefox\firefox.exe'
    filter_optional_ie:
        Image:
            - 'C:\Program Files (x86)\Internet Explorer\iexplore.exe'
            - 'C:\Program Files\Internet Explorer\iexplore.exe'
    filter_optional_maxthon:
        Image|endswith: '\maxthon.exe'
    filter_optional_edge_1:
        - Image|startswith: 'C:\Program Files (x86)\Microsoft\EdgeWebView\Application\'
        - Image|endswith: '\WindowsApps\MicrosoftEdge.exe'
        - Image:
              - 'C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe'
              - 'C:\Program Files\Microsoft\Edge\Application\msedge.exe'
    filter_optional_edge_2:
        Image|startswith:
            - 'C:\Program Files (x86)\Microsoft\EdgeCore\'
            - 'C:\Program Files\Microsoft\EdgeCore\'
        Image|endswith:
            - '\msedge.exe'
            - '\msedgewebview2.exe'
    filter_optional_opera:
        Image|endswith: '\opera.exe'
    filter_optional_safari:
        Image|endswith: '\safari.exe'
    filter_optional_seamonkey:
        Image|endswith: '\seamonkey.exe'
    filter_optional_vivaldi:
        Image|endswith: '\vivaldi.exe'
    filter_optional_whale:
        Image|endswith: '\whale.exe'
    filter_optional_snipping_tool:
        Image|startswith: 'C:\Program Files\WindowsApps\Microsoft.ScreenSketch_'
        Image|endswith: '\SnippingTool\SnippingTool.exe'
        TargetFilename|startswith: 'C:\Users\'
        TargetFilename|contains|all:
            - '\AppData\Local\Packages\Microsoft.ScreenSketch_'
            - '\TempState\Screenshot '
        TargetFilename|endswith: '.png:Zone.Identifier'
    condition: selection and not 1 of filter_optional_*
falsepositives:
    - Other legitimate browsers not currently included in the filter (please add them)
    - Legitimate downloads via scripting or command-line tools (Investigate to determine if it's legitimate)
level: medium

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_optional_*

Stage 1: selection

selection:
    Contents|startswith: '[ZoneTransfer]  ZoneId=3'
    TargetFilename|endswith: ':Zone.Identifier'
    TargetFilename|contains:
        - '.exe'
        - '.scr'
        - '.bat'
        - '.cmd'
        - '.docx'
        - '.hta'
        - '.jse'
        - '.lnk'
        - '.pptx'
        - '.ps'
        - '.reg'
        - '.sct'
        - '.vb'
        - '.wsc'
        - '.wsf'
        - '.xlsx'

Stage 2: not filter_optional_*

filter_optional_brave:
    Image|endswith: '\brave.exe'
filter_optional_chrome:
    Image:
        - 'C:\Program Files\Google\Chrome\Application\chrome.exe'
        - 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'
filter_optional_firefox:
    Image:
        - 'C:\Program Files\Mozilla Firefox\firefox.exe'
        - 'C:\Program Files (x86)\Mozilla Firefox\firefox.exe'
filter_optional_ie:
    Image:
        - 'C:\Program Files (x86)\Internet Explorer\iexplore.exe'
        - 'C:\Program Files\Internet Explorer\iexplore.exe'
filter_optional_maxthon:
    Image|endswith: '\maxthon.exe'
filter_optional_edge_1:
    - Image|startswith: 'C:\Program Files (x86)\Microsoft\EdgeWebView\Application\'
    - Image|endswith: '\WindowsApps\MicrosoftEdge.exe'
    - Image:
          - 'C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe'
          - 'C:\Program Files\Microsoft\Edge\Application\msedge.exe'
filter_optional_edge_2:
    Image|startswith:
        - 'C:\Program Files (x86)\Microsoft\EdgeCore\'
        - 'C:\Program Files\Microsoft\EdgeCore\'
    Image|endswith:
        - '\msedge.exe'
        - '\msedgewebview2.exe'
filter_optional_opera:
    Image|endswith: '\opera.exe'
filter_optional_safari:
    Image|endswith: '\safari.exe'
filter_optional_seamonkey:
    Image|endswith: '\seamonkey.exe'
filter_optional_vivaldi:
    Image|endswith: '\vivaldi.exe'
filter_optional_whale:
    Image|endswith: '\whale.exe'
filter_optional_snipping_tool:
    Image|startswith: 'C:\Program Files\WindowsApps\Microsoft.ScreenSketch_'
    Image|endswith: '\SnippingTool\SnippingTool.exe'
    TargetFilename|startswith: 'C:\Users\'
    TargetFilename|contains|all:
        - '\AppData\Local\Packages\Microsoft.ScreenSketch_'
        - '\TempState\Screenshot '
    TargetFilename|endswith: '.png:Zone.Identifier'

Exclusions

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

FieldKindExcluded values
Imageends_with\msedge.exe
Imageends_with\msedgewebview2.exe
Imagestarts_withC:\Program Files (x86)\Microsoft\EdgeCore\
Imagestarts_withC:\Program Files\Microsoft\EdgeCore\
Imageends_with\SnippingTool\SnippingTool.exe
Imagestarts_withC:\Program Files\WindowsApps\Microsoft.ScreenSketch_
TargetFilenameends_with.png:Zone.Identifier
TargetFilenamematch\AppData\Local\Packages\Microsoft.ScreenSketch_
TargetFilenamematch\TempState\Screenshot
TargetFilenamestarts_withC:\Users\
Imageends_with\WindowsApps\MicrosoftEdge.exe
Imageends_with\brave.exe
Imageends_with\maxthon.exe
Imageends_with\opera.exe
Imageends_with\safari.exe
Imageends_with\seamonkey.exe
Imageends_with\vivaldi.exe
Imageends_with\whale.exe
ImageeqC:\Program Files (x86)\Google\Chrome\Application\chrome.exe
ImageeqC:\Program Files (x86)\Internet Explorer\iexplore.exe
ImageeqC:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
ImageeqC:\Program Files (x86)\Mozilla Firefox\firefox.exe
ImageeqC:\Program Files\Google\Chrome\Application\chrome.exe
ImageeqC:\Program Files\Internet Explorer\iexplore.exe
ImageeqC:\Program Files\Microsoft\Edge\Application\msedge.exe
ImageeqC:\Program Files\Mozilla Firefox\firefox.exe
Imagestarts_withC:\Program Files (x86)\Microsoft\EdgeWebView\Application\

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
Contentsstarts_with
  • [ZoneTransfer] ZoneId=3 corpus 2 (sigma 2)
TargetFilenameends_with
  • :Zone.Identifier corpus 6 (sigma 4, splunk 2)
TargetFilenamematch
  • .bat
  • .cmd
  • .docx
  • .exe corpus 2 (sigma 2)
  • .hta
  • .jse
  • .lnk
  • .pptx
  • .ps
  • .reg
  • .scr
  • .sct
  • .vb
  • .wsc
  • .wsf
  • .xlsx