XOCopy

Sometimes when you're on a Unix system where you do not have admin privileges, you can come across programs with strange permissions such as the following:

-rwx--x--x    1    root     root     56152 Jul  1 12:37 runme

The permissions are set so that anyone can execute this program, but only the file owner can read the program. However this is not true. If somebody can execute the program they can copy it by reading it from memory once the program has been loaded.

xocopy is a program that can copy executables with execute, but no read permission. It has been tested on FreeBSD and Linux kernels 2.[246].x.

Limitations

Download

xocopy.c