Black Obfuscator is an obfuscator for Android APK DexFile

Overview

DEX控制流混淆 · BlackObfuscator

English Version

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

项目声明

  • 本项目基于 dex2jar 进行修改
  • 目前是基础最简单的混淆版本(仅打散if),测试稳定性为主,后续将持续更新升级。
  • Black系列交流群:390562046(QQ)

注意事项

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

Android Studio插件支持

目前本项目已集成Android Studio插件,支持打包自动化混淆。详情请移至:BlackObfuscator-ASPlugin

如何使用

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

#class
cn.kaicity.gk.cdk.BuildConfig

#package
cn.kaicity

后续计划

  • 更高强度的混淆
  • 开发GUI

效果展示

混淆前

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.
You might also like...
a version of the official Android openssl setup to build standalone for use in app

OpenSSL on the Android platform. --- The code in this directory is based on $OPENSSL_VERSION in the file openssl.version. See patches/README for more

A port of gnupg to Android (UNMAINTAINED!)

Gnu Privacy Guard for Android A port of the whole GnuPG 2.1 suite to Android. If you are using these tools in your own apps, we'd love to hear about i

OpenPGP for Android

APG (Android Privacy Guard) APG originally brought email encryption to the Android platform. In recent years the project has fallen asleep, but a lot

Analyze any Android/Java based app or game
Analyze any Android/Java based app or game

ClassyShark Introduction ClassyShark is a standalone binary inspection tool for Android developers. It can reliably browse any Android executable and

Android virtual machine and deobfuscator
Android virtual machine and deobfuscator

Simplify Generic Android Deobfuscator Simplify virtually executes an app to understand its behavior and then tries to optimize the code so that it beh

enjarify 8.6 0.0 L5 Python Enjarify is a tool for translating Dalvik bytecode to equivalent Java bytecode. This allows Java analysis tools to analyze Android applications.

Note: This repository may be out of date. Future development will occur at https://github.com/Storyyeller/enjarify. Introduction Enjarify is a tool fo

CLI tool for decompiling Android apps to Java. It does resources! It does Java! Its real easy!

Easy-as-pie Android Decompiler Why One stop shop I got pretty tired of decompiling Android apps with a bunch of steps that I had to remember all the t

Unlock an Android phone (or device) by bruteforcing the lockscreen PIN.
Unlock an Android phone (or device) by bruteforcing the lockscreen PIN.

Unlock an Android phone (or device) by bruteforcing the lockscreen PIN. Turn your Kali Nethunter phone into a bruteforce PIN cracker for Android devices! (no root, no adb)

A Java ePub reader and parser framework for Android.
A Java ePub reader and parser framework for Android.

FolioReader-Android is an EPUB reader written in Java and Kotlin. Features Custom Fonts Custom Text Size Themes / Day mode / Night mode Text Highlight

Comments
  • 混淆工具报错

    混淆工具报错

    命令行方式进行混淆 black-obfuscator.bat d2j-black-obfuscator -a filter.txt -d 2 -i classes.dex -o out.dex

    错误如下

            at org.jf.dexlib2.writer.DexWriter.writeAnnotationDirectories(DexWriter.java:698)
            at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:267)
            at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:246)
            at org.jf.DexLib2Utils.saveDexFileDexLib2(DexLib2Utils.java:116)
            at org.jf.DexLib2Utils.splitDex(DexLib2Utils.java:79)
            at com.googlecode.dex2jar.tools.BlackObfuscatorCmd.doCommandLine(BlackObfuscatorCmd.java:103)
            at com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:290)
            at com.googlecode.dex2jar.tools.BlackObfuscatorCmd.main(BlackObfuscatorCmd.java:38)
    
    opened by blueb0ne 1
  • Support new function: blackList

    Support new function: blackList

    Support blackList in rules file. When you add a package/class start with "!" in rule file, it will be added in blackList. BlackObfuscator will not obfuscate the package/class that in blackList.

    e.g.

    #package cn.kaicity

    #blackList !cn.kaicity.sdk

    opened by frost-lotus 0
Releases(2.1)
Owner
null
Java bytecode obfuscator created by x4e.

Binscure Java bytecode obfuscator created by x4e. Usage First, create a config file, (example config here). When you have a config file, run binscure

null 35 Nov 22, 2022
Latest release of the Binsecure obfuscator.

Binsecure-1.8.3 Latest release of the Binsecure obfuscator. If you build and attempt to run, it will crash. This is because the licensing system is st

null 44 Dec 3, 2022
BlackDex is an Android unpack tool, it supports Android 5.0~12 and need not rely to any environment. BlackDex can run on any Android mobile phones or emulators, you can unpack APK File in several seconds.

BlackDex is an Android unpack tool, it supports Android 5.0~12 and need not rely to any environment. BlackDex can run on any Android mobile phones or emulators, you can unpack APK File in several seconds.

null 4.3k Jan 2, 2023
A android app for encrypting apk

A android app for encrypting apk

FlyingYu 124 Jan 5, 2023
Simple API to perform AES encryption on Android. This is the Android counterpart to the AESCrypt library Ruby and Obj-C (with the same weak security defaults :( ) created by Gurpartap Singh. https://github.com/Gurpartap/aescrypt

AESCrypt-Android Simple API to perform AES encryption on Android with no dependancies. This is the Android counterpart to the AESCrypt library Ruby an

Scott Alexander-Bown 636 Dec 18, 2022
PermissionX is an extension Android library that makes Android runtime permission request extremely easy

PermissionX is an extension Android library that makes Android runtime permission request extremely easy. You can use it for basic pe

Lin Guo 2.9k Dec 28, 2022
Signal Protocol library for Java/Android

Overview A ratcheting forward secrecy protocol that works in synchronous and asynchronous messaging environments. PreKeys This protocol uses a concept

Signal 1.8k Dec 24, 2022
Grab’n Run, a simple and effective Java Library for Android projects to secure dynamic code loading.

Grab’n Run, a simple and effective Java Library for Android projects to secure dynamic code loading.

Luca Falsina 418 Dec 29, 2022
A collection of android security related resources

android-security-awesome A collection of android security related resources. Tools Academic/Research/Publications/Books Exploits/Vulnerabilities/Bugs

Ashish Bhatia 6.6k Jan 5, 2023