strobfs

command module
v0.0.0-...-59c48b4 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

README

strobfs

strobfs

strobfs provides a simple tool to obfuscate sensible strings inside Go binaries, when you have no other choice but to put them there.

go install github.com/aurora1369/strobfs@latest

Usage

Place your sensible strings inside a dedicated file with the right go generate clause, e.g.:

//go:build ignore

package api
//go:generate strobfs -filename $GOFILE
var API_KEY = "MY_API_KEY"

(Note the //go:build ignore directive, you obviously don't want those strings to end up in your binary)

Upon generation, strobfs will create a new file (${filename}_gen.go, by default) that contains each string in a properly encrypted form, using AES-128 with a random key.
That same key is stored in the generated file too, and will be used to decrypt the content of each string at run time (via init()).

Good to know

strobfs is just a deterrent that prevents kind-of sensible data from appearing in clear form in the output of binary analysis tools such as objdump, strings, etc.
It is not a security measure per-se; anyone experienced with the use of a debugger should be able to retrieve the AES key from the final executable.

Authors

See AUTHORS for the list of contributors.

License License

The Apache License version 2.0 (Apache2) - see LICENSE for more details.

Copyright (c) 2018 Zenly hello@zen.ly @zenlyapp

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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