I recently completed a C programming course at university. It was fun :). I guess the most interesting part was stealing the assignment solutions. Okay, just to be clear, I didn’t cheat.
Basically, we had programming assignments, and the lecturers provided compiled assignment solutions as demos for us to test our implementations against. When I heard that compiled solution demos would be given along with the assignments, I got pretty excited, as I had a few years of experience reverse engineering C code.
I asked one of the lecturers for permission to “steal” those demos and reverse engineer them, and I was given the go-ahead, which surprised me a bit. His original words were “we’ve made sure that you can’t just copy the executables and feed them into a reverse compiler, and if you are still able to do it, then there’s nothing much we can teach you in this course, but sure, you can try”. What could they have possibly done to protect their binaries?
Execute-Only Permissions
Binaries can be made execute-only, so that you only have execute permissions but not read or write permissions. Here’s an example of what an execute-only binary looks like:
-rwx--x--x 1 root root 15776 Aug 21 11:13 test