Ruby Inline Command Execution
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.
Sigma rule (View on GitHub)
1title: Ruby Inline Command Execution
2id: 20a5ffa1-3848-4584-b6f8-c7c7fd9f69c8
3status: test
4description: 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.
5references:
6 - https://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet
7 - https://www.revshells.com/
8author: Nasreddine Bencherchali (Nextron Systems)
9date: 2023-01-02
10tags:
11 - attack.execution
12 - attack.t1059
13logsource:
14 category: process_creation
15 product: windows
16detection:
17 selection_img:
18 - Image|endswith: '\ruby.exe'
19 - OriginalFileName: 'ruby.exe'
20 selection_cli:
21 CommandLine|contains: ' -e'
22 condition: all of selection_*
23falsepositives:
24 - Unknown
25level: medium
References
Related rules
- Abusable DLL Potential Sideloading From Suspicious Location
- Add Insecure Download Source To Winget
- Add New Download Source To Winget
- Atlassian Confluence CVE-2022-26134
- Azure New CloudShell Created