heroui logo

Windows Indirect Command Execution Via forfiles

Splunk Security Content

View Source
Summary
The detection rule titled "Windows Indirect Command Execution Via forfiles" aims to identify potentially malicious use of the forfiles.exe command on Windows systems. Forfiles.exe is a command-line utility that allows users to apply a specified command to a group of files. Its legitimate use is prevalent in batch scripts; however, attackers can exploit this command to bypass command line execution protections and execute arbitrary commands. The rule employs data from Endpoint Detection and Response (EDR) solutions, specifically monitoring for processes initiated by forfiles.exe that have the ability to run other programs. The focus is on process creation events captured from Sysmon and Windows Event Logs, such as Event ID 4688, which logs new process creation. The detection highlights potential abuse scenarios that can lead to unauthorized access or further system compromise if the use of forfiles.exe is confirmed to be malicious. Ideally, it filters legitimate use cases, minimizing false positives related to standard system operations, such as those triggered by batch scripts.
Categories
  • Endpoint
  • Windows
Data Sources
  • Process
  • Windows Registry
ATT&CK Techniques
  • T1202
Created: 2024-11-13