{"id":"9aa5106d-bce3-4b13-86df-3a20f1d5cf0b","title":"Forfiles Command Execution","description":"Detects the execution of \"forfiles\" with the \"/c\" flag.\nWhile this is an expected behavior of the tool, it can be abused in order to proxy execution through it with any binary.\nCan be used to bypass application whitelisting.\n","author":"Tim Rauch, Elastic, E.M. Anhaus (originally from Atomic Blue Detections, Endgame), oscd.community","status":"test","level":"medium","date":"2022-06-14","modified":"2024-03-05","tags":["attack.execution","attack.t1059"],"technique_ids":["T1059"],"logsource":{"category":"process_creation","product":"windows"},"falsepositives":["Legitimate use via a batch script or by an administrator."],"references":["https://lolbas-project.github.io/lolbas/Binaries/Forfiles/","https://pentestlab.blog/2020/07/06/indirect-command-execution/"],"source_path":"rules/windows/process_creation/proc_creation_win_forfiles_proxy_execution_.yml","source_sha256":"fe645b85bc08723d05218837ea99683c49c8f0371e567fa617cbf4887e30d350","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/process_creation/proc_creation_win_forfiles_proxy_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: Forfiles Command Execution\nid: 9aa5106d-bce3-4b13-86df-3a20f1d5cf0b\nrelated:\n    - id: a85cf4e3-56ee-4e79-adeb-789f8fb209a8\n      type: obsolete\n    - id: fa47597e-90e9-41cd-ab72-c3b74cfb0d02\n      type: obsolete\nstatus: test\ndescription: |\n    Detects the execution of \"forfiles\" with the \"/c\" flag.\n    While this is an expected behavior of the tool, it can be abused in order to proxy execution through it with any binary.\n    Can be used to bypass application whitelisting.\nreferences:\n    - https://lolbas-project.github.io/lolbas/Binaries/Forfiles/\n    - https://pentestlab.blog/2020/07/06/indirect-command-execution/\nauthor: Tim Rauch, Elastic, E.M. Anhaus (originally from Atomic Blue Detections, Endgame), oscd.community\ndate: 2022-06-14\nmodified: 2024-03-05\ntags:\n    - attack.execution\n    - attack.t1059\nlogsource:\n    category: process_creation\n    product: windows\ndetection:\n    selection_img:\n        - Image|endswith: '\\forfiles.exe'\n        - OriginalFileName: 'forfiles.exe'\n    selection_cli:\n        CommandLine|contains|windash: ' -c '\n    condition: all of selection_*\nfalsepositives:\n    - Legitimate use via a batch script or by an administrator.\nlevel: medium\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1059","id":"T1059","name":"Command and Scripting Interpreter","page":"techniques/enterprise/T1059/"}],"data_path":"data/detection-rules/9aa5106d-bce3-4b13-86df-3a20f1d5cf0b.json","kind":"sigma"}
