{"id":"edc2f8ae-2412-4dfd-b9d5-0c57727e70be","title":"Potential Powershell ReverseShell Connection","description":"Detects usage of the \"TcpClient\" class. Which can be abused to establish remote connections and reverse-shells. As seen used by the Nishang \"Invoke-PowerShellTcpOneLine\" reverse shell and other.","author":"FPT.EagleEye, wagga, Nasreddine Bencherchali (Nextron Systems)","status":"stable","level":"high","date":"2021-03-03","modified":"2023-04-05","tags":["attack.execution","attack.t1059.001"],"technique_ids":["T1059.001"],"logsource":{"category":"process_creation","product":"windows"},"falsepositives":["In rare administrative cases, this function might be used to check network connectivity"],"references":["https://www.volexity.com/blog/2021/03/02/active-exploitation-of-microsoft-exchange-zero-day-vulnerabilities/","https://www.microsoft.com/security/blog/2021/03/02/hafnium-targeting-exchange-servers/","https://github.com/samratashok/nishang/blob/414ee1104526d7057f9adaeee196d91ae447283e/Shells/Invoke-PowerShellTcpOneLine.ps1"],"source_path":"rules/windows/process_creation/proc_creation_win_powershell_reverse_shell_connection.yml","source_sha256":"1346f2094b01eb7de8daf67e1600a7e4ce165e8f5254027d969ef8dcb8946a27","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/process_creation/proc_creation_win_powershell_reverse_shell_connection.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Potential Powershell ReverseShell Connection\nid: edc2f8ae-2412-4dfd-b9d5-0c57727e70be\nstatus: stable\ndescription: Detects usage of the \"TcpClient\" class. Which can be abused to establish remote connections and reverse-shells. As seen used by the Nishang \"Invoke-PowerShellTcpOneLine\" reverse shell and other.\nreferences:\n    - https://www.volexity.com/blog/2021/03/02/active-exploitation-of-microsoft-exchange-zero-day-vulnerabilities/\n    - https://www.microsoft.com/security/blog/2021/03/02/hafnium-targeting-exchange-servers/\n    - https://github.com/samratashok/nishang/blob/414ee1104526d7057f9adaeee196d91ae447283e/Shells/Invoke-PowerShellTcpOneLine.ps1\nauthor: FPT.EagleEye, wagga, Nasreddine Bencherchali (Nextron Systems)\ndate: 2021-03-03\nmodified: 2023-04-05\ntags:\n    - attack.execution\n    - attack.t1059.001\nlogsource:\n    category: process_creation\n    product: windows\ndetection:\n    selection_img:\n        - OriginalFileName:\n              - 'PowerShell.EXE'\n              - 'pwsh.dll'\n        - Image|endswith:\n              - '\\powershell.exe'\n              - '\\pwsh.exe'\n    selection_cli:\n        CommandLine|contains|all:\n            - ' Net.Sockets.TCPClient'\n            - '.GetStream('\n            - '.Write('\n    condition: all of selection_*\nfalsepositives:\n    - In rare administrative cases, this function might be used to check network connectivity\nlevel: high\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1059.001","id":"T1059.001","name":"PowerShell","page":"techniques/enterprise/T1059.001/"}],"data_path":"data/detection-rules/edc2f8ae-2412-4dfd-b9d5-0c57727e70be.json","kind":"sigma"}
