Forfiles Command Execution
Detects the execution of "forfiles" with the "/c" flag. While this is an expected behavior of the tool, it can be abused in order to proxy execution through it with any binary. Can be used to bypass application…
Description
Detects the execution of "forfiles" with the "/c" flag. While this is an expected behavior of the tool, it can be abused in order to proxy execution through it with any binary. Can be used to bypass application whitelisting.
Detection logic
Detection requirements
- Platform
- ContainersESXiIaaSIdentity ProviderLinuxmacOSNetwork DevicesOffice SuiteSaaSWindows
The rule states no platform. This is derived from the ATT&CK technique it maps to.
- Log source product
- windows
- Log source category
- process_creation
Known benign triggers
- Legitimate use via a batch script or by an administrator.
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
References
| Reference | Cited by |
|---|---|
| lolbas-project.github.io/lolbas/Binaries/Forfiles/ | 2from 2 sources |
| pentestlab.blog/2020/07/06/indirect-command-execution/ | 3 |
From the source
- At source
- Open at source
- Upstream identifier
- 9aa5106d-bce3-4b13-86df-3a20f1d5cf0b
- Tagged by the source as
- attack.execution
Licence
- Published under
- Detection Rule License 1.1Read the licence
- Attribution
- Required
Authorship
- Written by
- Published
- Aug 26, 2026
- Version
- 1