CmdID

CmdID / Rules / Windows

Change Default File Association Via Assoc

A Sigma rule for process creation on Windows, by Timur Zinniatullin, oscd.community.

low 1 ATT&CK technique 1 program it names 9 everyday examples trip it

What it looks for

its detection, as SigmaHQ writes it
detection:
  selection_cli:
    CommandLine|contains: 'assoc'
  selection_img:
    - Image|endswith: '\cmd.exe'
    - OriginalFileName: 'Cmd.Exe'
  condition: all of selection_*

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 Timur Zinniatullin, oscd.community, under the Detection Rule License 1.1. CmdID evaluates it on a command line alone: a test on what a command line cannot show, such as the parent process or the user, is not met.

Command lines that trip it

everyday examples from tldr-pages, CC BY 4.0, each read by CmdID

To view the current file type association for the file name extension .txt, type on the page for assoc

assoc .txtIdentify

To remove the file type association for the file name extension .bak, type on the page for assoc

assoc .bak=Identify

To remove the file type association for the file name extension .jar, type on the page for assoc

assoc .jar=Identify

To view the output of assoc one screen at a time, type on the page for assoc

assoc | moreIdentify

To send the output of assoc to the file assoc.txt, type on the page for assoc

assoc>assoc.txtIdentify

Associate .log to text files on the page for assoc

assoc .log=txtfileIdentify

Associate files with no extension to text files on the page for assoc

assoc .=txtfileIdentify

List all associations between file extensions and file types on the page for assoc

Set the associated file type for a specific extension on the page for assoc

assoc .txt=txtfileIdentify

Programs and files it names

their pages here

ATT&CK

the techniques it is tagged with
T1546.001Event Triggered Execution: Change Default File Association