2017-03-14 13:54:08 +00:00
|
|
|
title: Suspicious Activity in Shell Commands
|
|
|
|
description: Detects suspicious shell commands used in various exploit codes (see references)
|
2018-01-27 23:24:16 +00:00
|
|
|
references:
|
2017-03-14 13:54:08 +00:00
|
|
|
- http://www.threatgeek.com/2017/03/widespread-exploitation-attempts-using-cve-2017-5638.html
|
|
|
|
- https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/struts_code_exec_exception_delegator.rb#L121
|
2017-03-27 08:29:51 +00:00
|
|
|
- http://pastebin.com/FtygZ1cg
|
2017-03-27 13:21:39 +00:00
|
|
|
- https://artkond.com/2017/03/23/pivoting-guide/
|
2017-03-25 18:59:45 +00:00
|
|
|
author: Florian Roth
|
2019-02-05 14:58:15 +00:00
|
|
|
date: 2017/08/21
|
|
|
|
modified: 2019/02/05
|
2017-03-14 13:54:08 +00:00
|
|
|
logsource:
|
|
|
|
product: linux
|
|
|
|
detection:
|
|
|
|
keywords:
|
2017-03-15 08:07:59 +00:00
|
|
|
# Generic suspicious commands
|
2017-03-14 13:54:08 +00:00
|
|
|
- 'wget * - http* | perl'
|
|
|
|
- 'wget * - http* | sh'
|
|
|
|
- 'wget * - http* | bash'
|
2017-03-21 09:23:12 +00:00
|
|
|
- 'python -m SimpleHTTPServer'
|
2019-02-05 14:58:15 +00:00
|
|
|
- '-m http.server' # Python 3
|
|
|
|
- 'import pty; pty.spawn*'
|
|
|
|
- 'socat exec:*'
|
|
|
|
- 'socat -O /tmp/*'
|
|
|
|
- 'socat tcp-connect*'
|
|
|
|
- '*echo binary >>*'
|
2017-03-27 08:29:51 +00:00
|
|
|
# Malware
|
|
|
|
- '*wget *; chmod +x*'
|
|
|
|
- '*wget *; chmod 777 *'
|
|
|
|
- '*cd /tmp || cd /var/run || cd /mnt*'
|
2017-03-15 08:07:59 +00:00
|
|
|
# Apache Struts in-the-wild exploit codes
|
2019-02-05 14:58:15 +00:00
|
|
|
- '*stop;service iptables stop;*'
|
|
|
|
- '*stop;SuSEfirewall2 stop;*'
|
|
|
|
- 'chmod 777 2020*'
|
|
|
|
- '*>>/etc/rc.local'
|
2017-03-14 13:54:08 +00:00
|
|
|
# Metasploit framework exploit codes
|
2019-02-05 14:58:15 +00:00
|
|
|
- '*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/*'
|
2017-03-14 13:54:08 +00:00
|
|
|
condition: keywords
|
|
|
|
falsepositives:
|
|
|
|
- Unknown
|
|
|
|
level: high
|