
Summary
This detection rule identifies a potentially suspicious use of the Windows command prompt (cmd.exe) that employs a 'for /f' loop combined with the 'tokens=' parameter and a recursive directory search via the 'dir' command. Attackers might utilize this technique to dynamically locate and execute system binaries, such as PowerShell. Such tactics are often aimed at evading security measures and are commonly observed in malicious LNK (shortcut) files. The rule is designed to flag command line inputs that exhibit this suspicious behavior, helping identify instances where command executions could indicate a security threat. False positives may occur due to the legitimate use of similar commands, hence categorizing the level of suspicion as medium. The rule leverages process creation events to capture these patterns.
Categories
- Windows
- Endpoint
Data Sources
- Process
Created: 2025-11-12