Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加了新功能 #3

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build and Release Jar

on:
push:
tags:
- 'v*.*.*' # 当推送符合此模式的标签时触发

jobs:
build_and_release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: 设置 JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'

- name: 授予 gradlew 执行权限
run: chmod +x ./gradlew

- name: 使用 Gradle 构建 JAR
run: ./gradlew shadowJar

- name: 上传构建产物到工作流
uses: actions/upload-artifact@v2
with:
name: package
path: build/libs/iCrypto-*-SNAPSHOT-all.jar

- name: 下载构建产物
uses: actions/download-artifact@v2
with:
name: package
path: build/libs

- name: 创建并发布 GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
files: build/libs/iCrypto-*-SNAPSHOT-all.jar
token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ bin/
.vscode/

### Mac OS ###
.DS_Store
.DS_Store
.idea/
11 changes: 0 additions & 11 deletions .idea/artifacts/iCrypto_jar.xml

This file was deleted.

16 changes: 0 additions & 16 deletions .idea/gradle.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/inspectionProfiles/Project_Default.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/kotlinc.xml

This file was deleted.

10 changes: 0 additions & 10 deletions .idea/misc.xml

This file was deleted.

124 changes: 0 additions & 124 deletions .idea/uiDesigner.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

43 changes: 30 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

| 解密前 | 解密后 |
| ------------------------------------------------------------ | ------------------------------------------------------------ |
| ![image-20231010131805227](.assets/image-20231010131805227.png) | ![image-20231010131850918](.assets/image-20231010131850918.png) |
| ![image-20231010131805227](assets/image-20231010131805227.png) | ![image-20231010131850918](assets/image-20231010131850918.png) |



Expand All @@ -23,33 +23,38 @@

### 自动加解密

只需勾上`自动执行脚本`,并在指定脚本添加监控URL即可(**只支持域名**)
只需勾上`自动执行脚本`,并在指定脚本添加监控URL即可

![image-20231010132015761](.assets/image-20231010132015761.png)
![image-20231010132015761](assets/image-20231010132015761.png)

自动加解密的结果可以在`History`、`Repeater`中查看

![image-20231010132304258](.assets/image-20231010132304258.png)
![image-20231010132304258](assets/image-20231010132304258.png)

![image-20231010132429622](.assets/image-20231010132429622.png)
![image-20231010132429622](assets/image-20231010132429622.png)


### 手动加解密
自动加解密可能存在一些性能问题,有时候可以尝试手动加解密:

![image-20231010132626519](.assets/image-20231010132626519.png)
![image-20231010132626519](assets/image-20231010132626519.png)



## 脚本编写指南

插件调用脚本为:
* 插件调用脚本为:

```shell
执行命令 请求类型 临时文件夹
python c:/tools/Decryption.py --operationType 请求类型 --dataDir 临时文件夹
```
* 插件还支持其他自定义参数,可以直接在burp数据包中选中内容,给参数设置值。

其中,第一个参数为 `请求类型`,一共有四种类型:
```shell
node c:/tools/Decryption.cjs --operationType 请求类型 --dataDir 临时文件夹 --initToken 6c34da399cbcfbb71d86c72215942759
```

* 其中,`--operationType`参数为 `请求类型`,一共有四种类型:

```js
const RequestFromClient = "0";// 日志/Interrupt收到请求(请求包解密)
Expand All @@ -58,11 +63,11 @@ const ResponseFromServer = "2";// 日志/Repeater/Interrupt收到响应(响应
const ResponseToClient = "3";// Repeater/Interrupt发出响应(响应包加密
```

可以根据burp的生命周期来理解这四种类型:
> 可以根据burp的生命周期来理解这四种类型:

![image-20231010132700553](.assets/image-20231010132700553.png)
![image-20231010132700553](assets/image-20231010132700553.png)

第二个参数为临时文件夹,数据如下
* `--dataDir`参数为临时文件夹,目录下有如下文件

| 名称 | 解释 | 举例 | 在哪种请求下存在 |
| :------------------- | ------------------------ | --------------------- | ---------------- |
Expand All @@ -77,7 +82,18 @@ const ResponseToClient = "3";// Repeater/Interrupt发出响应(响应包加密
| state.txt | 响应包的响应代码 | 404 | Response |
| state_msg.txt | 响应包的响应消息 | Not Found |Response|

脚本在收到请求后,去修改对应临时文件夹的数据,处理成功,必须输出`success`字样

* 其他参数需要根据脚本需求,自定义编写,通过插件的设置界面,在设置中添加自定义参数,同时支持通过历史纪录去标记设置参数值。
> `--operationType`和`--dataDir`不需要单独添加。

![alt text](assets/iShot_2024-08-29_09.16.44.png)

> 可以在任何页面中,右键选择内容,对参数值进行设置,也可以手动填写。

![alt text](assets/iShot_2024-08-29_09.19.44.png)


* 脚本在收到请求后,去修改对应临时文件夹的数据,处理成功,必须输出`success`字样

## 脚本调试指南

Expand All @@ -87,6 +103,7 @@ const ResponseToClient = "3";// Repeater/Interrupt发出响应(响应包加密
## 案例&模板

- [Sm4](./examples/SM4加解密)
- [AES多参数](./examples/AES加解密)

## 协议

Expand Down
Binary file added assets/iShot_2024-08-29_09.16.44.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/iShot_2024-08-29_09.19.44.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
}

group = 'net.ankio'
version = '1.0-SNAPSHOT'
version = '1.1-SNAPSHOT'

repositories {
mavenCentral()
Expand Down
Loading