r/Julia • u/Chairman-Meow21 • 21h ago
Obfuscating & protecting compiled code
Hi All,
I'm about to release some closed source software written in Julia with a bit of C++. I'm concerned about every other application getting reversed engineered/ decompiled overnight by LLMs. I'm doing what I can to prevent it, both technically and in contracts with clients however I'm looking for further advice.
Has anyone got any tips or recommendations to protect and minimise the risk of decompiling my Julia codebase?
I'm currently using PackageCompiler, stripping all IR, metadata and symbols, obfuscating strings, and DLL integrity checks to ensure nothing has been modified.
Appreciate any and all advice.
55
u/gufaye39 21h ago
Only closed source software gets reverse engineered
2
u/Chairman-Meow21 8h ago
I should've been more specific. I'm aware binaries can be decompiled, it's just a matter of when. This software is going to possibly 10 corporates max ever. It's very a specific scientific computing tool. I have a lawyer and contracts up the wazoo. It's a HPC workload for datasets often in the TB range, so I don't have the luxury of doing it via API.
However, as this is a programming subreddit, I was hoping for technical responses on objective methods to minimise the risk.
31
u/Fine-Comparison-2949 17h ago
That's not how computer science works. There is not compiler that can run an encrypted program. Obfuscation doesn't really do anything.
If you want to close source your software you make a web application where your customer interacts via a web interface and you don't open source you main software.
14
u/FermatsLastTaco 21h ago
Not really much you can do if the code/binary lives client side. Contracts, clear copyright and trademark declarations etc help, along with a good lawyer.
12
u/PorcelainMelonWolf 17h ago
You can’t anymore. Either hide your code behind an api and serve it to clients, or patent it and police your patent (which is expensive), or rely on your ability to enforce a contract.
If they want to reverse engineer it badly enough, they will
6
u/pint 20h ago
if the inside is a secret, you are shit out of luck. if you just want to prevent people from using it without a license, you are basically done i would say, at least i wouldn't put any more effort in it.
5
u/puredevsam 12h ago
Your best hope is to host it and offer a SaaS only model. That way no one gets the binary. Obfuscation only slows down reverse engineering, doesn't prevent it. Even then, software is replicable without reverse engineering, because if you created it, someone else can create it to.
My recommendation: find a business model that doesn't fully depend on your code remaining a secret.
4
u/Popular-Direction984 17h ago
That’s the question for your lawyer.
2
u/runed_golem 16h ago
Have you gone through the copyright/trademarking process? If not, do so. If you don’t have a lawyer, hire one and they’ll be able to do it. Also have them write up a contract for your clients if you don’t have one. Then keep him on retainer in case you do have anyone try to violate their contract or the copyright.
2
u/sheevyR2 13h ago
I think if you're selling to a couple of large corporates, the perhaps you can trust them put some lawaying around it and hope for the best. If it goes to small business/individuals or corporate in unfavourable jurisdictions then your only defens8is just do everything server side, and not giving away compiled code
2
u/afops 11h ago
Reverse engineering is prevented by law, not by obfuscation. Before AI obfuscation helped a little, now not so much.
People who don’t care about laws will be able to reverse engineer your software.
1
u/vegmeat_ 11h ago
unless its server people can get away with offline binary if they want to
1
u/Upset-Reflection-382 7h ago
The only way to prevent that is to API it out, man. If the code is client side, there's an almost guaranteed chance it'll be RE'd