{"id":"7c9340a9-e2ee-4e43-94c5-c54ebbea1006","title":"File And SubFolder Enumeration Via Dir Command","description":"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.\n","author":"frack113","status":"test","level":"low","date":"2021-12-13","modified":"2026-05-18","tags":["attack.discovery","attack.t1217"],"technique_ids":["T1217"],"logsource":{"category":"process_creation","product":"windows"},"falsepositives":["Likely"],"references":["https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1217/T1217.md"],"source_path":"rules/windows/process_creation/proc_creation_win_cmd_dir_execution.yml","source_sha256":"e792c662640131dd811070535000c40fdf14503b001314f6b34ee6e2705e72c0","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/process_creation/proc_creation_win_cmd_dir_execution.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: File And SubFolder Enumeration Via Dir Command\nid: 7c9340a9-e2ee-4e43-94c5-c54ebbea1006\nstatus: test\ndescription: |\n    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.\nreferences:\n    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1217/T1217.md\nauthor: frack113\ndate: 2021-12-13\nmodified: 2026-05-18\ntags:\n    - attack.discovery\n    - attack.t1217\nlogsource:\n    category: process_creation\n    product: windows\ndetection:\n    selection_cmd:\n        - Image|endswith: '\\cmd.exe'\n        - OriginalFileName: Cmd.Exe\n    selection_cli:\n        CommandLine|contains|windash: '-s'\n        CommandLine|contains: 'dir '\n    filter_main_rmdir:\n        CommandLine|contains: 'rmdir'\n    condition: all of selection_* and not 1 of filter_main_*\nfalsepositives:\n    - Likely\nlevel: low\nregression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_cmd_dir_execution/info.yml\nsimulation:\n    - type: atomic-red-team\n      name: List Internet Explorer Bookmarks using the command prompt\n      technique: T1217\n      atomic_guid: 727dbcdb-e495-4ab1-a6c4-80c7f77aef85\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1217","id":"T1217","name":"Browser Information Discovery","page":"techniques/enterprise/T1217/"}],"data_path":"data/detection-rules/7c9340a9-e2ee-4e43-94c5-c54ebbea1006.json","kind":"sigma"}
