Skip to main content
Glama
RuoJi6

Memory Shell Detector MCP

by RuoJi6

remove_memory_shell

Remove malicious Java memory shells from running JVM processes without restarting services. This tool unloads specified classes by deregistering them from web containers, removing Spring beans, or restoring hooked methods after AI confirmation.

Instructions

执行 memory-shell-detector-cli.jar 从 JVM 内存中移除指定的内存马类

底层命令: java -jar memory-shell-detector-cli.jar -r <class_name> -p

此工具通过 Java Agent 技术从运行中的 JVM 进程中卸载/禁用指定的恶意类, 实现不重启服务的情况下清除内存马。

移除机制:

  • 对于 Filter/Servlet/Listener:从 Web 容器中注销

  • 对于 Spring 组件:从 Spring 容器中移除 Bean

  • 对于 Agent 类型:尝试还原被 hook 的方法

安全机制:首次调用时会先反编译目标类源码供 AI 分析确认, 确认是内存马后需设置 ai_confirmed=True 再次调用才会执行移除。

Args: class_name: 要移除的内存马完整类名 pid: 目标 Java 进程的 PID tools_dir: 检测工具 jar 包所在目录 ai_confirmed: AI 是否已确认该类为内存马(首次调用设为 False) use_ssh: 是否通过 SSH 在远程服务器执行 ssh_host/ssh_username/ssh_password/ssh_key_path/ssh_port: SSH 连接参数

Returns: 首次调用返回反编译源码供分析,确认后返回移除结果

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
class_nameYes
pidYes
tools_dirNo
ai_confirmedNo
use_sshNo
ssh_hostNo
ssh_usernameNo
ssh_passwordNo
ssh_key_pathNo
ssh_portNo

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/RuoJi6/memory-shell-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server