I have access to a big remote server via SSH and I'm a root user on that server. However, there are multiple other root users who also have access to this server. I want to run some Fortran/C programs on this server, but I'm concerned about keeping my code private.
Is there a way to execute my Fortran/C programs without revealing the source code to other users on the server? I'm looking for solutions that allow me to maintain confidentiality while still being able to run my programs
I have a method in mind for protecting my source code while compiling on the server, and I’d like your feedback on its effectiveness, potential risks, and any overlooked measures I should consider.
First, cross-compilation isn’t an option for my situation; I need to compile the source code directly on the server. My goal is to ensure that accessing my source code requires significant expertise, ideally making it take days or even months for an average user. The entire remote session, including compilation and execution, will take about 30 minutes. I’m willing to spend around 5 additional minutes to implement protective measures.
Before I begin, I want to take several precautions with my root access:
- Verify that my SSH connection is secure.
- Check for any suspicious processes or daemons running on the server.
- Confirm that secure boot has occurred.
- Disable all logging and console input/output to limit exposure.
- Verify the signatures of the compilers and libraries involved.
During the process, I plan to create a temporary folder in RAM, setting myself as the only owner. I’d like to know if it’s possible to receive alerts if someone attempts to access that folder. This will mitigate file system access risks from other root users. If someone is monitoring my activities undetected, I want to implement measures to make it more difficult for them.
For file transfers, I will use cryptographic encryption and a unique, hard-to-access password for decryption(@security_paranoid), piping the output directly to the compiler. After this, I want to run the compilation securely while minimizing risks, particularly regarding memory inspection (acknowledging that complete prevention is impossible). I assume that reverse engineering the object files and executable will take significant time, and I don't believe other root users are motivated enough to go through this process unless automated tools make it easy to reconstruct the source logic.
What Linux tools would you recommend to assist with these processes and precautions? Ideally, the only way to retrieve the program should be through hardware means rather than software.
-Q
and--help=target
flags for example.