Suspicious Execution of Forfiles Command (via process_creation)
This rule detects the execution of "forfiles" with the "/c" flag. While this is an expected behavior of the tool, it can be misused to proxy execution through it with any binary. Can be leveraged to bypass application whitelisting.
SigmamediumWindowsv1
sigma
suspicious-execution-of-forfiles-command-via-process-creation
title: Suspicious Execution of Forfiles Command (via process_creation)
id: c0c69b94-26f1-5519-a820-e6f3d9c2a7fd
status: stable
description: This rule detects the execution of "forfiles" with the "/c" flag. While this is an expected behavior of the tool, it can be misused to proxy execution through it with any binary. Can be leveraged to bypass application whitelisting.
references:
- https://attack.mitre.org/techniques/T1059/
- https://lolbas-project.github.io/lolbas/Binaries/Forfiles/
- https://pentestlab.blog/2020/07/06/indirect-command-execution/
author: Huntrule Team
date: 2026-06-24
tags:
- attack.execution
- attack.t1059
logsource:
category: process_creation
product: windows
detection:
selection_img:
- Image|endswith: '\forfiles.exe'
- OriginalFileName: 'forfiles.exe'
selection_cli:
CommandLine|contains|windash: ' -c '
condition: all of selection_*
falsepositives:
- Unknown
level: medium
Known false positives
- Unknown
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.