Sigma rule: Suspicious Activity in Shell Commands

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-d7f7cf901cf6, updated 2021-11-27T00:00:00.000Z.

Rule

Title
Suspicious Activity in Shell Commands
Status
test
Level
high
Author
Florian Roth (Nextron Systems)
Date
2017-08-21
Modified
2021-11-27
File
rules/linux/builtin/lnx_shell_susp_commands.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects suspicious shell commands used in various exploit codes (see references)

Log source

product
linux

Detection

keywords:
    # Generic suspicious commands
    - 'wget * - http* | perl'
    - 'wget * - http* | sh'
    - 'wget * - http* | bash'
    - 'python -m SimpleHTTPServer'
    - '-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'
    # Metasploit framework exploit codes
    - '*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

False positives (as the rule lists them)

  • Unknown

Tags

  • attack.execution
  • attack.t1059.004

MITRE ATT&CK ids this rule names

References

Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/linux/builtin/lnx_shell_susp_commands.yml

Sources and licences

  • SigmaHQ

    "Suspicious Activity in Shell Commands" by Florian Roth (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/linux/builtin/lnx_shell_susp_commands.yml.
    Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License

    Detection Rule License (DRL) 1.1

Cite this page

Dragons Eye Ransomware Tracker, "Sigma rule: Suspicious Activity in Shell Commands",
entity page, dataset version ref-d7f7cf901cf6, updated 2021-11-27T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/2aa1440c-9ae9-4d92-84a7-a9e5f5e31695 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 2aa1440c-9ae9-4d92-84a7-a9e5f5e31695, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.

Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.