Giter Site home page Giter Site logo

nnn7h / declang Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dena/declang

0.0 1.0 0.0 1.35 GB

An anti-hacking compiler forked from the ollvm (https://github.com/obfuscator-llvm/obfuscator)

License: Other

CMake 0.34% Makefile 0.03% Shell 0.04% C++ 46.70% OCaml 0.08% Python 2.17% C 10.42% NASL 0.01% Objective-C 0.78% Assembly 11.17% HTML 0.35% LLVM 27.47% Batchfile 0.01% CSS 0.01% Objective-C++ 0.20% Cuda 0.11% M 0.01% Perl 0.07% Roff 0.01% JavaScript 0.02%

declang's Introduction

DeClang

日本語はこちら

Introduction

DeClang is an anti-hacking compiler based on LLVM project and extented the OSS project ollvm (https://github.com/obfuscator-llvm/obfuscator).

We open sourced some of the obfuscation features of DeClang for now. Some other features might be open sourced in the future.

難読化

DeClang is a compiler based anti-hack solution and has a lot of advantages over packer based solution. For the detailed comparision, please refer to the following document. https://www.slideshare.net/dena_tech/declang-clang-dena-techcon-2020

Supported Architecture

Supported host architecture

  • x64 macOS
  • x64 Linux
  • x64 Windows

Supported target architecture

  • arm / arm64 ELF (Android)
  • arm / arm64 Mach-O (iPhone)
  • x86 / x64 ELF (Linux)
  • x86 / x64 Mach-O (macOS)

Build

$ git clone https://github.com/DeNA/DeClang
$ cd DeClang/script
$ bash build.sh
...
$ bash build_tools.sh
...
$ bash android_release.sh v1.0.0
...

Then you have a Release-v1.0.0 folder in the root directory of DeClang.

If you are building DeClang on Windows, you have to install MYSYS2 and run the above script in MYSYS2 shell. Also, Visual Studio 2017 is required for build.

Installation & Setup

  • Define DECLANG_HOME environment variable

    export DECLANG_HOME=/path/to/declang_home/
    
  • Copy Release folder to $DECLAHG_HOME

    • If you built DeClang by yourself
      • Copy Release-v1.0.0 to $DECLANG_HOME/.DeClang.
      mv Release-v1.0.0 $DECLANG_HOME/.DeClang
      
    • If you downloaded pre-built binary from Releases page.
      • Decompress the zip file and copy the Release folder to $DECLANG_HOME/.DeClang.
      mv Release/ $DECLANG_HOME/.DeClang
      
  • Setup DeClang for android-ndk:

    bash $DECLANG_HOME/.DeClang/script/ndk_setup.sh {/path/to/ndk_root}
    

    Recover the original NDK:

    bash $DECLANG_HOME/.DeClang/script/ndk_unset.sh {/path/to/ndk_root}
    
  • Setup DeClang for Xcode:

    bash $DECLANG_HOME/.DeClang/script/xcode_setup.sh -x {/path/to/Xcode.app} -p {/path/to/xcodeproject.xcodeproj}
    

    Recover the original xcode project file:

    bash $DECLANG_HOME/.DeClang/script/xcode_unset.sh {/path/to/xcodeproject.xcodeproj}
    
  • Now you can build your project using your usual build pipeline.

Configuration

  • Edit config.pre.json in $DECLANG_HOME/.DeClang/ folder:
    vi $DECLANG_HOME/.DeClang/config.pre.json
    
  • Generate config.json from config.pre.json:
    $DECLANG_HOME/.DeClang/gen_config_mac -path $DECLANG_HOME/.DeClang/ -seed {your seed}
    
    "seed" can be any string. You should change "seed" for each build.

Unity Support

If you are building your Unity project using command line then set the DECLANG_HOME in comand line is sufficient. But if you are building a Unity project using GUI, you should set the DECLANG_HOME environment variable in your build script:

System.Environment.SetEnvironmentVariable("DECLANG_HOME", "/path/to/DeClang/");

Notes

  • If you do not set DECLANG_HOME, DeClang will use the default directory ~/.DeClang/
  • Note that usually DeClang for NDK and DeClang for Xcode might not be compatitable with each other so when you install & setup DeClang for different architecture please make sure you are using the correct DeClang version.

declang's People

Contributors

cryptopathe avatar funa-tk avatar r1kk3r avatar obfuscator-llvm avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.