mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-21 22:50:42 +08:00
style: fmt code
This commit is contained in:
@@ -2,4 +2,4 @@
|
||||
title: AbstractTranslet
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: Agent Jar
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: Base64
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: BCEL
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: BigInteger
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: 表达式注入
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: H2 JDBC URL
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: Hessian 反序列化
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: Jar
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: Java 原生反序列化
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: JSP
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -4,4 +4,4 @@ title: 脚本引擎注入
|
||||
|
||||
### Nashorn ScriptEngine
|
||||
|
||||
### Rhino ScriptEngine
|
||||
### Rhino ScriptEngine
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: 模板注入
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: XMLDecoder
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -4,7 +4,6 @@ title: Java Agent 内存马
|
||||
|
||||
## Java Agent 原理
|
||||
|
||||
|
||||
## Java Agent 内存马实现方案
|
||||
|
||||
## 切点选取
|
||||
|
||||
@@ -187,13 +187,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
3. 添加 JXPathSpringGzipPacker、JXPathSpringGzipPackerJDK17 打包方式(GeoServer 漏洞注入)
|
||||
4. 添加 Base64URLEncoded 打包方式(配合回显马进行小马拉大马测试)
|
||||
5. 支持回显马在进行自定义字节码执行时去除 Java 魔数流量特征
|
||||
```http
|
||||
|
||||
```http
|
||||
/path/code?payload=yv66vgAAADIBVQEAJ29yZy9hcGFj...
|
||||
```
|
||||
```
|
||||
|
||||
改为只需要如下方式
|
||||
|
||||
```http
|
||||
/path/code?payload=IBVQEAJ29yZy9hcGFj...
|
||||
```
|
||||
```
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -274,7 +277,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- 简化 Shell base64 方法代码
|
||||
- Gradle 更新至 8.14.2
|
||||
- 参考 [General Gradle Best Practices](https://docs.gradle.org/current/userguide/best_practices_general.html),将构建脚本改为
|
||||
Kotlin DSL
|
||||
Kotlin DSL
|
||||
|
||||
**Full Changelog:** [v1.9.0...v1.10.0](https://github.com/ReaJason/MemShellParty/compare/v1.9.0...v1.10.0)
|
||||
|
||||
@@ -284,7 +287,7 @@ Kotlin DSL
|
||||
|
||||
- 支持 TongWeb8 内存马生成 by @ReaJason
|
||||
- 通过 context 获取 webAppClassLoader,不再依赖 Thread.currentThread().getContextClassLoader()
|
||||
为请求线程,参考:[任意类加载环境下注入内存马](https://reajason.eu.org/writing/whichclassloaderforshell/)
|
||||
为请求线程,参考:[任意类加载环境下注入内存马](https://reajason.eu.org/writing/whichclassloaderforshell/)
|
||||
- 全面支持使用 ASM 生成 Agent(仅需 92.5 KB),并且可选 JDKAttacher 与 JREAttacher
|
||||
- 支持命令执行自定义实现类,RuntimeExec or ForkAndExec
|
||||
|
||||
@@ -495,4 +498,4 @@ Kotlin DSL
|
||||
- 支持 Tomcat、Jetty、WebLogic、GlassFish、JBoss、Resin 等 18 个中间件或框架的应用内存马
|
||||
- 支持 Filter、Servlet、Listener、NettyHandler、Agent 等常见内存马挂载类型
|
||||
- 支持哥斯拉、冰蝎、命令执行功能
|
||||
- 支持 Base64、Jar、JSP、常见表达式、常见模板引擎、反序列化等打包方式
|
||||
- 支持 Base64、Jar、JSP、常见表达式、常见模板引擎、反序列化等打包方式
|
||||
|
||||
@@ -3,60 +3,59 @@ title: 适配情况
|
||||
icon: Album
|
||||
---
|
||||
|
||||
|
||||
已兼容 Java6 ~ Java8、Java9、Java11、Java17、Java21
|
||||
|
||||
### 中间件以及框架
|
||||
|
||||
| [Tomcat(5 ~ 11)](/docs/server-intro#tomcat) | [Jetty(6 ~ 12)](/docs/server-intro#jetty)| [GlassFish(3 ~ 7)](/docs/server-intro#glassfish) | [Payara(5 ~ 6)](/docs/server-intro#payara)|
|
||||
|----------------------|------------------------|----------------------|----------------------|
|
||||
| Servlet | Servlet | Filter | Filter |
|
||||
| Filter | Filter | Listener | Listener |
|
||||
| Listener | Listener | Valve | Valve |
|
||||
| Valve | Handler | FilterChain - Agent | FilterChain - Agent |
|
||||
| ProxyValve | Customizer | ContextValve - Agent | ContextValve - Agent |
|
||||
| FilterChain - Agent | ServletHandler - Agent | | |
|
||||
| ContextValve - Agent | | | |
|
||||
| Upgrade | | | |
|
||||
| [Tomcat(5 ~ 11)](/docs/server-intro#tomcat) | [Jetty(6 ~ 12)](/docs/server-intro#jetty) | [GlassFish(3 ~ 7)](/docs/server-intro#glassfish) | [Payara(5 ~ 6)](/docs/server-intro#payara) |
|
||||
| --------------------------------------------- | ------------------------------------------- | -------------------------------------------------- | -------------------------------------------- |
|
||||
| Servlet | Servlet | Filter | Filter |
|
||||
| Filter | Filter | Listener | Listener |
|
||||
| Listener | Listener | Valve | Valve |
|
||||
| Valve | Handler | FilterChain - Agent | FilterChain - Agent |
|
||||
| ProxyValve | Customizer | ContextValve - Agent | ContextValve - Agent |
|
||||
| FilterChain - Agent | ServletHandler - Agent | | |
|
||||
| ContextValve - Agent | | | |
|
||||
| Upgrade | | | |
|
||||
|
||||
| [Resin(3 ~ 4)](/docs/server-intro#resin) | [SpringWebMVC](/docs/server-intro#springwebmvc) | [SpringWebFlux](/docs/server-intro#springwebflux) | [XXL-JOB](/docs/server-intro#xxljob) |
|
||||
|---------------------|--------------------------|-----------------|--------------|
|
||||
| Servlet | Interceptor | WebFilter | NettyHandler |
|
||||
| Filter | ControllerHandler | HandlerMethod | |
|
||||
| Listener | FrameworkServlet - Agent | HandlerFunction | |
|
||||
| FilterChain - Agent | | NettyHandler | |
|
||||
| [Resin(3 ~ 4)](/docs/server-intro#resin) | [SpringWebMVC](/docs/server-intro#springwebmvc) | [SpringWebFlux](/docs/server-intro#springwebflux) | [XXL-JOB](/docs/server-intro#xxljob) |
|
||||
| ------------------------------------------ | ----------------------------------------------- | ------------------------------------------------- | ------------------------------------ |
|
||||
| Servlet | Interceptor | WebFilter | NettyHandler |
|
||||
| Filter | ControllerHandler | HandlerMethod | |
|
||||
| Listener | FrameworkServlet - Agent | HandlerFunction | |
|
||||
| FilterChain - Agent | | NettyHandler | |
|
||||
|
||||
| [JBossAS(4 ~ 7)](/docs/server-intro#jboss) | [JBossEAP(6 ~ 8)](/docs/server-intro#undertow)| [WildFly(9 ~ 30)](/docs/server-intro#wildfly) | [Undertow](/docs/server-intro#undertow)|
|
||||
|----------------------|----------------------------|------------------------|------------------------|
|
||||
| Filter | Filter | Servlet | Servlet |
|
||||
| Listener | Listener | Filter | Filter |
|
||||
| Valve | Valve(6) | Listener | Listener |
|
||||
| ProxyValve | FilterChain - Agent (6) | ServletHandler - Agent | ServletHandler - Agent|
|
||||
| FilterChain - Agent | ContextValve - Agent (6) | | |
|
||||
| ContextValve - Agent | ServletHandler - Agent (7) | | |
|
||||
| [JBossAS(4 ~ 7)](/docs/server-intro#jboss) | [JBossEAP(6 ~ 8)](/docs/server-intro#undertow) | [WildFly(9 ~ 30)](/docs/server-intro#wildfly) | [Undertow](/docs/server-intro#undertow) |
|
||||
| -------------------------------------------- | ------------------------------------------------ | ----------------------------------------------- | --------------------------------------- |
|
||||
| Filter | Filter | Servlet | Servlet |
|
||||
| Listener | Listener | Filter | Filter |
|
||||
| Valve | Valve(6) | Listener | Listener |
|
||||
| ProxyValve | FilterChain - Agent (6) | ServletHandler - Agent | ServletHandler - Agent |
|
||||
| FilterChain - Agent | ContextValve - Agent (6) | | |
|
||||
| ContextValve - Agent | ServletHandler - Agent (7) | | |
|
||||
|
||||
| [WebSphere(7 ~ 9)](/docs/server-intro#websphere)| [WebLogic (10.3.6 ~ 14)](/docs/server-intro#weblogic) |
|
||||
|-----------------------|-------------------------|
|
||||
| Servlet | Servlet |
|
||||
| Filter | Filter |
|
||||
| Listener | Listener |
|
||||
| FilterManager - Agent | ServletContext - Agent |
|
||||
| [WebSphere(7 ~ 9)](/docs/server-intro#websphere) | [WebLogic (10.3.6 ~ 14)](/docs/server-intro#weblogic) |
|
||||
| -------------------------------------------------- | ----------------------------------------------------- |
|
||||
| Servlet | Servlet |
|
||||
| Filter | Filter |
|
||||
| Listener | Listener |
|
||||
| FilterManager - Agent | ServletContext - Agent |
|
||||
|
||||
| [BES (9.5.x)](/docs/server-intro#bes)| [TongWeb(6 ~ 8)](/docs/server-intro#tongweb) | [InforSuite AS (9 ~ 10)](/docs/server-intro#inforsuite) |
|
||||
|----------------------|----------------------|------------------------|
|
||||
| Filter | Filter | Filter |
|
||||
| Listener | Listener | Listener |
|
||||
| Valve | Valve | Valve |
|
||||
| FilterChain - Agent | FilterChain - Agent | FilterChain - Agent |
|
||||
| ContextValve - Agent | ContextValve - Agent | ContextValve - Agent |
|
||||
| [BES (9.5.x)](/docs/server-intro#bes) | [TongWeb(6 ~ 8)](/docs/server-intro#tongweb) | [InforSuite AS (9 ~ 10)](/docs/server-intro#inforsuite) |
|
||||
| ------------------------------------- | ---------------------------------------------- | ------------------------------------------------------- |
|
||||
| Filter | Filter | Filter |
|
||||
| Listener | Listener | Listener |
|
||||
| Valve | Valve | Valve |
|
||||
| FilterChain - Agent | FilterChain - Agent | FilterChain - Agent |
|
||||
| ContextValve - Agent | ContextValve - Agent | ContextValve - Agent |
|
||||
|
||||
| [Apusic AS (9 ~ 10)](/docs/server-intro#apusic) | [Primeton (6.5)](/docs/server-intro#primeton)|
|
||||
|---------------------|----------------------|
|
||||
| Servlet | Filter |
|
||||
| Filter | Listener |
|
||||
| Listener | Valve |
|
||||
| FilterChain - Agent | FilterChain - Agent |
|
||||
| | ContextValve - Agent |
|
||||
| [Apusic AS (9 ~ 10)](/docs/server-intro#apusic) | [Primeton (6.5)](/docs/server-intro#primeton) |
|
||||
| ----------------------------------------------- | --------------------------------------------- |
|
||||
| Servlet | Filter |
|
||||
| Filter | Listener |
|
||||
| Listener | Valve |
|
||||
| FilterChain - Agent | FilterChain - Agent |
|
||||
| | ContextValve - Agent |
|
||||
|
||||
### 内存马功能
|
||||
|
||||
@@ -86,4 +85,4 @@ icon: Album
|
||||
- [x] [Agent](/docs/agent-jar)
|
||||
- [x] XXL-JOB Executor
|
||||
- [ ] JNDI
|
||||
- [ ] 其他常见反序列化
|
||||
- [ ] 其他常见反序列化
|
||||
|
||||
@@ -26,8 +26,8 @@ inject(context, shell);
|
||||
内存马类会放进所增强类的 ClassLoader 中,部分中间件会存在模块隔离,无法直接使用部分类,例如 `java.util.Base64`、
|
||||
`javax.crypto.Cipher`。
|
||||
|
||||
| 挂载类型 | 参考实现 |
|
||||
|----------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| 挂载类型 | 参考实现 |
|
||||
| -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Servlet/JakartaServlet | [GodzillaServlet](https://github.com/ReaJason/MemShellParty/blob/master/generator/src/main/java/com/reajason/javaweb/memshell/shelltool/godzilla/GodzillaServlet.java) |
|
||||
| Filter/JakartaFilter | [GodzillaFilter](https://github.com/ReaJason/MemShellParty/blob/master/generator/src/main/java/com/reajason/javaweb/memshell/shelltool/godzilla/GodzillaFilter.java) |
|
||||
| Listener/JakartaListener | [GodzillaListener](https://github.com/ReaJason/MemShellParty/blob/master/generator/src/main/java/com/reajason/javaweb/memshell/shelltool/godzilla/GodzillaListener.java) |
|
||||
@@ -46,14 +46,15 @@ inject(context, shell);
|
||||
| (WAS)AgentFilterManager | [Godzilla](https://github.com/ReaJason/MemShellParty/blob/master/generator/src/main/java/com/reajason/javaweb/memshell/shelltool/godzilla/Godzilla.java) |
|
||||
| (WebLogic)AgentServletContext | [Godzilla](https://github.com/ReaJason/MemShellParty/blob/master/generator/src/main/java/com/reajason/javaweb/memshell/shelltool/godzilla/Godzilla.java) |
|
||||
| (Undertow)AgentServletHandler | [GodzillaUndertowServletHandler](https://github.com/ReaJason/MemShellParty/blob/master/generator/src/main/java/com/reajason/javaweb/memshell/shelltool/godzilla/GodzillaUndertowServletHandler.java) |
|
||||
| (Jetty)Handler | [GodzillaJettyHandler](https://github.com/ReaJason/MemShellParty/blob/master/generator/src/main/java/com/reajason/javaweb/memshell/shelltool/godzilla/GodzillaJettyHandler.java) |
|
||||
| (Jetty)Customizer | [GodzillaJettyCustomizer](https://github.com/ReaJason/MemShellParty/blob/master/generator/src/main/java/com/reajason/javaweb/memshell/shelltool/godzilla/GodzillaJettyCustomizer.java) |
|
||||
| (Struct2)Action | [GodzillaStruct2Action](https://github.com/ReaJason/MemShellParty/blob/master/generator/src/main/java/com/reajason/javaweb/memshell/shelltool/godzilla/GodzillaStruct2Action.java) |
|
||||
| (Tomcat)Upgrade | [CommandUpgrade](https://github.com/ReaJason/MemShellParty/blob/master/generator/src/main/java/com/reajason/javaweb/memshell/shelltool/command/CommandUpgrade.java) |
|
||||
| (Jetty)Handler | [GodzillaJettyHandler](https://github.com/ReaJason/MemShellParty/blob/master/generator/src/main/java/com/reajason/javaweb/memshell/shelltool/godzilla/GodzillaJettyHandler.java) |
|
||||
| (Jetty)Customizer | [GodzillaJettyCustomizer](https://github.com/ReaJason/MemShellParty/blob/master/generator/src/main/java/com/reajason/javaweb/memshell/shelltool/godzilla/GodzillaJettyCustomizer.java) |
|
||||
| (Struct2)Action | [GodzillaStruct2Action](https://github.com/ReaJason/MemShellParty/blob/master/generator/src/main/java/com/reajason/javaweb/memshell/shelltool/godzilla/GodzillaStruct2Action.java) |
|
||||
| (Tomcat)Upgrade | [CommandUpgrade](https://github.com/ReaJason/MemShellParty/blob/master/generator/src/main/java/com/reajason/javaweb/memshell/shelltool/command/CommandUpgrade.java) |
|
||||
|
||||
### 参考步骤
|
||||
|
||||
1. 执行 `git clone https://github.com/ReaJason/MemShellParty.git` 下载当前项目到本地
|
||||
2. 在 memshell/src/main/java/com/reajason/javaweb/memshell/shelltool 创建 custom 目录进行自定义内存马的编写
|
||||
3. 执行 `./gradlew :generator:compileJava` 或 `.\gradlew.bat :generator:compileJava`
|
||||
4. 在 generator/build/classes/java/main/com/reajason/javaweb/memshell/shelltool/custom 下可以找到编译好的类文件
|
||||
5. 在生成界面,选择目标服务 - Custom - 挂载类型,上传 class 文件,选择打包方式并生成
|
||||
5. 在生成界面,选择目标服务 - Custom - 挂载类型,上传 class 文件,选择打包方式并生成
|
||||
|
||||
@@ -6,4 +6,4 @@ icon: CircleAlert
|
||||
|
||||
Hey there! Fumadocs is the docs framework that also works on React Router!
|
||||
|
||||
## Heading
|
||||
## Heading
|
||||
|
||||
@@ -116,6 +116,7 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo
|
||||
```
|
||||
|
||||
调试所用的打印代码默认是写在模板中的,因此当关闭调试模式的时候,我们会使用字节码修改技术对打印调试信息的函数调用进行删除,详细实现可参考:[LogRemoveMethodVisitor.java](https://github.com/ReaJason/MemShellParty/blob/master/memshell-party-common/src/main/java/com/reajason/javaweb/buddy/LogRemoveMethodVisitor.java),也就是把以下三种函数调用给去除
|
||||
|
||||
```java
|
||||
System.out.println(msg) //(printf 还不支持)
|
||||
|
||||
@@ -137,7 +138,8 @@ Logger.info(msg) // (java.util)
|
||||
当开启回显后,会将注入器字节码放置到回显马中,返回一个目标服务类型的回显马,代码执行顺序为:回显马运行 -> 注入器注入 -> 挂载内存马。
|
||||
|
||||
<Callout title="额外注意" type="warn">
|
||||
由于回显马需要从当前线程获取 request 和 response 对象,因此跨线程 RCE 的环境下,无法回显,根据代码执行顺序,无法回显的环境,开启回显模式之后注入器也不会进行注入动作,因此支持回显马但无法回显的环境,请一定不要开启回显模式。
|
||||
由于回显马需要从当前线程获取 request 和 response 对象,因此跨线程 RCE
|
||||
的环境下,无法回显,根据代码执行顺序,无法回显的环境,开启回显模式之后注入器也不会进行注入动作,因此支持回显马但无法回显的环境,请一定不要开启回显模式。
|
||||
</Callout>
|
||||
|
||||
在确认了内存马注入成功后,如果发现连不上,我们需要调整我们的内存马,将错误信息带出,方便排查,内置的 Godzilla 已经默认支持了。
|
||||
@@ -193,10 +195,10 @@ private String getErrorMessage(Throwable throwable) { // [!code ++]
|
||||
} // [!code ++]
|
||||
```
|
||||
|
||||
|
||||
### 绕过模块限制
|
||||
|
||||
JDK9+ 有了模块化系统,严格限制各大函数的调用。注入器在注入内存马时需要使用反射调用 defineClass,不是 java.base 模块无法调用,开启绕过模块限制会在注入器自动插入绕过模块限制的代码。也就是如下这坨代码:
|
||||
|
||||
```java
|
||||
try {
|
||||
Class<?> unsafeClass = Class.forName("sun.misc.Unsafe");
|
||||
@@ -229,7 +231,6 @@ try {
|
||||
3. javac 去除调试信息:6658 长度
|
||||
4. ASM SKIP_DEBUG:**6349** 长度
|
||||
|
||||
|
||||
#### Javassist 去除属性
|
||||
|
||||
由于 Javassist 被用于各类反序列化字节码工具中,因此使用最为广泛,以下字节码缩小代码被广为流传
|
||||
@@ -324,4 +325,4 @@ static {
|
||||
}
|
||||
```
|
||||
|
||||
这样使得部分漏洞 sink 点为 `Class.forName(name, true, classLoader);` 的场景也能正常触发内存马注入了。
|
||||
这样使得部分漏洞 sink 点为 `Class.forName(name, true, classLoader);` 的场景也能正常触发内存马注入了。
|
||||
|
||||
@@ -4,4 +4,4 @@ title: Jetty
|
||||
|
||||
## Handler 内存马
|
||||
|
||||
## Customizer 内存马
|
||||
## Customizer 内存马
|
||||
|
||||
@@ -4,4 +4,4 @@ title: Tomcat Valve
|
||||
|
||||
## Valve 内存马
|
||||
|
||||
## ProxyValve 内存马
|
||||
## ProxyValve 内存马
|
||||
|
||||
@@ -104,7 +104,7 @@ public class WebSocketConfig implements ServerApplicationConfig {
|
||||
.build();
|
||||
|
||||
result.add(config);
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -147,6 +147,7 @@ public class WsSci implements ServletContainerInitializer {
|
||||
```
|
||||
|
||||
代码中有两个关键的地方:
|
||||
|
||||
1. init 方法中,注册的 WsServerContainer 对象会被放入 ServletContext 中,key 为 "javax.websocket.server.ServerContainer",高版本为 "jakarta.websocket.server.ServerContainer"。
|
||||
2. 调用 WsServerContainer 的 addEndpoint 方法注册 Endpoint。
|
||||
|
||||
@@ -218,7 +219,7 @@ public class WsFilter implements Filter {
|
||||
}
|
||||
|
||||
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
|
||||
if (this.sc.areEndpointsRegistered()
|
||||
if (this.sc.areEndpointsRegistered()
|
||||
&& UpgradeUtil.isWebSocketUpgradeRequest(request, response)) {
|
||||
HttpServletRequest req = (HttpServletRequest)request;
|
||||
HttpServletResponse resp = (HttpServletResponse)response;
|
||||
@@ -237,8 +238,8 @@ public class WsFilter implements Filter {
|
||||
public class UpgradeUtil {
|
||||
|
||||
public static boolean isWebSocketUpgradeRequest(ServletRequest request, ServletResponse response) {
|
||||
return request instanceof HttpServletRequest
|
||||
&& response instanceof HttpServletResponse
|
||||
return request instanceof HttpServletRequest
|
||||
&& response instanceof HttpServletResponse
|
||||
&& headerContainsToken((HttpServletRequest)request, "Upgrade", "websocket") // [!code highlight]
|
||||
&& "GET".equals(((HttpServletRequest)request).getMethod());
|
||||
}
|
||||
@@ -372,4 +373,4 @@ private void inject(Object context, Object obj) throws Exception {
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [Command 内存马使用教程](/docs/shelltool/command) - 了解如何生成和使用 WebSocket 命令执行内存马
|
||||
- [Command 内存马使用教程](/docs/shelltool/command) - 了解如何生成和使用 WebSocket 命令执行内存马
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: 介绍
|
||||
---
|
||||
|
||||
打包
|
||||
打包
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: 核心配置项
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -17,7 +17,7 @@ Hello World
|
||||
</Cards>
|
||||
|
||||
```ts
|
||||
console.log('I love React!');
|
||||
console.log("I love React!");
|
||||
```
|
||||
|
||||
### Heading
|
||||
@@ -43,7 +43,7 @@ Hello World
|
||||
</Cards>
|
||||
|
||||
```ts
|
||||
console.log('I love React!');
|
||||
console.log("I love React!");
|
||||
```
|
||||
|
||||
### Heading
|
||||
@@ -69,7 +69,7 @@ Hello World
|
||||
</Cards>
|
||||
|
||||
```ts
|
||||
console.log('I love React!');
|
||||
console.log("I love React!");
|
||||
```
|
||||
|
||||
### Heading
|
||||
@@ -95,7 +95,7 @@ Hello World
|
||||
</Cards>
|
||||
|
||||
```ts
|
||||
console.log('I love React!');
|
||||
console.log("I love React!");
|
||||
```
|
||||
|
||||
### Heading
|
||||
@@ -121,7 +121,7 @@ Hello World
|
||||
</Cards>
|
||||
|
||||
```ts
|
||||
console.log('I love React!');
|
||||
console.log("I love React!");
|
||||
```
|
||||
|
||||
### Heading
|
||||
@@ -147,7 +147,7 @@ Hello World
|
||||
</Cards>
|
||||
|
||||
```ts
|
||||
console.log('I love React!');
|
||||
console.log("I love React!");
|
||||
```
|
||||
|
||||
### Heading
|
||||
@@ -173,7 +173,7 @@ Hello World
|
||||
</Cards>
|
||||
|
||||
```ts
|
||||
console.log('I love React!');
|
||||
console.log("I love React!");
|
||||
```
|
||||
|
||||
### Heading
|
||||
@@ -199,7 +199,7 @@ Hello World
|
||||
</Cards>
|
||||
|
||||
```ts
|
||||
console.log('I love React!');
|
||||
console.log("I love React!");
|
||||
```
|
||||
|
||||
### Heading
|
||||
@@ -225,7 +225,7 @@ Hello World
|
||||
</Cards>
|
||||
|
||||
```ts
|
||||
console.log('I love React!');
|
||||
console.log("I love React!");
|
||||
```
|
||||
|
||||
### Heading
|
||||
@@ -251,7 +251,7 @@ Hello World
|
||||
</Cards>
|
||||
|
||||
```ts
|
||||
console.log('I love React!');
|
||||
console.log("I love React!");
|
||||
```
|
||||
|
||||
### Heading
|
||||
@@ -277,7 +277,7 @@ Hello World
|
||||
</Cards>
|
||||
|
||||
```ts
|
||||
console.log('I love React!');
|
||||
console.log("I love React!");
|
||||
```
|
||||
|
||||
### Heading
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: Apusic
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: GlassFish
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: Jetty
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: Resin
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: SpringWebMVC
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: Struct2
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: Tomcat
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: TongWeb
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: Undertow
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: WebLogic
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: WebSphere
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
+12
-17
@@ -4,30 +4,25 @@ icon: BrainCircuit
|
||||
description: 适合集成到已有工具中,实现内存马 payload 的生成,支持 JDK8 以上版本,v1.7.0 开始支持
|
||||
---
|
||||
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
|
||||
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
|
||||
|
||||
> 具体代码可参考 [examples](https://github.com/ReaJason/MemShellParty/tree/master/examples)
|
||||
|
||||
### 添加依赖
|
||||
|
||||
<Tabs items={['Maven', 'Gradle']}>
|
||||
<Tab>
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>io.github.reajason</groupId>
|
||||
<artifactId>generator</artifactId>
|
||||
<version>2.2.0</version>
|
||||
</dependency>
|
||||
```
|
||||
</Tab>
|
||||
<Tab>
|
||||
```groovy
|
||||
implementation 'io.github.reajason:generator:2.2.0'
|
||||
```
|
||||
</Tab>
|
||||
<Tabs items={["Maven", "Gradle"]}>
|
||||
<Tab>
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>io.github.reajason</groupId>
|
||||
<artifactId>generator</artifactId>
|
||||
<version>2.2.0</version>
|
||||
</dependency>
|
||||
```
|
||||
</Tab>
|
||||
<Tab>```groovy implementation 'io.github.reajason:generator:2.2.0' ```</Tab>
|
||||
</Tabs>
|
||||
|
||||
|
||||
### 生成 Tomcat Godzilla Filter 内存马示例
|
||||
|
||||
```java
|
||||
|
||||
@@ -77,7 +77,7 @@ docker buildx build \
|
||||
--build-arg ROUTE_ROOT_PATH=/memshell-party \
|
||||
--build-arg CONTEXT_PATH=/memshell-party \
|
||||
-t memshell-party:latest . --load
|
||||
|
||||
|
||||
# 自定义路径构建镜像启动,访问 127.0.0.1:8080/memshell-party
|
||||
docker run -it -p 8080:8080 \
|
||||
-e BOOT_OPTS=--server.servlet.context-path=/memshell-party \
|
||||
@@ -103,4 +103,4 @@ location /memshell-party {
|
||||
proxy_buffers 8 64k;
|
||||
proxy_busy_buffers_size 128k;
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
@@ -4,7 +4,7 @@ description: 部署你专有的 MemShellParty
|
||||
icon: Rocket
|
||||
---
|
||||
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
|
||||
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
|
||||
|
||||
## Docker 部署
|
||||
|
||||
@@ -12,21 +12,20 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
|
||||
|
||||
使用 docker 部署之后,使用浏览器访问:http://127.0.0.1:8080
|
||||
|
||||
<Tabs items={['Docker Hub 源', 'Github Container Registry 源', '南大 Github Container Registry 镜像源']}>
|
||||
<Tabs
|
||||
items={["Docker Hub 源", "Github Container Registry 源", "南大 Github Container Registry 镜像源"]}
|
||||
>
|
||||
<Tab>
|
||||
```bash
|
||||
docker run --pull=always --rm -it -d -p 8080:8080 --name memshell-party reajason/memshell-party:latest
|
||||
```
|
||||
```bash docker run --pull=always --rm -it -d -p 8080:8080 --name memshell-party
|
||||
reajason/memshell-party:latest ```
|
||||
</Tab>
|
||||
<Tab>
|
||||
```bash
|
||||
docker run --pull=always --rm -it -d -p 8080:8080 --name memshell-party ghcr.io/reajason/memshell-party:latest
|
||||
```
|
||||
```bash docker run --pull=always --rm -it -d -p 8080:8080 --name memshell-party
|
||||
ghcr.io/reajason/memshell-party:latest ```
|
||||
</Tab>
|
||||
<Tab>
|
||||
```bash
|
||||
docker run --pull=always --rm -it -d -p 8080:8080 --name memshell-party ghcr.nju.edu.cn/reajason/memshell-party:latest
|
||||
```
|
||||
```bash docker run --pull=always --rm -it -d -p 8080:8080 --name memshell-party
|
||||
ghcr.nju.edu.cn/reajason/memshell-party:latest ```
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
@@ -60,4 +59,4 @@ java -jar --add-opens=java.base/java.util=ALL-UNNAMED \
|
||||
--add-opens=java.xml/com.sun.org.apache.xalan.internal.xsltc.trax=ALL-UNNAMED \
|
||||
--add-opens=java.xml/com.sun.org.apache.xalan.internal.xsltc.runtime=ALL-UNNAMED \
|
||||
boot-x.x.x.jar --server.port=999
|
||||
```
|
||||
```
|
||||
|
||||
@@ -26,19 +26,19 @@ Tomcat 使用的是自己 Catalina 模块提供的 Servlets 实现,限制较
|
||||
<div className="tomcat-version-table">
|
||||
<figure>
|
||||
|
||||
| Version | Servlet | JakartaServlet | Filter | JakartaFilter | Listener | JakartaListener | Valve | JakartaValve | ProxyValve | JakartaProxyValve | WebSocket | JakartaWebSocket | Upgrade | AgentFilterChain | AgentContextValve |
|
||||
|-----|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
|
||||
| Tomcat 5.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | | | | ✔️ | ✔️ |
|
||||
| Tomcat 6.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | | | | ✔️ | ✔️ |
|
||||
| Tomcat 7.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | | ✔️ | ✔️ |
|
||||
| Tomcat 8.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ |
|
||||
| Tomcat 9.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ |
|
||||
| Tomcat 10.x | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| Tomcat 11.x | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| Spring Boot 1.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ |
|
||||
| Spring Boot 2.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ |
|
||||
| Spring Boot 3.x | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| BES 9.5.1 | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | | ✔️ | ✔️ |
|
||||
| Version | Servlet | JakartaServlet | Filter | JakartaFilter | Listener | JakartaListener | Valve | JakartaValve | ProxyValve | JakartaProxyValve | WebSocket | JakartaWebSocket | Upgrade | AgentFilterChain | AgentContextValve |
|
||||
| --------------- | :-----: | :------------: | :----: | :-----------: | :------: | :-------------: | :---: | :----------: | :--------: | :---------------: | :-------: | :--------------: | :-----: | :--------------: | :---------------: |
|
||||
| Tomcat 5.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | | | | ✔️ | ✔️ |
|
||||
| Tomcat 6.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | | | | ✔️ | ✔️ |
|
||||
| Tomcat 7.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | | ✔️ | ✔️ |
|
||||
| Tomcat 8.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ |
|
||||
| Tomcat 9.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ |
|
||||
| Tomcat 10.x | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| Tomcat 11.x | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| Spring Boot 1.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ |
|
||||
| Spring Boot 2.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ |
|
||||
| Spring Boot 3.x | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| BES 9.5.1 | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | | ✔️ | ✔️ |
|
||||
|
||||
<figcaption align="center">表 1:Tomcat 各版本内存马挂载类型参考表</figcaption>
|
||||
</figure>
|
||||
@@ -66,19 +66,19 @@ Jetty6 版本使用的包名为 `org.mortbay.jetty`,而 7 以上使用的是 `
|
||||
<div className="jetty-version-table">
|
||||
<figure>
|
||||
|
||||
| Version | Servlet | JakartaServlet | Filter | JakartaFilter | Listener | JakartaListener | Handler | JakartaHandler | Customizer | AgentHandler |
|
||||
|-----|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
|
||||
| Jetty 6.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | | ✔️ |
|
||||
| Jetty 7.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | | ✔️ |
|
||||
| Jetty 8.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | | ✔️ |
|
||||
| Jetty 9.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ |
|
||||
| Jetty 10.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ |
|
||||
| Jetty 11.x | | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ |
|
||||
| Jetty 12.x ee8 | ✔️ | | ✔️ | | ✔️ | | ✔️ | | | ✔️ |
|
||||
| Jetty 12.x ee9~ee11 | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ |
|
||||
| Spring Boot 1.x/2.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ |
|
||||
| Spring Boot 3.0.x/3.1.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ |
|
||||
| Spring Boot 3.2.x+ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ |
|
||||
| Version | Servlet | JakartaServlet | Filter | JakartaFilter | Listener | JakartaListener | Handler | JakartaHandler | Customizer | AgentHandler |
|
||||
| ----------------------- | :-----: | :------------: | :----: | :-----------: | :------: | :-------------: | :-----: | :------------: | :--------: | :----------: |
|
||||
| Jetty 6.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | | ✔️ |
|
||||
| Jetty 7.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | | ✔️ |
|
||||
| Jetty 8.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | | ✔️ |
|
||||
| Jetty 9.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ |
|
||||
| Jetty 10.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ |
|
||||
| Jetty 11.x | | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ |
|
||||
| Jetty 12.x ee8 | ✔️ | | ✔️ | | ✔️ | | ✔️ | | | ✔️ |
|
||||
| Jetty 12.x ee9~ee11 | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ |
|
||||
| Spring Boot 1.x/2.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ |
|
||||
| Spring Boot 3.0.x/3.1.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ |
|
||||
| Spring Boot 3.2.x+ | | ✔️ | | ✔️ | | ✔️ | | ✔️ | | ✔️ |
|
||||
|
||||
<figcaption align="center">表 2:Jetty 各版本内存马挂载类型参考表</figcaption>
|
||||
</figure>
|
||||
@@ -106,11 +106,11 @@ JBoss 分为 JBossAS 和 JBossEAP,JBossAS 全版本和 JBossEAP6 使用的 Cat
|
||||
<div className="jboss-version-table">
|
||||
<figure>
|
||||
|
||||
| Version | Filter | Listener | Valve | ProxyValve | AgentFilterChain | AgentContextValve |
|
||||
|---|:---:|:---:|:---:|:---:|:---:|:---:|
|
||||
| JBoss 4.x | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| JBoss AS 5.x ~ 7.x | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| JBoss EAP 6.x | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| Version | Filter | Listener | Valve | ProxyValve | AgentFilterChain | AgentContextValve |
|
||||
| ------------------ | :----: | :------: | :---: | :--------: | :--------------: | :---------------: |
|
||||
| JBoss 4.x | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| JBoss AS 5.x ~ 7.x | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| JBoss EAP 6.x | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
|
||||
<figcaption align="center">表 3:JBoss 各版本内存马挂载类型参考表</figcaption>
|
||||
</figure>
|
||||
@@ -138,14 +138,14 @@ Undertow 是 JBoss 社区开发的高性能 Java Web 服务器,Wildfly 以及
|
||||
<div className="undertow-version-table">
|
||||
<figure>
|
||||
|
||||
| Version | Servlet | JakartaServlet | Filter | JakartaFilter | Listener | JakartaListener | AgentServletHandler |
|
||||
|-----|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
|
||||
| Undertow 1.x ~ 2.2.x | ✔️ | | ✔️ | | ✔️ | | ✔️ |
|
||||
| Undertow 2.3.x+ | | ✔️ | | ✔️ | | ✔️ | ✔️ |
|
||||
| JBoss EAP 7.x | ✔️ | | ✔️ | | ✔️ | | ✔️ |
|
||||
| JBoss EAP 8.x | | ✔️ | | ✔️ | | ✔️ | ✔️ |
|
||||
| WildFly 9.x ~ 26.x | ✔️ | | ✔️ | | ✔️ | | ✔️ |
|
||||
| WildFly 27.x+ | | ✔️ | | ✔️ | | ✔️ | ✔️ |
|
||||
| Version | Servlet | JakartaServlet | Filter | JakartaFilter | Listener | JakartaListener | AgentServletHandler |
|
||||
| -------------------- | :-----: | :------------: | :----: | :-----------: | :------: | :-------------: | :-----------------: |
|
||||
| Undertow 1.x ~ 2.2.x | ✔️ | | ✔️ | | ✔️ | | ✔️ |
|
||||
| Undertow 2.3.x+ | | ✔️ | | ✔️ | | ✔️ | ✔️ |
|
||||
| JBoss EAP 7.x | ✔️ | | ✔️ | | ✔️ | | ✔️ |
|
||||
| JBoss EAP 8.x | | ✔️ | | ✔️ | | ✔️ | ✔️ |
|
||||
| WildFly 9.x ~ 26.x | ✔️ | | ✔️ | | ✔️ | | ✔️ |
|
||||
| WildFly 27.x+ | | ✔️ | | ✔️ | | ✔️ | ✔️ |
|
||||
|
||||
<figcaption align="center">表 4:Undertow 各版本内存马挂载类型参考表</figcaption>
|
||||
</figure>
|
||||
@@ -168,14 +168,14 @@ GlassFish 进行内存马的生成。
|
||||
<div className="glassfish-version-table">
|
||||
<figure>
|
||||
|
||||
| Version | Filter | JakartaFilter | Listener | JakartaListener | Valve | JakartaValve | AgentFilterChain | AgentContextValve |
|
||||
|-----|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
|
||||
| GlassFish 4.x ~ 5.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ |
|
||||
| GlassFish 6.x+ | | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ |
|
||||
| Payara 5.x+ | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ |
|
||||
| Payara 6.x+ | | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ |
|
||||
| Apusic V10 | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ |
|
||||
| Primeton V6.5 | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ |
|
||||
| Version | Filter | JakartaFilter | Listener | JakartaListener | Valve | JakartaValve | AgentFilterChain | AgentContextValve |
|
||||
| ------------------- | :----: | :-----------: | :------: | :-------------: | :---: | :----------: | :--------------: | :---------------: |
|
||||
| GlassFish 4.x ~ 5.x | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ |
|
||||
| GlassFish 6.x+ | | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ |
|
||||
| Payara 5.x+ | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ |
|
||||
| Payara 6.x+ | | ✔️ | | ✔️ | | ✔️ | ✔️ | ✔️ |
|
||||
| Apusic V10 | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ |
|
||||
| Primeton V6.5 | ✔️ | | ✔️ | | ✔️ | | ✔️ | ✔️ |
|
||||
|
||||
<figcaption align="center">表 5:GlassFish 各版本内存马挂载类型参考表</figcaption>
|
||||
</figure>
|
||||
@@ -202,10 +202,10 @@ Resin 使用的包名为 `com.caucho.`,泛微 OA 使用的就是 Resin,服
|
||||
|
||||
<figure>
|
||||
|
||||
| Version | Filter | Listener | AgentFilterChain |
|
||||
|-----|:---:|:---:|:---:|
|
||||
| Resin 3.x | ✔️ | ✔️ | ✔️ |
|
||||
| Resin 4.x | ✔️ | ✔️ | ✔️ |
|
||||
| Version | Filter | Listener | AgentFilterChain |
|
||||
| --------- | :----: | :------: | :--------------: |
|
||||
| Resin 3.x | ✔️ | ✔️ | ✔️ |
|
||||
| Resin 4.x | ✔️ | ✔️ | ✔️ |
|
||||
|
||||
<figcaption align="center">表 6:Resin 各版本内存马挂载类型参考表</figcaption>
|
||||
</figure>
|
||||
@@ -218,11 +218,11 @@ WebLogic 使用的包名为 `weblogic.`,服务类型选择 WebLogic 进行内
|
||||
|
||||
<figure>
|
||||
|
||||
| Version | Filter | Listener | AgentServletContext |
|
||||
|-----|:---:|:---:|:---:|
|
||||
| WebLogic 10.3.6 | ✔️ | ✔️ | ✔️ |
|
||||
| WebLogic 12.x | ✔️ | ✔️ | ✔️ |
|
||||
| WebLogic 14.x | ✔️ | ✔️ | ✔️ |
|
||||
| Version | Filter | Listener | AgentServletContext |
|
||||
| --------------- | :----: | :------: | :-----------------: |
|
||||
| WebLogic 10.3.6 | ✔️ | ✔️ | ✔️ |
|
||||
| WebLogic 12.x | ✔️ | ✔️ | ✔️ |
|
||||
| WebLogic 14.x | ✔️ | ✔️ | ✔️ |
|
||||
|
||||
<figcaption align="center">表 7:WebLogic 各版本内存马挂载类型参考表</figcaption>
|
||||
</figure>
|
||||
@@ -236,11 +236,11 @@ WebSphere 是 IBM 研发的商用 Servlets 容器,开源版本为 Websphere li
|
||||
|
||||
<figure>
|
||||
|
||||
| Version | Filter | Listener | AgentFilterManager |
|
||||
|-----|:---:|:---:|:---:|
|
||||
| WebSphere 7.x | ✔️ | ✔️ | ✔️(需要开启 debug 模式才允许 attach) |
|
||||
| WebSphere 8.x | ✔️ | ✔️ | ✔️ |
|
||||
| WebSphere 9.x | ✔️ | ✔️ | ✔️ |
|
||||
| Version | Filter | Listener | AgentFilterManager |
|
||||
| ------------- | :----: | :------: | :------------------------------------: |
|
||||
| WebSphere 7.x | ✔️ | ✔️ | ✔️(需要开启 debug 模式才允许 attach) |
|
||||
| WebSphere 8.x | ✔️ | ✔️ | ✔️ |
|
||||
| WebSphere 9.x | ✔️ | ✔️ | ✔️ |
|
||||
|
||||
<figcaption align="center">表 8:WebSphere 各版本内存马挂载类型参考表</figcaption>
|
||||
</figure>
|
||||
@@ -255,10 +255,10 @@ BES 进行内存马的生成。
|
||||
|
||||
<figure>
|
||||
|
||||
| Version | Filter | Listener | Valve | AgentFilterChain | AgentContextValve |
|
||||
|---|:---:|:---:|:---:|:---:|:---:|
|
||||
| BES 9.5.2 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| BES 9.5.5 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| Version | Filter | Listener | Valve | AgentFilterChain | AgentContextValve |
|
||||
| --------- | :----: | :------: | :---: | :--------------: | :---------------: |
|
||||
| BES 9.5.2 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| BES 9.5.5 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
|
||||
<figcaption align="center">表 9:BES 各版本内存马挂载类型参考表</figcaption>
|
||||
</figure>
|
||||
@@ -277,11 +277,11 @@ TongWeb 东方通,其基于 Tomcat 进行二开,并且在最初的 6 版本
|
||||
|
||||
<figure>
|
||||
|
||||
| Version | Filter | Listener | Valve | AgentFilterChain | AgentContextValve |
|
||||
|---|:---:|:---:|:---:|:---:|:---:|
|
||||
| TongWeb 6.x | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| TongWeb 7.x | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| TongWeb 8.x | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| Version | Filter | Listener | Valve | AgentFilterChain | AgentContextValve |
|
||||
| ----------- | :----: | :------: | :---: | :--------------: | :---------------: |
|
||||
| TongWeb 6.x | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| TongWeb 7.x | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| TongWeb 8.x | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
|
||||
<figcaption align="center">表 10:TongWeb 各版本内存马挂载类型参考表</figcaption>
|
||||
</figure>
|
||||
@@ -296,10 +296,10 @@ Apusic 进行内存马生成,Apusic10 版本选择 [GlassFish](#glassfish) 进
|
||||
|
||||
<figure>
|
||||
|
||||
| Version | Filter | Listener | AgentFilterChain |
|
||||
|---|:---:|:---:|:---:|
|
||||
| Apusic 9.0 | ✔️ | ✔️ | ✔️ |
|
||||
| Apusic 9.0.1 | ✔️ | ✔️ | ✔️ |
|
||||
| Version | Filter | Listener | AgentFilterChain |
|
||||
| ------------ | :----: | :------: | :--------------: |
|
||||
| Apusic 9.0 | ✔️ | ✔️ | ✔️ |
|
||||
| Apusic 9.0.1 | ✔️ | ✔️ | ✔️ |
|
||||
|
||||
<figcaption align="center">表 11:Apusic 各版本内存马挂载类型参考表</figcaption>
|
||||
</figure>
|
||||
@@ -319,10 +319,10 @@ iasFilterConfigs 因此 Filter 注入单独进行了适配。服务类型选择
|
||||
|
||||
<figure>
|
||||
|
||||
| Version | Filter | Listener | Valve | AgentFilterChain | AgentContextValve |
|
||||
|---|:---:|:---:|:---:|:---:|:---:|
|
||||
| InforSuite 9| ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| InforSuite 10 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| Version | Filter | Listener | Valve | AgentFilterChain | AgentContextValve |
|
||||
| ------------- | :----: | :------: | :---: | :--------------: | :---------------: |
|
||||
| InforSuite 9 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| InforSuite 10 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
|
||||
<figcaption align="center">表 12:InforSuite 各版本内存马挂载类型参考表</figcaption>
|
||||
</figure>
|
||||
@@ -336,12 +336,12 @@ SpringWebMVC 进行内存马生成。
|
||||
<div className="springwebmvc-version-table">
|
||||
<figure>
|
||||
|
||||
| Version | Interceptor | JakartaInterceptor | ControllerHandler | JakartaControllerHandler | AgentFrameworkServlet |
|
||||
|---|:---:|:---:|:---:|:---:|:---:|
|
||||
| SpringWebMVC 3.x ~ 5.x| ✔️ | | ✔️ | | ✔️ |
|
||||
| Spring Boot 1.x/2.x | ✔️ | | ✔️ | | ✔️ |
|
||||
| SpringWebMVC 6.x | | ✔️ | | ✔️ | ✔️ |
|
||||
| Spring Boot 3.x | | ✔️ | | ✔️ | ✔️ |
|
||||
| Version | Interceptor | JakartaInterceptor | ControllerHandler | JakartaControllerHandler | AgentFrameworkServlet |
|
||||
| ---------------------- | :---------: | :----------------: | :---------------: | :----------------------: | :-------------------: |
|
||||
| SpringWebMVC 3.x ~ 5.x | ✔️ | | ✔️ | | ✔️ |
|
||||
| Spring Boot 1.x/2.x | ✔️ | | ✔️ | | ✔️ |
|
||||
| SpringWebMVC 6.x | | ✔️ | | ✔️ | ✔️ |
|
||||
| Spring Boot 3.x | | ✔️ | | ✔️ | ✔️ |
|
||||
|
||||
<figcaption align="center">表 13:SpringWebMVC 各版本内存马挂载类型参考表</figcaption>
|
||||
</figure>
|
||||
@@ -359,10 +359,9 @@ SpringWebMVC 进行内存马生成。
|
||||
Spring Boot 项目中基于 reactor 异步 IO 模型的服务组件,底层使用的 Netty,一般常见于各种 SpringCloud 项目,例如网关。服务类型选择
|
||||
SpringWebFlux 进行内存马生成。
|
||||
|
||||
|
||||
## XXL-JOB
|
||||
|
||||
> 官网:https://www.xuxueli.com/xxl-job/
|
||||
|
||||
XXL-JOB 是一个分布式任务调度平台,由于 executor 出现过反序列化漏洞,并且弱密码情况下可在 admin 前台下发任务,在 executor 执行任意代码,因此在 MemShellParty 中也提供了 XXL-JOB 内存马的生成,服务类型选择 XXL-JOB 进行内存马生成。
|
||||
executor 仅支持 Netty Handler 内存马注入。
|
||||
executor 仅支持 Netty Handler 内存马注入。
|
||||
|
||||
@@ -8,4 +8,4 @@ title: Apusic AS
|
||||
|
||||
## 动态添加 Filter
|
||||
|
||||
## 动态添加 Listener
|
||||
## 动态添加 Listener
|
||||
|
||||
@@ -6,4 +6,4 @@ title: BES
|
||||
|
||||
## 动态添加 Filter
|
||||
|
||||
## 动态添加 Listener
|
||||
## 动态添加 Listener
|
||||
|
||||
@@ -6,4 +6,4 @@ title: GlassFish
|
||||
|
||||
## 动态添加 Filter
|
||||
|
||||
## 动态添加 Listener
|
||||
## 动态添加 Listener
|
||||
|
||||
@@ -8,4 +8,4 @@ title: InforSuite AS
|
||||
|
||||
## 动态添加 Filter
|
||||
|
||||
## 动态添加 Listener
|
||||
## 动态添加 Listener
|
||||
|
||||
@@ -6,4 +6,4 @@ title: JBoss
|
||||
|
||||
## 动态添加 Filter
|
||||
|
||||
## 动态添加 Listener
|
||||
## 动态添加 Listener
|
||||
|
||||
@@ -8,4 +8,4 @@ title: Jetty
|
||||
|
||||
## 动态添加 Filter
|
||||
|
||||
## 动态添加 Listener
|
||||
## 动态添加 Listener
|
||||
|
||||
@@ -8,4 +8,4 @@ title: Resin
|
||||
|
||||
## 动态添加 Filter
|
||||
|
||||
## 动态添加 Listener
|
||||
## 动态添加 Listener
|
||||
|
||||
@@ -8,4 +8,4 @@ title: Tomcat
|
||||
|
||||
## 动态添加 Filter
|
||||
|
||||
## 动态添加 Listener
|
||||
## 动态添加 Listener
|
||||
|
||||
@@ -8,4 +8,4 @@ title: TongWeb
|
||||
|
||||
## 动态添加 Filter
|
||||
|
||||
## 动态添加 Listener
|
||||
## 动态添加 Listener
|
||||
|
||||
@@ -6,4 +6,4 @@ title: Undertow
|
||||
|
||||
## 动态添加 Filter
|
||||
|
||||
## 动态添加 Listener
|
||||
## 动态添加 Listener
|
||||
|
||||
@@ -8,4 +8,4 @@ title: WebLogic
|
||||
|
||||
## 动态添加 Filter
|
||||
|
||||
## 动态添加 Listener
|
||||
## 动态添加 Listener
|
||||
|
||||
@@ -8,4 +8,4 @@ title: WebSphere
|
||||
|
||||
## 动态添加 Filter
|
||||
|
||||
## 动态添加 Listener
|
||||
## 动态添加 Listener
|
||||
|
||||
@@ -63,7 +63,7 @@ public interface Filter {
|
||||
|
||||
shell 的目的,就是为了定义一个入口,我们能与 Web 服务器进行交互。在 Filter 中我们就是实现 doFilter 来满足需求,以下定义了一个命令回显的 FilterShell。
|
||||
|
||||
1. 一般而言,我们会为 FilterShell 注册 url-pattern 为 `/*`,这样无论访问哪个路径都能被调用到,而且为了绕过登录过滤器,我们会把 FilterShell 注册为 FilterChain 中的第一个过滤器。
|
||||
1. 一般而言,我们会为 FilterShell 注册 url-pattern 为 `/*`,这样无论访问哪个路径都能被调用到,而且为了绕过登录过滤器,我们会把 FilterShell 注册为 FilterChain 中的第一个过滤器。
|
||||
2. 交互的入口是 `request.getParameter` 支持两种方式传参。GET/POST 请求发送 `/?paramName=whoami`,也可以发送 POST 请求时使用 `application/x-www-form-urlencoded` 发送 body 参数。`multipart/form-data` 是不支持从 `request.getParameter` 获取参数的。
|
||||
3. 当 Filter 注册的 url-pattern 为 `/*` 时,我们拿到 cmd 参数,就可以执行命令并填充响应对象 `return` 结束请求,而在拿不到参数的时候就必须调用 `chain.doFilter(servletRequest, servletResponse)`,否则正常的业务就不会被执行。
|
||||
|
||||
|
||||
@@ -11,18 +11,15 @@ title: Java Servlet 规范内存马
|
||||
## Servlet 三大 Web 组件
|
||||
|
||||
<Cards>
|
||||
<Card
|
||||
href="/docs/servlet/servlet"
|
||||
title="Servlet 内存马"
|
||||
>创建独特的 entrypoint 访问路径</Card>
|
||||
<Card
|
||||
href="/docs/servlet/filter"
|
||||
title="Filter 内存马"
|
||||
>过滤器,遇事不决写点特别的东西然后中断请求</Card>
|
||||
<Card
|
||||
href="/docs/servlet/listener"
|
||||
title="Listener 内存马"
|
||||
>监听器,请求创建时触发,拿请求体和响应体做不该做的事情</Card>
|
||||
<Card href="/docs/servlet/servlet" title="Servlet 内存马">
|
||||
创建独特的 entrypoint 访问路径
|
||||
</Card>
|
||||
<Card href="/docs/servlet/filter" title="Filter 内存马">
|
||||
过滤器,遇事不决写点特别的东西然后中断请求
|
||||
</Card>
|
||||
<Card href="/docs/servlet/listener" title="Listener 内存马">
|
||||
监听器,请求创建时触发,拿请求体和响应体做不该做的事情
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
## ServletContext
|
||||
|
||||
@@ -6,18 +6,18 @@ title: Listener
|
||||
|
||||
Servlet 事件监听器支持当 ServletContext、HttpSession 和 ServletRequest 状态变更时发送事件通知。每个事件类型的监听器都支持多个,并且开发者可以指定监听器的调用顺序。
|
||||
|
||||
| Listener 接口类 | 描述 |
|
||||
|--------------------------------------------------|---------------------------------|
|
||||
| javax.servlet.ServletContextListener | 在 ServletContext 创建以及销毁时 |
|
||||
| javax.servlet.ServletContextAttributeListener | 在 ServletContext 添加、移除或替换属性时 |
|
||||
| javax.servlet.http.HttpSessionListener | 在 HttpSession 创建和销毁时 |
|
||||
| javax.servlet.http.HttpSessionAttributeListener | 在 HttpSession 上添加、移除或替换属性 |
|
||||
| javax.servlet.http.HttpSessionIdListener | 在 HttpSession id 变化时 |
|
||||
| javax.servlet.http.HttpSessionActivationListener | 在 HttpSession 激活或钝化时 |
|
||||
| javax.servlet.http.HttpSessionBindingListener | 在 HttpSession 上对象绑定或解绑时 |
|
||||
| javax.servlet.ServletRequestListener | 在 ServletRequest 在将要被 Web 容器处理时 |
|
||||
| javax.servlet.ServletRequestAttributeListener | 在 ServletRequest 上添加、移除或替换属性时 |
|
||||
| javax.servlet.AsyncListener | 在异步操作开始、超时或完成时 |
|
||||
| Listener 接口类 | 描述 |
|
||||
| ------------------------------------------------ | ------------------------------------------ |
|
||||
| javax.servlet.ServletContextListener | 在 ServletContext 创建以及销毁时 |
|
||||
| javax.servlet.ServletContextAttributeListener | 在 ServletContext 添加、移除或替换属性时 |
|
||||
| javax.servlet.http.HttpSessionListener | 在 HttpSession 创建和销毁时 |
|
||||
| javax.servlet.http.HttpSessionAttributeListener | 在 HttpSession 上添加、移除或替换属性 |
|
||||
| javax.servlet.http.HttpSessionIdListener | 在 HttpSession id 变化时 |
|
||||
| javax.servlet.http.HttpSessionActivationListener | 在 HttpSession 激活或钝化时 |
|
||||
| javax.servlet.http.HttpSessionBindingListener | 在 HttpSession 上对象绑定或解绑时 |
|
||||
| javax.servlet.ServletRequestListener | 在 ServletRequest 在将要被 Web 容器处理时 |
|
||||
| javax.servlet.ServletRequestAttributeListener | 在 ServletRequest 上添加、移除或替换属性时 |
|
||||
| javax.servlet.AsyncListener | 在异步操作开始、超时或完成时 |
|
||||
|
||||
## ServletRequestListener
|
||||
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
{
|
||||
"title": "Java Servlet 规范内存马",
|
||||
"pages": [
|
||||
"servlet",
|
||||
"filter",
|
||||
"listener",
|
||||
"---Servlet 容器---",
|
||||
"...(container)"
|
||||
]
|
||||
"pages": ["servlet", "filter", "listener", "---Servlet 容器---", "...(container)"]
|
||||
}
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: AntSword
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: Behinder
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
title: Command
|
||||
description: 可以让我们执行任意非交互式命令并回显命令结果的内存马。
|
||||
---
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps';
|
||||
|
||||
import { Step, Steps } from "fumadocs-ui/components/steps";
|
||||
|
||||
## WebSocket 内存马
|
||||
|
||||
@@ -11,6 +12,7 @@ import { Step, Steps } from 'fumadocs-ui/components/steps';
|
||||
### 选择 Command 并填写参数
|
||||
|
||||

|
||||
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
@@ -34,6 +36,7 @@ Connected (press CTRL+C to quit)
|
||||
|
||||
>
|
||||
```
|
||||
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
@@ -44,6 +47,7 @@ Connected (press CTRL+C to quit)
|
||||
### 选择 Command 并填写参数
|
||||
|
||||

|
||||
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
@@ -77,5 +81,6 @@ Connected (press CTRL+C to quit)
|
||||
|
||||
>
|
||||
```
|
||||
|
||||
</Step>
|
||||
</Steps>
|
||||
</Steps>
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Godzilla
|
||||
description: Godzilla 是继 Behinder 之后的又一加密 webshell 巨作,其提供的丰富的内置插件和高度解耦的插件模块化系统使得 Godzilla 二开遍地开花。
|
||||
---
|
||||
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps';
|
||||
import { Step, Steps } from "fumadocs-ui/components/steps";
|
||||
|
||||
<Callout type="info">项目地址:https://github.com/BeichenDream/Godzilla</Callout>
|
||||
|
||||
@@ -18,6 +18,7 @@ import { Step, Steps } from 'fumadocs-ui/components/steps';
|
||||
由于 Godzilla 的超强兼容性,使得其能修改服务端代码适配各种各样的环境,因此 Godzilla 是默认首选的内存马工具。
|
||||
|
||||

|
||||
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
@@ -27,6 +28,7 @@ import { Step, Steps } from 'fumadocs-ui/components/steps';
|
||||
2. 为了防止正常业务进入 Godzilla 内存马影响到正常业务,需要指定流量特征进入 Godzilla 内存马逻辑处理,此处使用特定请求头和请求值来标识,默认情况下是 User-Agent,请求值会随机生成
|
||||
|
||||

|
||||
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
@@ -43,6 +45,7 @@ import { Step, Steps } from 'fumadocs-ui/components/steps';
|
||||
3. 点击测试连接尝试连接,连接成功即可点击添加到 shell 管理界面
|
||||
|
||||

|
||||
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
@@ -55,6 +58,7 @@ import { Step, Steps } from 'fumadocs-ui/components/steps';
|
||||
目前仅支持 Tomcat,当选中 Tomcat Godzilla,可以在内存马挂载类型处选择 WebSocket 内存马
|
||||
|
||||

|
||||
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
@@ -78,6 +82,7 @@ import { Step, Steps } from 'fumadocs-ui/components/steps';
|
||||
如果你是用是哥斯拉特战版,需要注意请求地址不要写 path 只写 ip:host,密码处填 path 即 `/app/g-ws`
|
||||
|
||||

|
||||
|
||||
</Step>
|
||||
|
||||
</Steps>
|
||||
</Steps>
|
||||
|
||||
@@ -1,12 +1,4 @@
|
||||
{
|
||||
"title": "内存马工具",
|
||||
"pages": [
|
||||
"godzilla",
|
||||
"suo5",
|
||||
"behinder",
|
||||
"command",
|
||||
"antsword",
|
||||
"neoregeorg",
|
||||
"proxy"
|
||||
]
|
||||
"pages": ["godzilla", "suo5", "behinder", "command", "antsword", "neoregeorg", "proxy"]
|
||||
}
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: Neo-ReGeorg
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
---
|
||||
title: Proxy
|
||||
---
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps';
|
||||
|
||||
import { Step, Steps } from "fumadocs-ui/components/steps";
|
||||
|
||||
参考地址:https://github.com/veo/wsMemShell/blob/main/static/websocketproxy.md
|
||||
|
||||
@@ -12,6 +13,7 @@ import { Step, Steps } from 'fumadocs-ui/components/steps';
|
||||
### 选择 Proxy
|
||||
|
||||

|
||||
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
@@ -35,6 +37,7 @@ https://github.com/go-gost/gost
|
||||
```bash
|
||||
> curl -x socks5h://127.0.0.1:1080 https://www.baidu.com
|
||||
```
|
||||
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
@@ -45,6 +48,7 @@ https://github.com/go-gost/gost
|
||||
### 选择 Proxy 并填写参数
|
||||
|
||||

|
||||
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
@@ -97,5 +101,6 @@ chains:
|
||||
```bash
|
||||
> curl -x socks5h://127.0.0.1:1080 https://www.baidu.com
|
||||
```
|
||||
|
||||
</Step>
|
||||
</Steps>
|
||||
</Steps>
|
||||
|
||||
@@ -3,28 +3,28 @@ title: Suo5
|
||||
description: Suo5 是一款久经实战检验的高性能 HTTP 正向代理工具,持续打磨只为解决一个需求:不出网场景下的稳定正向代理。
|
||||
---
|
||||
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps';
|
||||
import { Step, Steps } from "fumadocs-ui/components/steps";
|
||||
|
||||
<Callout type="info">项目地址:https://github.com/zema1/suo5</Callout>
|
||||
<Callout type="success">原理介绍:[https://koalr.me/posts/suo5-a-hign-performace-http-socks/](https://web.archive.org/web/20250430113018/https://koalr.me/posts/suo5-a-hign-performace-http-socks/)</Callout>
|
||||
|
||||
<Callout type="success">
|
||||
原理介绍:[https://koalr.me/posts/suo5-a-hign-performace-http-socks/](https://web.archive.org/web/20250430113018/https://koalr.me/posts/suo5-a-hign-performace-http-socks/)
|
||||
</Callout>
|
||||
|
||||

|
||||
|
||||
|
||||
## 主要特性
|
||||
|
||||
- **优异的传输性能**
|
||||
- 全双工:借助双向 Chunked-Encoding 实现单连接双向通信,传输性能接近 FRP
|
||||
- 半双工:下行长连接 + 上行短连接实现,在 Nginx 反代场景下仍可保持良好性能
|
||||
- 短链接:上下行均使用短连接,适配多层反代和严格限制长连接的场景,作为兜底方案
|
||||
- 全双工:借助双向 Chunked-Encoding 实现单连接双向通信,传输性能接近 FRP
|
||||
- 半双工:下行长连接 + 上行短连接实现,在 Nginx 反代场景下仍可保持良好性能
|
||||
- 短链接:上下行均使用短连接,适配多层反代和严格限制长连接的场景,作为兜底方案
|
||||
- **复杂网络环境支持**
|
||||
- 支持一层、两层、多层反向代理下的稳定连接
|
||||
- 支持通过流量转发和请求重试来支持负载均衡场景
|
||||
- 支持配置上游代理(HTTP/SOCKS5)
|
||||
- 支持一层、两层、多层反向代理下的稳定连接
|
||||
- 支持通过流量转发和请求重试来支持负载均衡场景
|
||||
- 支持配置上游代理(HTTP/SOCKS5)
|
||||
- **稳定可靠的工程实现**
|
||||
- 正确可靠的连接控制、并发管理、心跳保活、异常重连等
|
||||
- 完善的单元测试和集成测试保障质量
|
||||
- 正确可靠的连接控制、并发管理、心跳保活、异常重连等
|
||||
- 完善的单元测试和集成测试保障质量
|
||||
|
||||
## 使用步骤
|
||||
|
||||
@@ -57,6 +57,7 @@ Suo5 目前有 [1.x](https://github.com/zema1/suo5/releases/tag/v1.3.1) 版本
|
||||
在 [zema1/suo5/releases](https://github.com/zema1/suo5/releases) 下载合适的 suo5 客户端
|
||||
|
||||
1. 如果请求头使用默认的 User-Agent,则直接通过 `--ua "xXksjas"` 来指定即可,假设生成的为 `User-Agent: xXksjas`,则通过以下命令进行连接
|
||||
|
||||
```bash
|
||||
$ ./suo5 -t http://target.com/suo5.jsp --ua "xXksjas"
|
||||
...
|
||||
@@ -71,7 +72,9 @@ $ ./suo5 -t http://target.com/suo5.jsp --ua "xXksjas"
|
||||
[INFO] 14:28 connection closed, 127.0.0.1:0
|
||||
[INFO] 14:28 congratulations! everything works fine
|
||||
```
|
||||
|
||||
2. 如果请求头使用其他,例如 Referer,则需要使用 `-H "Referer: xXksjas"` 来连接,例如
|
||||
|
||||
```bash
|
||||
$ ./suo5 -t http://target.com/suo5.jsp -H "Referer: xXksjas"
|
||||
...
|
||||
@@ -88,5 +91,5 @@ $ ./suo5 -t http://target.com/suo5.jsp -H "Referer: xXksjas"
|
||||
```
|
||||
|
||||
3. 后续的用法可参考官方仓库给出的 [Suo5 使用指南](https://github.com/zema1/suo5#%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97)
|
||||
</Step>
|
||||
</Steps>
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
@@ -29,4 +29,3 @@ HandlerMapping 里面决定了我们 Handler 应该如何注册进去的核心
|
||||
2. **org.springframework.web.servlet.function.support.HandlerFunctionAdapter**:需要 handler 继承 org.springframework.web.servlet.function.HandlerFunction。
|
||||
3. **org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter**:需要 handler 继承 org.springframework.web.HttpRequestHandler。
|
||||
4. **org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter**:需要 handler 继承 org.springframework.web.servlet.mvc.Controller。
|
||||
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: WebFlux HandlerFunction
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: WebFlux HandlerMethod
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -44,7 +44,7 @@ public class A {
|
||||
private A4 a4;
|
||||
private B1 b1;
|
||||
private B6 b6;
|
||||
|
||||
|
||||
// 通过构造方式注入
|
||||
public A(A2 a2, A4, a4, B1 b1, B6 b6) {
|
||||
this.a2 = a2;
|
||||
@@ -89,6 +89,7 @@ ApplicationContext 是 BeanFactory 的子接口。在漏洞注入中我们常用
|
||||
Spirng WebMVC 对 Java Servlet 规范进行封装实现 MVC 架构,可以部署在任意实现 Java Servlet 规范的容器上。
|
||||
|
||||
通过 org.springframework.web.servlet.DispatcherServlet 配置 `/*` 的 urlPattern,实现接管业务访问入口,让所有流量进入 Spring WebMVC 框架。其中最重要的方法是 `doDispatcher`,可以从中窥视 Spring WebMVC 处理请求的主流程。
|
||||
|
||||
```java
|
||||
protected void doDispatch(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
HttpServletRequest processedRequest = request;
|
||||
@@ -126,7 +127,7 @@ protected void doDispatch(HttpServletRequest request, HttpServletResponse respon
|
||||
catch (Throwable err) {
|
||||
// ...
|
||||
}
|
||||
|
||||
|
||||
// 对返回的 ModelAndView 进行封装转为响应流放回给用户
|
||||
processDispatchResult(processedRequest, response, mappedHandler, mv, dispatchException);
|
||||
}
|
||||
@@ -159,18 +160,14 @@ protected HandlerExecutionChain getHandler(HttpServletRequest request) throws Ex
|
||||
我们最常注入的就是 Controller 内存马和 Interceptor 内存马。参考 [SpringWeb 内存马变型 - 银针安全](https://mp.weixin.qq.com/s/aWTcq3690F3CmGGo4A-a0w) 也可以实现其他内存马。
|
||||
|
||||
<Cards>
|
||||
<Card
|
||||
href="/docs/springweb/controller"
|
||||
title="Controller 内存马"
|
||||
>控制器,创建独特的 entrypoint 访问路径</Card>
|
||||
<Card
|
||||
href="/docs/springweb/interceptor"
|
||||
title="Interceptor 内存马"
|
||||
>拦截器,命中 webshell 逻辑中断请求</Card>
|
||||
<Card href="/docs/springweb/controller" title="Controller 内存马">
|
||||
控制器,创建独特的 entrypoint 访问路径
|
||||
</Card>
|
||||
<Card href="/docs/springweb/interceptor" title="Interceptor 内存马">
|
||||
拦截器,命中 webshell 逻辑中断请求
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
|
||||
|
||||
### Spring WebFlux
|
||||
|
||||
> [官方文档 - Spring WebFlux](https://docs.spring.io/spring-framework/reference/web/webflux.html)
|
||||
@@ -203,20 +200,16 @@ WebFlux 中同样可以使用 `@Controller` 和 `@RequestMapping`,因此也有
|
||||
当然底层使用的 Netty 提供的 HTTP 服务,因此也有 Netty Handler 马可以打,所以 WebFlux 常见的内存马就是 WebFilter、HandlerMethod、HandlerFunction 和 NettyHandler 马。
|
||||
|
||||
<Cards>
|
||||
<Card
|
||||
href="/docs/springweb/webfilter"
|
||||
title="WebFilter 内存马"
|
||||
>过滤器,总是需要一种方式对所有进入的请求进行处理</Card>
|
||||
<Card
|
||||
href="/docs/springweb/handler-method"
|
||||
title="HandlerMethod 内存马"
|
||||
>@RequestMapping,WebMVC 式创建路由的方式</Card>
|
||||
<Card
|
||||
href="/docs/springweb/handler-function"
|
||||
title="HandlerFunction 内存马"
|
||||
>RouterFunction,函数式路由声明方式</Card>
|
||||
<Card
|
||||
href="/docs/springweb/netty-handler"
|
||||
title="Netty Handler 内存马"
|
||||
>Netty Handler API 允许处理 request 和 response</Card>
|
||||
</Cards>
|
||||
<Card href="/docs/springweb/webfilter" title="WebFilter 内存马">
|
||||
过滤器,总是需要一种方式对所有进入的请求进行处理
|
||||
</Card>
|
||||
<Card href="/docs/springweb/handler-method" title="HandlerMethod 内存马">
|
||||
@RequestMapping,WebMVC 式创建路由的方式
|
||||
</Card>
|
||||
<Card href="/docs/springweb/handler-function" title="HandlerFunction 内存马">
|
||||
RouterFunction,函数式路由声明方式
|
||||
</Card>
|
||||
<Card href="/docs/springweb/netty-handler" title="Netty Handler 内存马">
|
||||
Netty Handler API 允许处理 request 和 response
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: WebMVC Interceptor
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: WebFlux Netty Handler
|
||||
---
|
||||
|
||||
WIP
|
||||
WIP
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: WebFlux WebFilter
|
||||
---
|
||||
|
||||
hello
|
||||
hello
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: Struct2 框架内存马
|
||||
---
|
||||
|
||||
## Action 内存马
|
||||
## Action 内存马
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
title: 项目结构
|
||||
---
|
||||
|
||||
hello
|
||||
hello
|
||||
|
||||
Reference in New Issue
Block a user