Forfiles

S0193

Tool.View on attack.mitre.org

About this tool

Forfiles is a Windows utility commonly used in batch jobs to execute commands on one or more selected files or directories (ex: list all directories in a drive, read the first line of all files created yesterday, etc.). Forfiles can be executed from either the command line, Run window, or batch files/scripts.

Techniques used3

Procedure examples3

TechniqueProcedure example
T1005
Data from Local System

Forfiles can be used to act on (ex: copy, move, etc.) files/directories in a system during (ex: copy files into a staging area before).

T1083
File and Directory Discovery

Forfiles can be used to locate certain types of files/directories in a system.(ex: locate all files with a specific extension, name, and/or age)

T1202
Indirect Command Execution

Forfiles can be used to subvert controls and possibly conceal command execution by not directly invoking cmd.

Groups that use it1

Campaigns0

None recorded.

References1

  1. Microsoft Forfiles Aug 2016 Open source
    Microsoft. (2016, August 31). Forfiles. Retrieved January 22, 2018.

Data from MITRE ATT&CK® (Enterprise). ATT&CK® is a registered trademark of The MITRE Corporation.