Potential Powershell ReverseShell Connection
Last updated on:
In this page
About the rule
Rule Type
Standard
Rule 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.
Severity
Trouble
Rule Requirement
Criteria
Action1: actionname = "Process started" AND (ORIGINALFILENAME = "PowerShell.EXE,pwsh.dll" OR PROCESSNAME endswith "\powershell.exe,\pwsh.exe") AND (COMMANDLINE contains " Net.Sockets.TCPClient" AND COMMANDLINE contains ".GetStream(" AND COMMANDLINE contains ".Write(") select Action1.HOSTNAME,Action1.MESSAGE,Action1.COMMANDLINE,Action1.FILE_NAME,Action1.PROCESSNAME,Action1.USERNAME,Action1.PARENTPROCESSNAME
Detection
Execution Mode
realtime
Log Sources
Windows
Author
FPT.EagleEye, wagga, Nasreddine Bencherchali (Nextron Systems)


