From 32c098294ffa09129a981ed8117d56ef18ebdc3c Mon Sep 17 00:00:00 2001 From: Florian Roth Date: Tue, 5 Feb 2019 15:58:15 +0100 Subject: [PATCH] Rule: extended suspicious command lines --- rules/linux/lnx_shell_susp_commands.yml | 46 +++++++++++++++---------- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/rules/linux/lnx_shell_susp_commands.yml b/rules/linux/lnx_shell_susp_commands.yml index 1a2d40702..ee10e9107 100644 --- a/rules/linux/lnx_shell_susp_commands.yml +++ b/rules/linux/lnx_shell_susp_commands.yml @@ -6,6 +6,8 @@ references: - http://pastebin.com/FtygZ1cg - https://artkond.com/2017/03/23/pivoting-guide/ author: Florian Roth +date: 2017/08/21 +modified: 2019/02/05 logsource: product: linux detection: @@ -15,30 +17,38 @@ detection: - 'wget * - http* | sh' - 'wget * - http* | bash' - 'python -m SimpleHTTPServer' - - 'import pty; pty.spawn' + - '-m http.server' # Python 3 + - 'import pty; pty.spawn*' + - 'socat exec:*' + - 'socat -O /tmp/*' + - 'socat tcp-connect*' + - '*echo binary >>*' # Malware - '*wget *; chmod +x*' - '*wget *; chmod 777 *' - '*cd /tmp || cd /var/run || cd /mnt*' # Apache Struts in-the-wild exploit codes - - 'stop;service iptables stop;' - - 'stop;SuSEfirewall2 stop;' - - 'chmod 777 2020' - - '">>/etc/rc.local;' - - 'wget -c *;chmod 777' + - '*stop;service iptables stop;*' + - '*stop;SuSEfirewall2 stop;*' + - 'chmod 777 2020*' + - '*>>/etc/rc.local' + - '*wget -c *;chmod 777*' # Metasploit framework exploit codes - - 'base64 -d /tmp/' - - ' | base64 -d' - - '/bin/chmod u+s' - - 'chmod +s /tmp/' - - 'chmod u+s /tmp/' - - '/tmp/haxhax' - - '/tmp/ns_sploit' - - 'nc -l -p ' - - 'cp /bin/ksh ' - - 'cp /bin/sh ' - - ' /tmp/*.b64 ' - - '/tmp/ysocereal.jar' + - '*base64 -d /tmp/*' + - '* | base64 -d *' + - '*/chmod u+s *' + - '*chmod +s /tmp/*' + - '*chmod u+s /tmp/*' + - '* /tmp/haxhax*' + - '* /tmp/ns_sploit*' + - 'nc -l -p *' + - 'cp /bin/ksh *' + - 'cp /bin/sh *' + - '* /tmp/*.b64 *' + - '*/tmp/ysocereal.jar*' + - '*/tmp/x *' + - '*; chmod +x /tmp/*' + - '*;chmod +x /tmp/*' condition: keywords falsepositives: - Unknown