tools

command
v0.0.0-...-8ab2f96 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

* │ Author : Evilbytecode * │ Name : Ebyte-Go-Morpher * │ Contact : https://github.com/Evilbytecode * * This program is distributed for educational purposes only. * * Technical Overview: * - Ebyte-Go-Obfuscator is a comprehensive Go source code obfuscator. * - It parses Go source files using the go/ast and go/parser packages, traverses the AST, and applies multiple layers of obfuscation. * - Supported obfuscation features: * • String encryption: All string literals wrapped in OBF() are encrypted and replaced with runtime-decrypted functions. * • Number obfuscation: Integer literals are replaced with equivalent, more complex expressions. * • Identifier renaming: Variables, functions, types, and struct fields are renamed using hash-based schemes. * • Type and field obfuscation: Struct types and their fields are renamed, with field tags preserved. * • MBA (Mixed Boolean-Arithmetic) transformations: Boolean and arithmetic expressions are rewritten for complexity, using techniques such as De Morgan's laws and algebraic identities. * • Scope-aware renaming: Local variables are renamed with respect to their scope, avoiding collisions. * • Configurable: Obfuscation can be toggled for structs, variables, numbers, types, MBA, and fields. * • Code generation: Generates a Go file with all decryption and obfuscation logic for runtime use. * • Source rewriting: Rewrites original source files to use obfuscated names and encrypted values. * - Workflow: * 1. Scan and parse all Go files in the project (excluding configured directories). * 2. Collect and encrypt all strings/numbers marked for obfuscation. * 3. Rename identifiers, types, and fields as configured. * 4. Apply MBA and other code transformations (e.g., De Morgan's laws, algebraic rewrites). * 5. Generate a new Go file with decryption logic. * 6. Rewrite source files to use obfuscated names and function calls. * * References & Inspiration: * - Inspired by Go's official AST tools, various open-source obfuscators, and advanced code protection techniques. * - Notable references: Golang's go/ast, go/parser, go/printer, and projects like garble, gobfuscate, and commercial obfuscators. * - Mixed Boolean-Arithmetic (MBA) obfuscation: see https://en.wikipedia.org/wiki/Obfuscation_(software)#Mixed_boolean-arithmetic_obfuscation * - De Morgan's laws: https://en.wikipedia.org/wiki/De_Morgan%27s_laws * - Algebraic and logical code transformations: see academic papers on code obfuscation and compiler theory. * - For more info, see: https://github.com/Evilbytecode/Ebyte-Go-Morpher * * Legal & Distribution: * - This software is provided under the terms of the MIT License (or specify your license here). * - You must comply with all applicable local, national, and international laws regarding software use, cryptography, and reverse engineering. * - The author is not responsible for any misuse or illegal use of this software. * - Obfuscation techniques implemented here are based on well-known mathematical and logical laws (e.g., De Morgan's laws, algebraic identities) and standard cryptographic practices for string encryption (XOR, random key generation). * - Users are responsible for ensuring compliance with export controls, cryptography regulations, and intellectual property laws in their jurisdiction.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL