Files
blue-team-tools/rules/linux/lnx_shell_susp_commands.yml
T

56 lines
1.8 KiB
YAML
Raw Normal View History

2017-03-14 14:54:08 +01:00
title: Suspicious Activity in Shell Commands
2019-11-12 23:12:27 +01:00
id: 2aa1440c-9ae9-4d92-84a7-a9e5f5e31695
2017-03-14 14:54:08 +01:00
description: Detects suspicious shell commands used in various exploit codes (see references)
references:
2017-03-14 14:54:08 +01: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 10:29:51 +02:00
- http://pastebin.com/FtygZ1cg
2017-03-27 15:21:39 +02:00
- https://artkond.com/2017/03/23/pivoting-guide/
author: Florian Roth
2019-02-05 15:58:15 +01:00
date: 2017/08/21
modified: 2019/02/05
2017-03-14 14:54:08 +01:00
logsource:
product: linux
detection:
keywords:
2017-03-15 09:07:59 +01:00
# Generic suspicious commands
2017-03-14 14:54:08 +01:00
- 'wget * - http* | perl'
- 'wget * - http* | sh'
- 'wget * - http* | bash'
2017-03-21 10:23:12 +01:00
- 'python -m SimpleHTTPServer'
2019-02-05 15:58:15 +01:00
- '-m http.server' # Python 3
- 'import pty; pty.spawn*'
- 'socat exec:*'
- 'socat -O /tmp/*'
- 'socat tcp-connect*'
- '*echo binary >>*'
2017-03-27 10:29:51 +02:00
# Malware
- '*wget *; chmod +x*'
- '*wget *; chmod 777 *'
- '*cd /tmp || cd /var/run || cd /mnt*'
2017-03-15 09:07:59 +01:00
# Apache Struts in-the-wild exploit codes
2019-02-05 15:58:15 +01:00
- '*stop;service iptables stop;*'
- '*stop;SuSEfirewall2 stop;*'
- 'chmod 777 2020*'
- '*>>/etc/rc.local'
2017-03-14 14:54:08 +01:00
# Metasploit framework exploit codes
2019-02-05 15:58:15 +01: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 14:54:08 +01:00
condition: keywords
falsepositives:
- Unknown
level: high