Sigma rule: Python Spawning Pretty TTY on Windows
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-89c4753a5f1b, updated 2022-06-03T00:00:00.000Z.
Rule
- Title
- Python Spawning Pretty TTY on Windows
- Status
- test
- Level
- high
- Author
- Nextron Systems
- Date
- 2022-06-03
- File
- rules/windows/process_creation/proc_creation_win_python_pty_spawn.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects python spawning a pretty tty
Log source
- product
- windows
- category
- process_creation
Detection
selection_img:
Image|endswith:
- 'python.exe' # no \ bc of e.g. ipython.exe
- 'python3.exe'
- 'python2.exe'
selection_cli_1:
CommandLine|contains|all:
- 'import pty'
- '.spawn('
selection_cli_2:
CommandLine|contains: 'from pty import spawn'
condition: selection_img and 1 of selection_cli_*False positives (as the rule lists them)
- Unknown
Tags
- attack.execution
- attack.t1059
MITRE ATT&CK ids this rule names
Related rules
References
Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_python_pty_spawn.yml
Sources and licences
SigmaHQ
"Python Spawning Pretty TTY on Windows" by Nextron Systems (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_python_pty_spawn.yml.
Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License
Cite this page
Dragons Eye Ransomware Tracker, "Sigma rule: Python Spawning Pretty TTY on Windows",
entity page, dataset version ref-89c4753a5f1b, updated 2022-06-03T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/480e7e51-e797-47e3-8d72-ebfce65b6d8d (accessed 2026-11-03).
Underlying source: SigmaHQ rule 480e7e51-e797-47e3-8d72-ebfce65b6d8d, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.
Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.