AI prompts
base on 一款支持自定义的 Java 回显载荷生成工具|A customizable Java echo payload generation tool. <h4 align="right"><strong><a href="jeg-docs/README_EN.md">English</a></strong> | 中文 </h4>
<p align="center">
<h1 align="center">Java Echo Generator</h1>
<div align="center">
<img alt="GitHub watchers" src="https://img.shields.io/github/watchers/pen4uin/java-echo-generator?style=flat-square">
<img alt="GitHub forks" src="https://img.shields.io/github/forks/pen4uin/java-echo-generator?style=flat-square">
<img alt="GitLab Stars" src="https://img.shields.io/github/stars/pen4uin/java-echo-generator.svg?style=flat-square">
</div>
<div align="center">一款支持高度自定义的 Java 回显载荷生成工具</div>
</p>
<br>
> [!WARNING]
> 本工具仅供安全研究和学习使用。使用者需自行承担因使用此工具产生的所有法律及相关责任。请确保你的行为符合当地的法律和规定。作者不承担任何责任。如不接受,请勿使用此工具。
<br>
## 功能
| 中间件 | 框架 | 执行模式 | 输出格式 |
|-----------|-----------|---------|------------|
| Tomcat | SpringMVC | Command | BASE64 |
| Resin | Struts2 | Code | BCEL |
| WebLogic | | | BIGINTEGER |
| Jetty | | | CLASS |
| WebSphere | | | JAR |
| Undertow | | | JS |
| GlassFish | | | |
## 编译
```shell
mvn package assembly:single
```
## 使用
**图形化**
1. 下载 jEG-GUI-1.0.0.jar 运行即可
![image-20230928161217950](./jeg-docs/img/gui.png)
**Woodpecker 插件**
1. 下载 jEG-Woodpecker-1.0.0.jar 到 woodpecker 插件目录下即可
![image-20230928153330494](./jeg-docs/img/woodpecker-plugin.png)
**第三方库**
1. 下载 jEG-Core-1.0.0.jar 并安装到本地 maven 仓库
```
mvn install:install-file -Dfile=jEG-Core-1.0.0.jar -DgroupId=jeg -DartifactId=jeg-core -Dversion=1.0.0 -Dpackaging=jar
```
2. 引入自己的框架/工具的依赖中
```
<dependency>
<groupId>jeg</groupId>
<artifactId>jeg-core</artifactId>
<version>1.0.0</version>
</dependency>
```
3. 调用 API 生成需要的回显载荷即可
```
// 基本配置
jEGConfig config = new jEGConfig() {{
// 设置待回显的中间件为 tomcat
setServerType(Constants.SERVER_TOMCAT);
// 设置待执行的 payload 为命令执行回显
setModelType(Constants.MODEL_CMD);
// 设置 payload 的输出格式为 BASE64
setFormatType(Constants.FORMAT_BASE64);
// 初始化基础配置
build();
}};
// 生成 payload
jEGenerator generator = new jEGenerator(config);
System.out.println("请求头: " + config.getReqHeaderName());
System.out.println(generator.getPayload());
```
## 文档
- [jEG v1.0.0 - 高度自定义的 Java 回显生成工具](./jeg-docs/1.0.0/)
## 致谢
- https://gv7.me/articles/2020/semi-automatic-mining-request-implements-multiple-middleware-echo/
- https://gist.github.com/fnmsd/8165cedd9fe735d7ef438b2e977af327
- https://github.com/feihong-cs/Java-Rce-Echo
## 协议
- MIT", Assign "at most 3 tags" to the expected json: {"id":"10619","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"