Detectionmediumtest

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 whitelisting.

Convert In Phoenix Studio

Open this Sigma rule in the converter with the YAML preloaded and ready for backend selection.

Launch
Tim Rauch, Elastic Security, E.M. Anhaus (originally from Atomic Blue Detections, Endgame), oscd.communityCreated Tue Jun 14Updated Tue Mar 059aa5106d-bce3-4b13-86df-3a20f1d5cf0bwindows
Log Source
WindowsProcess Creation
ProductWindows← raw: windows
CategoryProcess Creation← raw: process_creation

Events generated when a new process is spawned on the system. Covers command-line arguments, parent/child relationships, and process metadata.

Detection Logic
Detection Logic2 selectors
detection:
    selection_img:
        - Image|endswith: '\forfiles.exe'
        - OriginalFileName: 'forfiles.exe'
    selection_cli:
        CommandLine|contains|windash: ' -c '
    condition: all of selection_*
False Positives

Legitimate use via a batch script or by an administrator.

Related Rules
Similar

a85cf4e3-56ee-4e79-adeb-789f8fb209a8

Rule not found
Similar

fa47597e-90e9-41cd-ab72-c3b74cfb0d02

Rule not found
Rule Metadata
Rule ID
9aa5106d-bce3-4b13-86df-3a20f1d5cf0b
Status
test
Level
medium
Type
Detection
Created
Tue Jun 14
Modified
Tue Mar 05
Path
rules/windows/process_creation/proc_creation_win_forfiles_proxy_execution_.yml
Raw Tags
attack.executionattack.t1059
View on GitHub