I am struggling with this problem since last one week. I have obfuscated exe of my application. Our application is offline tool for online web application. Client will install this application and connect once to internet, application will download relevant information and store in xml file on client machine for further display. for security purpose we are encrypting these xml files. Unfortunately we have one method GetCryptXML inside exe which will read encrypted settings.xml on client machine and return it after decrypting. this setting.xml contain encryption key for other xml as well.
Problem I am facing here is, even after obfuscation, person can invoke GetCryptXML method by passing obfuscated name.
Is there any way to solve this problem?
This is my idea to solve problem but I am not sure how to implement.
My idea: Only way to invoke my function is through reflection by using InvokeMember() function. before one can call this function he/she needs to load assembly by using this.
Assembly.LoadFrom("myapplication.exe")
If code inside myapplication.exe can identify which application is trying to load me then we can restrict them to load if it is not intended application. I dont know how can I solve.
Any help is greatly appreciated.
Thanks.