Suspicious Execution of Ruby Inline Command (via process_creation)
This rule detects execution of ruby using the "-e" flag. This is could be used as a way to launch a reverse shell or execute live ruby code.
SigmamediumWindowsv1
sigma
suspicious-execution-of-ruby-inline-command-via-process-creation
title: Suspicious Execution of Ruby Inline Command (via process_creation)
id: ce3350c4-6a72-5dff-be6b-53ef5189951b
status: stable
description: This rule detects execution of ruby using the "-e" flag. This is could be used as a way to launch a reverse shell or execute live ruby code.
references:
- https://attack.mitre.org/techniques/T1059/
- https://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet
- https://www.revshells.com/
author: Huntrule Team
date: 2026-03-16
tags:
- attack.execution
- attack.t1059
logsource:
category: process_creation
product: windows
detection:
selection_img:
- Image|endswith: '\ruby.exe'
- OriginalFileName: 'ruby.exe'
selection_cli:
CommandLine|contains: ' -e'
condition: all of selection_*
falsepositives:
- Unknown
level: medium
Known false positives
- Unknown
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.