Created
August 16, 2024 13:21
-
-
Save nullenc0de/438f8c4d12ff5228871f743c822df3d7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id: suspicious-extensions-rce | |
info: | |
name: Suspicious File Extensions - Potential RCE | |
author: Nullenc0de | |
severity: medium | |
description: Detects files with potentially suspicious extensions that could be used for Remote Code Execution (RCE). Scan your AppData folder. | |
file: | |
- extensions: | |
- exe | |
- bat | |
- cmd | |
- ps1 | |
- vbs | |
- wsf | |
- hta | |
- jar | |
- py | |
- rb | |
- pl | |
matchers-condition: or | |
matchers: | |
- type: regex | |
regex: | |
- '(?i)(system|exec|eval|shellexec|wscript\.shell|scriptcontrol|msxml2\.xmlhttp|adodb\.stream|powershell)' | |
part: body | |
- type: regex | |
regex: | |
- '(?i)(download|http|ftp|socket|net\.webclient|invoke-webrequest)' | |
part: body | |
- type: regex | |
regex: | |
- '(?i)(bypass|encodedcommand|-enc|-w hidden|-windowstyle hidden)' | |
part: path | |
# New matcher for batch file commands | |
- type: regex | |
regex: | |
- '(?i)(call|start|cmd|powershell|wscript|cscript)' | |
part: body | |
extractors: | |
- type: regex | |
name: suspicious_file | |
regex: | |
- '.*\.(exe|bat|cmd|ps1|vbs|wsf|hta|jar|py|rb|pl)$' | |
part: path | |
- type: regex | |
name: suspicious_content | |
regex: | |
- '(?i)(system|exec|eval|shellexec|wscript\.shell|scriptcontrol|msxml2\.xmlhttp|adodb\.stream|powershell|download|http|ftp|socket|net\.webclient|invoke-webrequest|call|start|cmd)' | |
part: body |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment