Option to tell .NET reflection programs (reflctors, profilers and antivirus programs) that an exe is obfuscated or show message if being reflected

StackOverflow https://stackoverflow.com/questions/11899218

  •  25-06-2021
  •  | 
  •  

Question

I use the product .NetReactor to obfuscate one of our product. The tool is very agreesive so if anyone try to reflect into the exe with evil purposes in mind it not only give back garbage but so much that it crash our application. You can argue that this is good (evil people can't see the code) but we have from time to time seen tools like profilers and antivirus that try to reflect in good intensions (to protect and find performance issue). Of cause such tools should not be allowed to see the code as well but is it somehow possible in .NET or the .NET Reactor tool to flag a exe as protected by obfuscation to tools of good intensions would be able to detect this and not reflect. Or is it possible in code to know you are being reflected and show a message that this exe is not possible to reflect (A lot more user-friendly than a just crashing)

Was it helpful?

Solution

It's not crashing your application - it's crashing the application which is diong the reflection etc. That just indicates a bug in the application - it should handle errors more gracefully.

Or is it possible in code to know you are being reflected

Your code isn't running - it's just the metadata is being examined.

It sounds like really what you want is for tools such as Reflector to have better error handling. I'm all for good error handling, but personally I don't mind too much if someone who's trying to decompile an app they shouldn't be decompiling has a bad user experience...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top