YARA rule 'reverse_shell': Reverse shell patterns in scripts or source code [malware]
Critical
- Category
- YARA Match
- Content
时、半开连接等错误排查 - 基于 TCP 的自定义协议或简单服务 - 与 TCP 相关的防火墙、端口、绑定地址配置 --- ## 快速测试连接与端口 ### 命令行 - **PowerShell(Windows)**: ```powershell Test-NetConnection -ComputerName host -Port port ``` 或使用 .NET 套接字简单测端口(脚本中): ```powershell $tcp = New-Object System.Net.Sockets.TcpClient; $tcp.Connect("host", port); $tcp.Close() ``` - **netcat(nc)**(若已安装): ```bash nc -zv host port ``` 交互收发: ```bash nc host port ``` - **telnet**(多数系统已弃用或未默认安装,仅作备选): ```bash telnet host port ``` 根据用户当前 OS 优先给出可用方案(如 Windows 用 `Test-NetConnection` 或 PowerShell 脚本)。 --- ## 客户端/服务端代码要点 ### 通用流程 - **客户端**:创建 socket → connect(host, port) → send/recv →- Confidence
- 85% confidence
- Finding
- YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
