Coder Social home page Coder Social logo

some-java-obfuscator's Introduction

Some Java Obfuscator

A modified version of cheatbreaker-obf to test out some ideas I had

Features

Native obfuscators shouldn't be used for production

  • StripTransformer
    • Strips debug information from classes, methods and fields
  • ChecksumTransformer
    • Inserts block of code inside configurable class which will check if the target method is modified, uses modified asm to check constant pool and method bytecode
  • InlinerTransformer (Disabled)
    • Tries to inline methods, does need massive improvements
  • VariableTransformer
    • Just converted local variables to java.lang.Object[]
  • ConstantPoolTransformer (Unstable)
    • Uses native method to modify constant pool and applies some simple number obfuscation
    • Uses basic xor encryption which shows the key it would be best to change it
  • CodeHiderTransformer (Unstable)
    • Uses natives to hide method bytecode from the code attribute
  • PackerTransformer
    • Packs classes into a single file which are loaded afterwards
  • ToStringTransformer
    • Saw something cool in a source obfuscator and decided to implement it, converts strins to new Object() { toString... return "String" }.toString()
  • ExceptionTransformer
    • Turns local storing to storing of exception objects

Disclaimers

  • CodeHider
    • won't go over exceptions
    • skips methodhandle and class ldc
    • skips synthetic methods
    • breaks on classes with generated methods
    • can break randomly due to constant pool not being updated when generating bytes

Usage

You use the obfuscator by creating a config file much like the one provided and parsing it through command line

java -jar obfuscator.jar --config config.yml

Screenshots

String Obfuscation

String Obfuscation

Variable Obfuscation

Variable Obfuscation

Inliner Obfuscation

Inliner Obfuscation

Checksum Obfuscation

Checksum Obfuscation

ConstantPool Obfuscation (Unstable)

ConstantPool Obfuscation

Packer Obfuscation

Packer Obfuscation

Code Hider Obfuscation (Unstable)

CodeHider Obfuscation

Exception Obfuscation

Exception Obfuscation

Credits

  • cheatbreaker-obf for base
  • most of utils methods aren't mine
  • yaml classes for config stolen from bukkit

some-java-obfuscator's People

Contributors

jhalt avatar prplz avatar ssheera avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

some-java-obfuscator's Issues

Help

Im interested in the code hider, would you mind explaing how it works?

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.