HKTL_Reverse_Connect_TCP_PTY_Shell
Description
Detects reverse connect TCP PTY shell
Query · yara
strings:
$s1 = "os.dup2(s.fileno(),1)" fullword ascii
$s2 = "pty.spawn(\"/bin/\")" fullword ascii
$s3 = "os.putenv(\"HISTFILE\",'/dev/null')" fullword ascii
$s4 = "socket.socket(socket.AF_INET, socket.SOCK_STREAM)" fullword ascii
condition:
filesize < 1KB and 2 of them