view_class_code
Extract and decompile class bytecode from JVM memory to analyze Java memory shell implementations and malicious behaviors.
Instructions
执行 memory-shell-detector-cli.jar 从 JVM 内存中提取并反编译指定类的字节码
底层命令: java -jar memory-shell-detector-cli.jar -v <class_name> -p
此工具通过 Java Agent 从运行中的 JVM 进程内存中 dump 指定类的字节码, 然后使用内置反编译器将字节码还原为可读的 Java 源代码。
这是分析内存马的关键步骤,可以查看:
类的完整实现逻辑
恶意代码的具体行为(如命令执行、文件操作、网络连接等)
内存马的注入方式和触发条件
Args: class_name: 要反编译的完整类名(如 com.example.EvilFilter) pid: 目标 Java 进程的 PID tools_dir: 检测工具 jar 包所在目录 use_ssh: 是否通过 SSH 在远程服务器执行 ssh_host/ssh_username/ssh_password/ssh_key_path/ssh_port: SSH 连接参数
Returns: source_code: 反编译后的 Java 源代码
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| class_name | Yes | ||
| pid | Yes | ||
| tools_dir | No | ||
| use_ssh | No | ||
| ssh_host | No | ||
| ssh_username | No | ||
| ssh_password | No | ||
| ssh_key_path | No | ||
| ssh_port | No |