Ad

garble: Obfuscate Go builds

garble obfuscates Go binaries by replacing identifiers with hashes, reducing reverse engineering efforts and binary size.
Screenshot of burrowers/garble homepage

garble obfuscates Go code by modifying the Go build process to make binaries harder to reverse engineer. It replaces identifiers like variable names and package paths with short, irreversible hashes. This helps protect source code when distributing compiled Go applications. Garble wraps calls to the Go compiler and linker, providing a deterministic and reproducible obfuscation process.

Garble offers deterministic and reproducible builds, enabling reliable code tracing and de-obfuscation. It supports fine-grained control over which packages are obfuscated. It also features a 'tiny' mode to shrink binaries by removing position information and debug data. The tool prioritizes compatibility with Go's build cache for incremental obfuscations.

  • Package Obfuscation: Obfuscates packages using glob patterns specified via GOGARBLE.
  • Deterministic Builds: Guarantees consistent obfuscation for the same input code and configuration.
  • Tiny Mode: Provides binary size reduction by removing position and debug information.
  • Reproducible Traces: Supports de-obfuscating stack traces for debugging purposes.
  • Build Cache Compatibility: Leverages Go's build cache for incremental obfuscations.
  • Seedable Obfuscation: Allows specifying a seed for consistent and reversible obfuscation.
  • Controlled Obfuscation: Supports manual selection of packages to obfuscate.

garble is an active project with continuous development and bug fixes. It has a well-defined set of features, a growing user community, and documentation updates reflecting evolving capabilities. While some limitations exist (e.g., exported methods currently not fully obfuscated, limitation in excluding files/packages), the project demonstrates ongoing maintenance and a commitment to addressing feedback. The changelog indicates regular updates and improvements.

Developers distributing Go binaries can use garble to deter reverse engineering and protect their intellectual property. It is also useful for reducing binary sizes and mitigating false positive malware detections. Garble provides a valuable solution for scenarios where source code protection and binary minimization are important considerations.

Languages:
Summarize:
Share:
Stars
5,587
Forks
362
Issues
34
Created
6 years ago
Commit
1 month ago
License
BSD-3-CLAUSE
Archived
No
Updated 12 days ago

Similar Repositories