Inline Python Execution - Spawn Shell Via OS System Library
Detects execution of inline Python code via the "-c" in order to call the "system" function from the "os" library, and spawn a shell.
Detection logic
Detection requirements
- Platform
- ContainersESXiIaaSIdentity ProviderLinuxmacOSNetwork DevicesOffice SuiteSaaSWindows
The rule states no platform. This is derived from the ATT&CK technique it maps to.
- Log source product
- linux
- Log source category
- process_creation
Known benign triggers
- Unknown
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
References
| Reference | Cited by |
|---|---|
| gtfobins.github.io/gtfobins/python/#shell | Only this detection cites it |
From the source
- At source
- Open at source
- Upstream identifier
- 2d2f44ff-4611-4778-a8fc-323a0e9850cc
- Tagged by the source as
- attack.execution
Licence
- Published under
- Detection Rule License 1.1Read the licence
- Attribution
- Required
Authorship
- Published
- Aug 26, 2026
- Version
- 1