cscli scenarios install sigmahq/proc_creation_win_python_pty_spawn
1type: trigger2name: sigmahq/proc_creation_win_python_pty_spawn3description: |4 Detects python spawning a pretty tty5filter: |6 (evt.Meta.service == 'sysmon' && evt.Parsed.EventID == '1') && ((evt.Parsed.Image endsWith 'python.exe' || evt.Parsed.Image endsWith 'python3.exe' || evt.Parsed.Image endsWith 'python2.exe') && (evt.Parsed.CommandLine contains 'import pty' && evt.Parsed.CommandLine contains '.spawn(' || evt.Parsed.CommandLine contains 'from pty import spawn'))7blackhole: 2m8#status: test9labels:10 service: windows11 confidence: 112 spoofable: 013 classification:14 - attack.t10591516 label: "Python Spawning Pretty TTY on Windows"17 behavior : "windows:audit"18 remediation: false1920scope:21 type: ParentProcessId22 expression: evt.Parsed.ParentProcessId2324