Advertising
Protecting C# code...
Protecting C# code...
Here's the deal. I have been working on a "plugin" for a game engine called Unity3D. Unity executes any C# code located in a (let's say certain) code file in a (again I am too bored to explain, so certain) path. The MAIN file has to be a .cs to be executed (plain code) but I can use libraries and functions in them by calling them from the main file. I want to protect the rest files. What would you recommend? Creating DLLs with my code? Please note that the protection is against the "average coder" so there might be a possibility of RE if I use DLLs.
Re: Protecting C# code...
Well I've recently cracked a .Net app and it was a kid's game. Moving stuff to external libraries doesn't really change much, as you're just splitting the code into various files. Libraries are not much a security feature but a code reusability feature.
Did you check Dotfuscator? It comes bundled with VS IIRC. Also you can maybe check some kind of encryption and/or check-sum checking on the files.
Did you check Dotfuscator? It comes bundled with VS IIRC. Also you can maybe check some kind of encryption and/or check-sum checking on the files.
Advertising
I wanna lots of mov al,0xb
"just not into this RA stuffz"
"just not into this RA stuffz"
Re: Protecting C# code...
Encrypting the code files is impossible, as the engine reads them directly... I have an idea, though. I could design my own language in which I'll implement the code and just have a main C# file which loads the other files.
Re: Protecting C# code...
Yeah, implementing your own language is way easier and faster than encrypting... Dude, you can just make the engine decrypting using a public key, while code/data are encrypted using a private key. This way nobody can modify your code/data even if they can decrypt it.
Of course they can just RE your code and jump over decryption to make it execute plain stuff.
Of course they can just RE your code and jump over decryption to make it execute plain stuff.
I wanna lots of mov al,0xb
"just not into this RA stuffz"
"just not into this RA stuffz"
Re: Protecting C# code...
Again, the decryption method will have to be in the main file which is plain C# so that it can be run! So why bother?
Re: Protecting C# code...
Again, to protect your DLLs and data files from being modified
I wanna lots of mov al,0xb
"just not into this RA stuffz"
"just not into this RA stuffz"
Re: Protecting C# code...
No no no. It isn't protection against modding! They bought the source, they can do whatever with it. I just don't want them to pack it and email it to friends, relatives and the whole world. So I want to keep secret a portion of the code which will not actually affect the modification capabilities of my program, but will prevent them from sending it to other people. Any ideas?
Re: Protecting C# code...
Have you ever considered joining the "Free software movement" instead?
I really suggest you study the programming environment displayed nowadays, if you already haven't. I see of almost no reason to not embrace this cause against proprietary software. Even if your development has the intuit of profitability as the ending goal, such thing can still be achieved with libre software.
I really suggest you study the programming environment displayed nowadays, if you already haven't. I see of almost no reason to not embrace this cause against proprietary software. Even if your development has the intuit of profitability as the ending goal, such thing can still be achieved with libre software.
Re: Protecting C# code...
It's not as easy as that. It is not normal software. Imagine it like an extension, a plugin. They put the rules not me, if I give it out for free then it is considered as open-source (since I am selling the actual source).sss0 wrote:Have you ever considered joining the "Free software movement" instead?
I really suggest you study the programming environment displayed nowadays, if you already haven't. I see of almost no reason to not embrace this cause against proprietary software. Even if your development has the intuit of profitability as the ending goal, such thing can still be achieved with libre software.
Re: Protecting C# code...
Well, really the only way is to license the code for a given hardware and not allow it to run on other hardwares. This requires internet connection. You can find other ways too, but keep in mind that everything can be cracked.
I wanna lots of mov al,0xb
"just not into this RA stuffz"
"just not into this RA stuffz"