03 : /Privilege-escalation Windows#

~/ cat Forfiles.exe.md

Selects and executes a command on a file or set of files. This command is useful for batch processing.

Paths:

C:\Windows\System32\forfiles.exe
C:\Windows\SysWOW64\forfiles.exe

Detection:

Execute

Executes calc.exe since there is a match for notepad.exe in the c:\windows\System32 folder.

forfiles /p c:\windows\system32 /m notepad.exe /c calc.exe

Alternate data streams

Executes the evil.exe Alternate Data Stream (AD) since there is a match for notepad.exe in the c:\windows\system32 folder.

forfiles /p c:\windows\system32 /m notepad.exe /c "c:\folder\normal.dll:evil.exe"