Sigma rule: File And SubFolder Enumeration Via Dir Command

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-d5064a440099, updated 2026-05-18T00:00:00.000Z.

Rule

Title
File And SubFolder Enumeration Via Dir Command
Status
test
Level
low
Author
frack113
Date
2021-12-13
Modified
2026-05-18
File
rules/windows/process_creation/proc_creation_win_cmd_dir_execution.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects usage of the "dir" command part of Windows CMD with the "/S" command line flag in order to enumerate files in a specified directory and all subdirectories.

Log source

product
windows
category
process_creation

Detection

selection_cmd:
    - Image|endswith: '\cmd.exe'
    - OriginalFileName: Cmd.Exe
selection_cli:
    CommandLine|contains|windash: '-s'
    CommandLine|contains: 'dir '
filter_main_rmdir:
    CommandLine|contains: 'rmdir'
condition: all of selection_* and not 1 of filter_main_*

False positives (as the rule lists them)

  • Likely

Tags

  • attack.discovery
  • attack.t1217

MITRE ATT&CK ids this rule names

References

Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_cmd_dir_execution.yml

Sources and licences

  • SigmaHQ

    "File And SubFolder Enumeration Via Dir Command" by frack113 (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_cmd_dir_execution.yml.
    Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License

    Detection Rule License (DRL) 1.1

Cite this page

Dragons Eye Ransomware Tracker, "Sigma rule: File And SubFolder Enumeration Via Dir Command",
entity page, dataset version ref-d5064a440099, updated 2026-05-18T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/7c9340a9-e2ee-4e43-94c5-c54ebbea1006 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 7c9340a9-e2ee-4e43-94c5-c54ebbea1006, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.

Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.