CmdID

CmdID / Rules / Windows

Creation Of a Suspicious ADS File Outside a Browser Download

A Sigma rule for alternate data streams being written on Windows, by frack113.

medium

What it looks for

its detection, as SigmaHQ writes it
detection:
  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_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|endswith:
      - '\msedge.exe'
      - '\msedgewebview2.exe'
    Image|startswith:
      - 'C:\Program Files (x86)\Microsoft\EdgeCore\'
      - 'C:\Program Files\Microsoft\EdgeCore\'
  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_opera:
    Image|endswith: '\opera.exe'
  filter_optional_safari:
    Image|endswith: '\safari.exe'
  filter_optional_seamonkey:
    Image|endswith: '\seamonkey.exe'
  filter_optional_snipping_tool:
    Image|endswith: '\SnippingTool\SnippingTool.exe'
    Image|startswith: 'C:\Program Files\WindowsApps\Microsoft.ScreenSketch_'
    TargetFilename|contains|all:
      - '\AppData\Local\Packages\Microsoft.ScreenSketch_'
      - '\TempState\Screenshot '
    TargetFilename|endswith: '.png:Zone.Identifier'
    TargetFilename|startswith: 'C:\Users\'
  filter_optional_vivaldi:
    Image|endswith: '\vivaldi.exe'
  filter_optional_whale:
    Image|endswith: '\whale.exe'
  selection:
    Contents|startswith: '[ZoneTransfer]  ZoneId=3'
    TargetFilename|contains:
      - '.exe'
      - '.scr'
      - '.bat'
      - '.cmd'
      - '.docx'
      - '.hta'
      - '.jse'
      - '.lnk'
      - '.pptx'
      - '.ps'
      - '.reg'
      - '.sct'
      - '.vb'
      - '.wsc'
      - '.wsf'
      - '.xlsx'
    TargetFilename|endswith: ':Zone.Identifier'
  condition: selection and not 1 of filter_optional_*

The rule’s detection, its selections and fields in order of name. The whole rule, with its references and false positives, is on SigmaHQ, by frack113, under the Detection Rule License 1.1. CmdID evaluates it on the file stream a command line writes - a redirection, a download, the destination of esentutl, expand, makecab, reg export or regedit - as Sysmon records it: a test on what a command line cannot show, such as the parent process or the user, is not met.

None of the everyday examples and documented commands on CmdID’s program pages trips it. To see whether a command line does, paste it into CmdID.