{"id":"c4042d54-110d-45dd-a0e1-05c47822c937","title":"Python Spawning Pretty TTY Via PTY Module","description":"Detects a python process calling to the PTY module in order to spawn a pretty tty which could be indicative of potential reverse shell activity.\n","author":"Nextron Systems","status":"test","level":"medium","date":"2022-06-03","modified":"2024-11-04","tags":["attack.execution","attack.t1059"],"technique_ids":["T1059"],"logsource":{"category":"process_creation","product":"linux"},"falsepositives":["Unknown"],"references":["https://www.volexity.com/blog/2022/06/02/zero-day-exploitation-of-atlassian-confluence/"],"source_path":"rules/linux/process_creation/proc_creation_lnx_python_pty_spawn.yml","source_sha256":"f8ca2969f6533d2e72469d839418988d9503cf4a78627eeb568ac88e60120792","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/linux/process_creation/proc_creation_lnx_python_pty_spawn.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Python Spawning Pretty TTY Via PTY Module\nid: c4042d54-110d-45dd-a0e1-05c47822c937\nrelated:\n    - id: 32e62bc7-3de0-4bb1-90af-532978fe42c0\n      type: similar\nstatus: test\ndescription: |\n    Detects a python process calling to the PTY module in order to spawn a pretty tty which could be indicative of potential reverse shell activity.\nreferences:\n    - https://www.volexity.com/blog/2022/06/02/zero-day-exploitation-of-atlassian-confluence/\nauthor: Nextron Systems\ndate: 2022-06-03\nmodified: 2024-11-04\ntags:\n    - attack.execution\n    - attack.t1059\nlogsource:\n    category: process_creation\n    product: linux\ndetection:\n    selection_img:\n        - Image|endswith:\n              - '/python'\n              - '/python2'\n              - '/python3'\n        - Image|contains:\n              - '/python2.'  # python image is always of the form ../python3.10; ../python is just a symlink\n              - '/python3.'\n    selection_cli_import:\n        CommandLine|contains:\n            - 'import pty'\n            - 'from pty '\n    selection_cli_spawn:\n        CommandLine|contains: 'spawn'\n    condition: all of selection_*\nfalsepositives:\n    - Unknown\nlevel: medium\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1059","id":"T1059","name":"Command and Scripting Interpreter","page":"techniques/enterprise/T1059/"}],"data_path":"data/detection-rules/c4042d54-110d-45dd-a0e1-05c47822c937.json","kind":"sigma"}
