Sigma rule: Potential Ruby Reverse Shell

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-e4e72f55581c, updated 2023-04-07T00:00:00.000Z.

Rule

Title
Potential Ruby Reverse Shell
Status
test
Level
medium
Author
@d4ns4n_
Date
2023-04-07
File
rules/linux/process_creation/proc_creation_lnx_ruby_reverse_shell.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects execution of ruby with the "-e" flag and calls to "socket" related functions. This could be an indication of a potential attempt to setup a reverse shell

Log source

product
linux
category
process_creation

Detection

selection:
    Image|contains: 'ruby'
    CommandLine|contains|all:
        - ' -e'
        - 'rsocket'
        - 'TCPSocket'
    CommandLine|contains:
        - ' ash'
        - ' bash'
        - ' bsh'
        - ' csh'
        - ' ksh'
        - ' pdksh'
        - ' sh'
        - ' tcsh'
condition: selection

False positives (as the rule lists them)

  • Unknown

Tags

  • attack.execution

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/process_creation/proc_creation_lnx_ruby_reverse_shell.yml

Sources and licences

  • SigmaHQ

    "Potential Ruby Reverse Shell" by @d4ns4n_ (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/linux/process_creation/proc_creation_lnx_ruby_reverse_shell.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: Potential Ruby Reverse Shell",
entity page, dataset version ref-e4e72f55581c, updated 2023-04-07T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/b8bdac18-c06e-4016-ac30-221553e74f59 (accessed 2026-11-03).
Underlying source: SigmaHQ rule b8bdac18-c06e-4016-ac30-221553e74f59, 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.