I'm running Ubuntu. I need to know any way to obfuscate .sh shell script file contents in order to make it very difficult to read.
Any suggestion are welcome, including using online obfuscator.
|
I'm running Ubuntu. I need to know any way to obfuscate Any suggestion are welcome, including using online obfuscator. |
|||||
|
|
This really depends on who you are trying to prevent from reading the script and what resources you are expeting the system to have. One option is to simply use many different programs to do different parts of your script: shell, awk, sed, perl, etc. as well as lots of obscure parameters of tools, forcing the reader to constantly refer to man pages. Even within a shell, you can create unnecessary functions and variables, making them interdependent in confusing ways. And, of course, give them misguided names. More complicated, you can append binary data to the end of your shell and have your shell extract and execute the binary. I beleive nVidia's Linux drivers, and Sun's JDK are installed this way (the binary data is an RPM, which the shell extracts and installs). Another example I just downloaded the other day is the soapUI program. On thet vein, it is possible to have a text file that can be compiled or interpreted in multiple languages, so it could start as a shell, compile itself as a C program and executie the result. The IOCCC has some examples. |
|||||||||||||
|
|
Yes, there are a number of scripts out there than do a reasonable job of obfuscating bourne, bash or korn shell scripts. Here such script: obfuscate_shell_script-20011012.html |
|||
|
|