mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-25 08:21:52 +08:00
fix: boot-ui not behinder select option
This commit is contained in:
@@ -10,7 +10,8 @@
|
|||||||
> 本工具仅供安全研究人员、网络管理员及相关技术人员进行授权的安全测试、漏洞评估和安全审计工作使用。使用本工具进行任何未经授权的网络攻击或渗透测试等行为均属违法,使用者需自行承担相应的法律责任。
|
> 本工具仅供安全研究人员、网络管理员及相关技术人员进行授权的安全测试、漏洞评估和安全审计工作使用。使用本工具进行任何未经授权的网络攻击或渗透测试等行为均属违法,使用者需自行承担相应的法律责任。
|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
> [GitHub Actions](https://github.com/ReaJason/MemShellParty/actions/workflows/ci.yaml) 最新一次构建会打印集成测试用例测试结果,可通过此来了解当前支持进度。
|
> [GitHub Actions](https://github.com/ReaJason/MemShellParty/actions/workflows/ci.yaml)
|
||||||
|
> 最新一次构建会打印集成测试用例测试结果,可通过此来了解当前支持进度。
|
||||||
|
|
||||||
> [!WARNING]
|
> [!WARNING]
|
||||||
> 项目仍在快速迭代过程中(代码结构十分不稳定)......
|
> 项目仍在快速迭代过程中(代码结构十分不稳定)......
|
||||||
@@ -31,11 +32,11 @@
|
|||||||
| Listener | Listener | Valve | Valve |
|
| Listener | Listener | Valve | Valve |
|
||||||
| Valve | | | |
|
| Valve | | | |
|
||||||
|
|
||||||
| Resin(3 ~ 4) | Netty | SpringMVC | SpringWebFlux |
|
| Resin(3 ~ 4) | SpringMVC | SpringWebFlux | Netty |
|
||||||
|--------------|-------|-----------|---------------|
|
|--------------|-------------------|---------------|-------|
|
||||||
| Servlet | x | x | x |
|
| Servlet | Interceptor | x | x |
|
||||||
| Filter | | | |
|
| Filter | ControllerHandler | | |
|
||||||
| Listener | | | |
|
| Listener | | | |
|
||||||
|
|
||||||
| JBossAS(4 ~ 7) | JBossEAP(6 ~ 7) | WildFly(9 ~ 30) | Undertow |
|
| JBossAS(4 ~ 7) | JBossEAP(6 ~ 7) | WildFly(9 ~ 30) | Undertow |
|
||||||
|----------------|-----------------|-----------------|----------|
|
|----------------|-----------------|-----------------|----------|
|
||||||
@@ -81,7 +82,7 @@
|
|||||||
使用 docker 部署之后访问 http://127.0.0.1:8080
|
使用 docker 部署之后访问 http://127.0.0.1:8080
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run -it -d --name memshell -p 8080:8080 reajason/memshell-party
|
docker run -it -d --rm --pull=always --name memshell -p 8080:8080 reajason/memshell-party
|
||||||
```
|
```
|
||||||
|
|
||||||
## How
|
## How
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.reajason.javaweb.boot.controller;
|
package com.reajason.javaweb.boot.controller;
|
||||||
|
|
||||||
import com.reajason.javaweb.boot.entity.Config;
|
import com.reajason.javaweb.boot.entity.Config;
|
||||||
|
import com.reajason.javaweb.memshell.AbstractShell;
|
||||||
import com.reajason.javaweb.memshell.config.Server;
|
import com.reajason.javaweb.memshell.config.Server;
|
||||||
import com.reajason.javaweb.memshell.config.ShellTool;
|
import com.reajason.javaweb.memshell.config.ShellTool;
|
||||||
import com.reajason.javaweb.memshell.AbstractShell;
|
|
||||||
import com.reajason.javaweb.memshell.packer.Packer;
|
import com.reajason.javaweb.memshell.packer.Packer;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||||
@@ -26,15 +26,19 @@ public class ConfigController {
|
|||||||
Map<String, Map<?, ?>> coreMap = new HashMap<>(16);
|
Map<String, Map<?, ?>> coreMap = new HashMap<>(16);
|
||||||
for (Server value : Server.values()) {
|
for (Server value : Server.values()) {
|
||||||
AbstractShell shell = value.getShell();
|
AbstractShell shell = value.getShell();
|
||||||
if (shell != null) {
|
if (shell == null) {
|
||||||
List<ShellTool> supportedShellTools = shell.getSupportedShellTools();
|
continue;
|
||||||
Map<String, List<String>> map = new HashMap<>(16);
|
|
||||||
for (ShellTool shellTool : supportedShellTools) {
|
|
||||||
List<String> supportedShellTypes = shell.getSupportedShellTypes(shellTool);
|
|
||||||
map.put(shellTool.name(), supportedShellTypes);
|
|
||||||
}
|
|
||||||
coreMap.put(value.name(), map);
|
|
||||||
}
|
}
|
||||||
|
ShellTool[] supportedShellTools = ShellTool.values();
|
||||||
|
Map<String, List<String>> map = new HashMap<>(16);
|
||||||
|
for (ShellTool shellTool : supportedShellTools) {
|
||||||
|
List<String> supportedShellTypes = shell.getSupportedShellTypes(shellTool);
|
||||||
|
if (supportedShellTypes.isEmpty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
map.put(shellTool.name(), supportedShellTypes);
|
||||||
|
}
|
||||||
|
coreMap.put(value.name(), map);
|
||||||
}
|
}
|
||||||
Config config = new Config();
|
Config config = new Config();
|
||||||
config.setServers(
|
config.setServers(
|
||||||
|
|||||||
@@ -12,15 +12,6 @@ import java.util.Map;
|
|||||||
* @since 2024/12/7
|
* @since 2024/12/7
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractShell {
|
public abstract class AbstractShell {
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取当前支持的内存马功能列表
|
|
||||||
*
|
|
||||||
* @return supported tool lists
|
|
||||||
*/
|
|
||||||
public abstract List<ShellTool> getSupportedShellTools();
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取内存马功能所支持的注入类型列表
|
* 获取内存马功能所支持的注入类型列表
|
||||||
*
|
*
|
||||||
@@ -36,22 +27,6 @@ public abstract class AbstractShell {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 检查 shellConfig 的配置是否有效
|
|
||||||
*
|
|
||||||
* @param shellConfig 内存马生成配置
|
|
||||||
* @return valid
|
|
||||||
*/
|
|
||||||
public boolean isValid(ShellConfig shellConfig) {
|
|
||||||
List<ShellTool> supportedShellTools = getSupportedShellTools();
|
|
||||||
if (!supportedShellTools.contains(shellConfig.getShellTool())) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
List<String> supportedShellTypes = getSupportedShellTypes(shellConfig.getShellTool());
|
|
||||||
return supportedShellTypes.contains(shellConfig.getShellType());
|
|
||||||
}
|
|
||||||
|
|
||||||
public GenerateResult generate(ShellConfig shellConfig, InjectorConfig injectorConfig, ShellToolConfig shellToolConfig) {
|
public GenerateResult generate(ShellConfig shellConfig, InjectorConfig injectorConfig, ShellToolConfig shellToolConfig) {
|
||||||
Pair<Class<?>, Class<?>> shellInjectorPair = getShellInjectorPair(shellConfig.getShellTool(), shellConfig.getShellType());
|
Pair<Class<?>, Class<?>> shellInjectorPair = getShellInjectorPair(shellConfig.getShellTool(), shellConfig.getShellType());
|
||||||
if (shellInjectorPair == null) {
|
if (shellInjectorPair == null) {
|
||||||
|
|||||||
@@ -27,11 +27,6 @@ public class GlassFishShell extends AbstractShell {
|
|||||||
public static final String VALVE = "Valve";
|
public static final String VALVE = "Valve";
|
||||||
public static final String JAKARTA_VALVE = "JakartaValve";
|
public static final String JAKARTA_VALVE = "JakartaValve";
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ShellTool> getSupportedShellTools() {
|
|
||||||
return List.of(ShellTool.Command, ShellTool.Godzilla);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Map<String, Pair<Class<?>, Class<?>>> getCommandShellMap() {
|
protected Map<String, Pair<Class<?>, Class<?>>> getCommandShellMap() {
|
||||||
return Map.of(
|
return Map.of(
|
||||||
|
|||||||
@@ -21,11 +21,6 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
public class JbossShell extends AbstractShell {
|
public class JbossShell extends AbstractShell {
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ShellTool> getSupportedShellTools() {
|
|
||||||
return List.of(ShellTool.Command, ShellTool.Godzilla);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Map<String, Pair<Class<?>, Class<?>>> getCommandShellMap() {
|
protected Map<String, Pair<Class<?>, Class<?>>> getCommandShellMap() {
|
||||||
return Map.of(
|
return Map.of(
|
||||||
|
|||||||
@@ -26,11 +26,6 @@ import static com.reajason.javaweb.memshell.config.Constants.*;
|
|||||||
*/
|
*/
|
||||||
public class JettyShell extends AbstractShell {
|
public class JettyShell extends AbstractShell {
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ShellTool> getSupportedShellTools() {
|
|
||||||
return List.of(ShellTool.Godzilla, ShellTool.Command);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Map<String, Pair<Class<?>, Class<?>>> getCommandShellMap() {
|
protected Map<String, Pair<Class<?>, Class<?>>> getCommandShellMap() {
|
||||||
return Map.of(
|
return Map.of(
|
||||||
|
|||||||
@@ -27,11 +27,6 @@ public class PayaraShell extends AbstractShell {
|
|||||||
public static final String VALVE = "Valve";
|
public static final String VALVE = "Valve";
|
||||||
public static final String JAKARTA_VALVE = "JakartaValve";
|
public static final String JAKARTA_VALVE = "JakartaValve";
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ShellTool> getSupportedShellTools() {
|
|
||||||
return List.of(ShellTool.Command, ShellTool.Godzilla);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Map<String, Pair<Class<?>, Class<?>>> getCommandShellMap() {
|
protected Map<String, Pair<Class<?>, Class<?>>> getCommandShellMap() {
|
||||||
return Map.of(
|
return Map.of(
|
||||||
|
|||||||
@@ -24,10 +24,6 @@ import java.util.Map;
|
|||||||
* @since 2024/12/14
|
* @since 2024/12/14
|
||||||
*/
|
*/
|
||||||
public class ResinShell extends AbstractShell {
|
public class ResinShell extends AbstractShell {
|
||||||
@Override
|
|
||||||
public List<ShellTool> getSupportedShellTools() {
|
|
||||||
return List.of(ShellTool.Godzilla, ShellTool.Command);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Map<String, Pair<Class<?>, Class<?>>> getCommandShellMap() {
|
protected Map<String, Pair<Class<?>, Class<?>>> getCommandShellMap() {
|
||||||
|
|||||||
@@ -24,11 +24,6 @@ public class SpringMVCShell extends AbstractShell {
|
|||||||
public static final String CONTROLLER_HANDLER = "ControllerHandler";
|
public static final String CONTROLLER_HANDLER = "ControllerHandler";
|
||||||
public static final String JAKARTA_CONTROLLER_HANDLER = "JakartaControllerHandler";
|
public static final String JAKARTA_CONTROLLER_HANDLER = "JakartaControllerHandler";
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ShellTool> getSupportedShellTools() {
|
|
||||||
return List.of(ShellTool.Command, ShellTool.Godzilla, ShellTool.Behinder);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Map<String, Pair<Class<?>, Class<?>>> getBehinderShellMap() {
|
protected Map<String, Pair<Class<?>, Class<?>>> getBehinderShellMap() {
|
||||||
return Map.of(
|
return Map.of(
|
||||||
|
|||||||
@@ -33,11 +33,6 @@ public class TomcatShell extends AbstractShell {
|
|||||||
public static final String UPGRADE = "Upgrade";
|
public static final String UPGRADE = "Upgrade";
|
||||||
public static final String EXECUTOR = "Executor";
|
public static final String EXECUTOR = "Executor";
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ShellTool> getSupportedShellTools() {
|
|
||||||
return List.of(ShellTool.Godzilla, ShellTool.Command);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Map<String, Pair<Class<?>, Class<?>>> getCommandShellMap() {
|
protected Map<String, Pair<Class<?>, Class<?>>> getCommandShellMap() {
|
||||||
return Map.of(
|
return Map.of(
|
||||||
|
|||||||
@@ -24,10 +24,6 @@ import java.util.Map;
|
|||||||
* @since 2024/12/10
|
* @since 2024/12/10
|
||||||
*/
|
*/
|
||||||
public class UndertowShell extends AbstractShell {
|
public class UndertowShell extends AbstractShell {
|
||||||
@Override
|
|
||||||
public List<ShellTool> getSupportedShellTools() {
|
|
||||||
return List.of(ShellTool.Command, ShellTool.Godzilla);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Map<String, Pair<Class<?>, Class<?>>> getCommandShellMap() {
|
protected Map<String, Pair<Class<?>, Class<?>>> getCommandShellMap() {
|
||||||
|
|||||||
@@ -24,11 +24,6 @@ import java.util.Map;
|
|||||||
* @since 2024/12/21
|
* @since 2024/12/21
|
||||||
*/
|
*/
|
||||||
public class WebSphereShell extends AbstractShell {
|
public class WebSphereShell extends AbstractShell {
|
||||||
@Override
|
|
||||||
public List<ShellTool> getSupportedShellTools() {
|
|
||||||
return List.of(ShellTool.Command, ShellTool.Godzilla);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Map<String, Pair<Class<?>, Class<?>>> getCommandShellMap() {
|
protected Map<String, Pair<Class<?>, Class<?>>> getCommandShellMap() {
|
||||||
return Map.of(
|
return Map.of(
|
||||||
|
|||||||
Reference in New Issue
Block a user