Skip to content

本项目针对Android APK DEX控制流混淆,在不会改变应用原有逻辑的前提下,会将原始代码进行控制流混淆,使得代码难以阅读,增加反编译阅读的难度以达到保护应用。

License

Notifications You must be signed in to change notification settings

xunijun/BlackObfuscator

 
 

Repository files navigation

DEX控制流混淆 · BlackObfuscator

本项目针对Android APK DEX控制流混淆,在不会改变应用原有逻辑的前提下,会将原始代码进行控制流混淆,使得代码难以阅读,增加反编译阅读的难度以达到保护应用。

项目声明

  • 本项目基于 dex2jar 进行修改
  • 目前是基础最简单的混淆版本,测试稳定性为主,后续将持续更新升级。

注意事项

  • 本项目基于dex2jar,为了出现转换过程中避免不必要的问题,请尽量混淆自己业务的代码,避免其余三方库一起混淆。

如何使用

Main#main

参数 解释
-d 混淆深度,越高混淆越深
-i 输入dex
-o 输出dex
-a 规则文件,见下一步骤
-p 与规则文件相同,此处可便捷提供一个需要提供混淆的路径
    BlackObfuscatorCmd.main("d2j-black-obfuscator",
            "-d", "2",
            "-i", "/Users/milk/Documents/classes.dex",
            "-o", "/Users/milk/Documents/classes_out.dex",
            "-a", "filter.txt");

混淆规则

提供需要混淆的类

#it is annotation
#cn.kaicity

#package
cn.kaicity.gk.cdk.BuildConfig

#class
cn.kaicity

后续计划

  • 支持 android studio,打包自动化混淆
  • 更高强度的混淆

效果展示

混淆前

xx

混淆后

xx xx

感谢

License

Copyright 2021 Milk

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

本项目针对Android APK DEX控制流混淆,在不会改变应用原有逻辑的前提下,会将原始代码进行控制流混淆,使得代码难以阅读,增加反编译阅读的难度以达到保护应用。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 89.3%
  • Smali 9.4%
  • GAP 0.8%
  • Jasmin 0.3%
  • ANTLR 0.2%
  • Shell 0.0%