-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code protection is severe issue. #8230
Comments
I can understand your frustration and you're not alone. AOT would solve that problem (and some other) but unfortunately any attempt to make WPF AOT friendly is being ignored for years now. PRs are not getting reviewed like #6171. |
I would disagree, different use cases have different requirements. Sometimes, no security is sufficient.
That is anecdotal; you are the first in this repo to bring this up. A lot of companies also use JavaScript, with or without obfuscation. Either way, this is most likely not the right repo to make such request, there is no point in WPF doing anything until .NET supports such feature. WPF is basically code + markup. For code, this needs to go after .NET. For markup, you can turn it into code, but even then, you can inspect the application at runtime, including walking the trees. Reflection is a fundamental feature of .NET so I wouldn't be too hopeful this would change. I like @Symbai's observation that AOT might help here, sounds like your best bet. |
Great. Now the fanclub of the easy decompiling the other peoples source got triggered, and since they don't have any meaningful argument a laughingstock like JavaScript is thrown away. I really do not care who is using JavaScript and for what purpose. I care only for the scenarios where more security is required. |
You say your company switches to C++ / Delphi because of that. I dont see why the code with C++ or Delphi would any better than other native code (AOT with stripped symbols). Its the same level of "protection" 🤷♂️ |
No. I dont say that companies switching to C++ Builder / Delphi from C#. I am saying that companies does NOT wanna switch to C# from C++ Builder / Delphi since their code is more than protected even without additionally tools. |
Sorry I misread
It is full native code but you can choose if you want to remain the capability of debugging like stacktrace with symbols etc. |
As @miloush mentioned, this wouldn't be a feature for WPF specific but needs to be supported at .NET level. |
.NET NativeAOT is fully native code, which will be roughly the same as C++/Delphi in terms of decompilation or reverse engineering. Also it is readily available for you to try out, it's only the WPF bits (and some other Windows-exclusive tech) that are not ready yet. You can try putting critial code inside a AOT project, get that protected and use P/Invoke to call from your WPF app. (Yeah it will be similar to C++ in this regard as well, as you'll get a native DLL with C-style exports). |
Didn't notice that they advanced this far to be honest. |
That's not true. WPF, WinUI, Winforms, MAUI, Xamarin.... literally everything (from MS) which is not a console or web application and run on a classic desktop environment is not supported. Which means as a .NET desktop app developer you don't get AOT (from MS).
That doesn't give you anything in terms of protection. People can just easily find these calls and replace them. The whole application needs to be native code to get the same level as of a C++/Delphi. |
There is some support on Winforms, and WinUI should be ready soon (let's see how long it will take to get C#/WinRT working with AOT). But overall you are right, Avalonia is more or less the only desktop framework with usable AOT support.
For DRM purposes you are right, people can easily bypass the check by changing the managed side (Although cracks still exists with native code). I am more towards putting critial logic or algorithm there. |
this is a junk. it's like whole 3 minutes of my life to get the idea inside the decompiled code. |
Not only is this issue in the wrong repo, it also shows a fundamental lack of perspective. The "security" provided by solely using C++ is nothing but security through obscurity. If you rely on it to the point of dismissing other technologies due to the lack of that security, maybe your company's threat handling model is flawed. |
@Aurumaker72 I totally agree with you |
The security is never sufficient. This is a fact.
Yet the .NET compiled projects is practically distributed full source code for everyone which can work with a computer and can download basic decompillers. The Obfuscators and similarities which is around recently is quite not sufficient or at the best outdated.
This is a severe issue, especially for wide distributing mid class applications, especially non-web across end clients.
A lot of companies ( including mine ) are still preferring C++ Builder / Delphi instead of C# apps just because of this ginormous issue.
I believe that .NET or at least WPF should provide ember encrypting at least during the compilation or some other approach increasing the security against decompiling of the result.
The text was updated successfully, but these errors were encountered: