windows enabled community high v1.0.0

forfiles

Selects and executes a command on a file or set of files. This command is useful for batch processing. Located at: C:\Windows\System32\forfiles.exe; C:\Windows\SysWOW64\forfiles.exe.

📋 Live Preview
forfiles
forfiles

Sandbox: execFile · Timeout: 30s

Capabilities

security.execution.command
system.file.alternate-data-stream

Contract

Outputs

process.output

Command execution output

Side effects: filesystem_writeprocess_spawn

Workflow Edges

Produces

process.output

Resource Profile

ResourceValue
CPUlow
Memory16 MB
Networklow
Disk I/Olow

Examples

Executes specified command since there is a match for notepad.exe in the c:\windows\System32 folder. (Use forfiles to start a new process to evade defensive counter measures)

forfiles /p c:\windows\system32 /m notepad.exe /c "{CMD}"

Executes the evil.exe Alternate Data Stream (AD) since there is a match for notepad.exe in the c:\windows\system32 folder. (Use forfiles to start a new process from a binary hidden in an alternate data stream)

forfiles /p c:\windows\system32 /m notepad.exe /c "{PATH_ABSOLUTE}:evil.exe"

Detection

Documentation

forfiles

forfiles is a Windows LOLBin. Selects and executes a command on a file or set of files. This command is useful for batch processing. Located at: C:\Windows\System32\forfiles.exe; C:\Windows\SysWOW64\forfiles.exe.

References