1. knarf
  2. obfu


Man page


    obfu - simple file (de-)obfuscator


    obfu [-n size] FILES...


  obfu obfuscates by reversing at most the <size> first bytes of FILES.
  Call with the same arguments to deobfuscate.
  If a file is too small, reverse the whole file.

  obfu is useful on binary files where you can prevent file(1) to detect a
  type or a video player to play videos for example.

  Obviously, this is just an obfuscation, not a secure way to protect
  your files.


  -n size
       defines number of bytes to reverse (default 10).


Edit config.mk to fit you system and:
    $ make

If you want to install obfu (default in /usr/local):

    $ make install

Obviously, you may have to be root depending on the install directory.


# make a copy of ls
$ cp /bin/ls .

# lets see what file(1) detects...
$ file ls
ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), [...]

# we reverse the 10 first bytes
$ obfu ls

# file detects garbage and ./ls doesn't work anymore
$ file ls
ls: \0
$ ./ls
zsh: exec format error: ./ls

# we reverse it a second time, and it works again!
$ obfu ls
$ ./ls
config.mk  LICENSE  ls  Makefile  obfu  obfu.1  obfu.c  obfu.o  README