{"id":"8737b7f6-8df3-4bb7-b1da-06019b99b687","title":"Shell Invocation Via Ssh - Linux","description":"Detects the use of the \"ssh\" utility to execute a shell. Such behavior may be associated with privilege escalation, unauthorized command execution, or to break out from restricted environments.\n","author":"Li Ling, Andy Parkidomo, Robert Rakowski, Blake Hartstein (Bloomberg L.P.)","status":"test","level":"high","date":"2024-08-29","modified":"","tags":["attack.execution","attack.t1059"],"technique_ids":["T1059"],"logsource":{"category":"process_creation","product":"linux"},"falsepositives":["Unknown"],"references":["https://gtfobins.github.io/gtfobins/ssh/","https://www.elastic.co/guide/en/security/current/linux-restricted-shell-breakout-via-linux-binary-s.html"],"source_path":"rules/linux/process_creation/proc_creation_lnx_ssh_shell_execution.yml","source_sha256":"ffc31b99deb7c3b4e4d2b96df1a8edb5c0fc0bee16816b78ab847970b161f154","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/linux/process_creation/proc_creation_lnx_ssh_shell_execution.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Shell Invocation Via Ssh - Linux\nid: 8737b7f6-8df3-4bb7-b1da-06019b99b687\nstatus: test\ndescription: |\n    Detects the use of the \"ssh\" utility to execute a shell. Such behavior may be associated with privilege escalation, unauthorized command execution, or to break out from restricted environments.\nreferences:\n    - https://gtfobins.github.io/gtfobins/ssh/\n    - https://www.elastic.co/guide/en/security/current/linux-restricted-shell-breakout-via-linux-binary-s.html\nauthor: Li Ling, Andy Parkidomo, Robert Rakowski, Blake Hartstein (Bloomberg L.P.)\ndate: 2024-08-29\ntags:\n    - attack.execution\n    - attack.t1059\nlogsource:\n    category: process_creation\n    product: linux\ndetection:\n    selection_img:\n        Image|endswith: '/ssh'\n        CommandLine|contains:\n            - 'ProxyCommand=;'\n            - 'permitlocalcommand=yes'\n            - 'localhost'\n    selection_cli:\n        CommandLine|contains:\n            - '/bin/bash'\n            - '/bin/dash'\n            - '/bin/fish'\n            - '/bin/sh'\n            - '/bin/zsh'\n            - 'sh 0<&2 1>&2'\n            - 'sh 1>&2 0<&2'\n    condition: all of selection_*\nfalsepositives:\n    - Unknown\nlevel: high\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/8737b7f6-8df3-4bb7-b1da-06019b99b687.json","kind":"sigma"}
