
Summary
This detection rule aims to identify potentially malicious activities involving the execution of Python scripts through the command line using the "-c" flag, which allows inline command execution. Often utilized in attacks, this method can enable adversaries to execute arbitrary commands directly within a Python interpreter, making it easier to launch reverse shells or execute malicious payloads. The detection strategy involves monitoring process creation events specifically for processes that match certain conditions. The rule filters for instances where the Python executable ('python.exe', 'python3.exe', or 'python2.exe') is executed with a command line that includes the "-c" flag. Additional filters are applied to rule out benign cases, such as those initiated by legitimate applications like VS Code or during expected library operation, to reduce false positives. By focusing on the command line inputs and parent images involved in the process creation, the rule is designed to alert on suspicious activities while allowing common usage scenarios to pass unnoticed.
Categories
- Endpoint
- Windows
Data Sources
- Process
Created: 2023-01-02