Git Product home page Git Product logo

introspelliam / core Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xelzmm/core

0.0 0.0 0.0 52.06 MB

WIP LLVM Obfuscator CoreLibrary

License: Other

C++ 41.72% Python 0.55% Shell 0.11% OCaml 0.18% Perl 0.02% C 0.47% CMake 0.20% Go 0.06% PHP 0.01% Objective-C 0.01% LLVM 41.62% Assembly 13.57% Mirah 1.47% Roff 0.01% Logos 0.01% HTML 0.01% Swift 0.01% CSS 0.01% Emacs Lisp 0.01% Batchfile 0.01%

core's Introduction

Hikari

Hikari is a port of Obfuscator-LLVM with a few custom built passes.

Install

For macOS,Download from Releases page,Extract Hikari.xctoolchain to ~/Library/Developer/. Note that I do not personally use Xcode as such I'm not able to help with issues regarding Xcode Intergration

For other platforms, compile and install accordingly. See BuildScript Note that this repo currently contains only the LLVM Core, see Getting Started with the LLVM System for installing other components like Clang

Note that C++11 is required

Usage

Add one of the following to CFLAGS

enable-symobf Enable Symbol Obfuscation.Use with LTO  
enable-bcfobf Enable BogusControlFlow  
enable-cffobf Enable Flattening  
enable-splitobf Enable BasicBlockSpliting  
enable-subobf Enable Instruction Substitution  
enable-allobf Enable All Non-LTO Obfuscation  
enable-adb Enable AntiDebugging Mechanisms

An example of invoking everything from command line would be:
/PATH/TO/OUR/clang -mllvm -enable-allobf -Xlinker -mllvm -Xlinker -enable-fco main.m -flto
For Xcode, add something like -Wl,-mllvm,-enable-fco to Other linker flags

TODO

  • StringEncryption
  • Generate unobfuscated dSym
  • Improved CFG Obfuscation Algorithm
  • Complete Anti-Debuging

Pass Options

FunctionCallObfuscate

Pass -enable-fco to enable.FCO uses a json configuration to resolve symbols.For example {"AAAA":"BBBB"} means the pass should replace a call to function AAAA with a call to the result of dlsym(RTLD_DEFAULT,"BBBB")

By default configuration is loaded from ~/Hikari/SymbolConfig.json Pass fcoconfig=PATH to override

Intergrating with Xcode

  • Compile From Scratch or Download XcodeToolchain From Releases
  • Download Hikari.xcplugin from HikariProject/Resources
  • Install Hikari.xcplugin to /Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/
  • Under Project Settings. Search for Enable Index-While-Building Functionality to NO. As mentioned by obfuscator-llvm/obfuscator/issues/86
  • EDIT CFLAGS as you wish.
  • In Xcode->Toolchains, select Hikari

Troubleshooting

  • You might run into errors like ld: file not found: /Library/Developer/Toolchains/Hikari.xctoolchain/usr/lib/arc/libarclite_macosx.a. this is due to Xcode's Default Toolchain, located at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ contains stuff not packed into Hikari.Just copy corresponding directories over

core's People

Contributors

naville 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.