Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
0.2 version
Browse files Browse the repository at this point in the history
  • Loading branch information
4ra1n committed Sep 13, 2023
1 parent 8242f8a commit 92a07e1
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 29 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,20 @@ GUI 版本的使用和 CLI 版本基本一致,具体参考 README 文件

## 0.2

两个重要功能的更新:
- 支持了`linux`系统
- 支持了自定义加密密钥

更新日志:
- 基于`gcc``nasm`支持`linux x86_64 (amd64)`
- 支持`Windows``Linux`任意密钥加密解密
- 使用`execstack``so`库修改堆栈可执行属性
- 汇编中部分寄存器忘记恢复状态导致某些`JVM`崩溃
- 修复`linux`中字符串处理函数的缓冲区溢出问题
- 修改`README`部分应该使用`-agentpath`启动
- 优化重构`Java`层代码,抽出工具类等
- 避免重复宏定义的问题
- 避免重复宏定义的问题

## 0.3

todo
43 changes: 35 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@
- 原文章没有加入具体的加密算法,仅是简单的运算,需要加强
- 原文章的代码存在一些`BUG`和优化空间

目前的加密解密算法:(可以自行拓展加强)
目前的加密解密算法:
- 汇编实现的多层位运算,交换字节等
- 三次`XXTEA`算法,抽取`10-34`位字节
- 支持自定义密钥

## 构建

Expand All @@ -44,32 +45,58 @@

## 快速开始

加密解密部分使用`C`做一层加密,使用`汇编`二层加密,已提供编译好的`Release`版本`DLL`文件嵌入`Jar`包中
加密解密部分使用`C`做一层加密,使用`汇编`二层加密,已提供编译好的`Release`版本`DLL/SO`文件嵌入`Jar`包中

内置支持是`JDK-8`,其他版本的`JDK`只需要更换`JNI.h`头文件重新编译,新版本已支持`Windows``Linux`两个操作系统
内置支持是`JDK-8`,其他版本的`JDK`只需要更换`JNI.h`头文件重新编译,新版本已支持`Windows``Linux`

加密你的`Jar`包:(指定`Jar`包和`package`加密包名
加密你的`Jar`包:(指定`Jar`包和`package`加密包名以及密钥`key`

```shell
java -jar code-encryptor-plus.jar patch --jar your-jar.jar --package com.your.pack
java -jar code-encryptor-plus.jar patch --jar your-jar.jar --package com.your.pack --key your-key
```

导出解密`DLL`文件:(默认导出到`code-encryptor-plus-temp`目录)
![](img/004.png)

导出解密`DLL/SO`文件:(默认导出到`code-encryptor-plus-temp`目录不建议修改)

```shell
java -jar code-encryptor-plus.jar export
```

使用解密`DLL`启动`Jar`包:(使用`-agentpath`参数)
![](img/005.png)

使用解密`DLL/SO`启动`Jar`包:(使用`-agentpath`参数)

注意必须有两个参数`PACKAGE_NAME``KEY`

```shell
java -agentpath:D:\abs-path\decrypter.dll=PACKAGE_NAME=com.your.pack --jar your-jar.jar
java -agentpath:D:\abs-path\decrypter.dll=PACKAGE_NAME=com.your.pack,KEY=your-key --jar your-jar.jar
```

![](img/006.png)

另外支持了简易的`GUI`版本,选择需要加密的`Jar`文件即可一键加密(仅支持`Windows`版)

![screenshot](img/001.png)

## 更新日志

### 0.2

两个重要功能的更新:
- 支持了`linux`系统
- 支持了自定义加密密钥

更新日志:
- 基于`gcc``nasm`支持`linux x86_64 (amd64)`
- 支持`Windows``Linux`任意密钥加密解密
- 使用`execstack``so`库修改堆栈可执行属性
- 汇编中部分寄存器忘记恢复状态导致某些`JVM`崩溃
- 修复`linux`中字符串处理函数的缓冲区溢出问题
- 修改`README`部分应该使用`-agentpath`启动
- 优化重构`Java`层代码,抽出工具类等
- 避免重复宏定义的问题

## 其他

不适用于`SpringBoot`场景,存在两个问题:
Expand Down
Binary file added img.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 img/004.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 img/005.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 img/006.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 pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.y4sec</groupId>
<artifactId>code-encryptor-plus</artifactId>
<version>0.0.1</version>
<version>0.2</version>

<properties>
<maven.compiler.source>8</maven.compiler.source>
Expand Down
19 changes: 0 additions & 19 deletions script/README.md

This file was deleted.

Binary file modified src/main/resources/decrypter.dll
Binary file not shown.
Binary file modified src/main/resources/encryptor.dll
Binary file not shown.

0 comments on commit 92a07e1

Please sign in to comment.