Skip to content

Hide Navigation Hide TOC

Suspicious Usage of For Loop with Recursive Directory Search in CMD (2782fbd8-b662-4eb5-9962-5bfbfb671e7b)

Detects suspicious usage of the cmd.exe 'for /f' loop combined with the 'tokens=' parameter and a recursive directory listing. This pattern may indicate an attempt to discover and execute system binaries dynamically, for example powershell, a technique sometimes used by attackers to evade detection. This behavior has been observed in various malicious lnk files.

Cluster A Galaxy A Cluster B Galaxy B Level
Command Obfuscation - T1027.010 (d511a6f6-4a33-41d5-bc95-c343875d1377) Attack Pattern Suspicious Usage of For Loop with Recursive Directory Search in CMD (2782fbd8-b662-4eb5-9962-5bfbfb671e7b) Sigma-Rules 1
Suspicious Usage of For Loop with Recursive Directory Search in CMD (2782fbd8-b662-4eb5-9962-5bfbfb671e7b) Sigma-Rules Windows Command Shell - T1059.003 (d1fcf083-a721-4223-aedf-bf8960798d62) Attack Pattern 1
Obfuscated Files or Information - T1027 (b3d682b6-98f2-4fb0-aa3b-b4df007ca70a) Attack Pattern Command Obfuscation - T1027.010 (d511a6f6-4a33-41d5-bc95-c343875d1377) Attack Pattern 2
Command and Scripting Interpreter - T1059 (7385dfaf-6886-4229-9ecd-6fd678040830) Attack Pattern Windows Command Shell - T1059.003 (d1fcf083-a721-4223-aedf-bf8960798d62) Attack Pattern 2