Best practice to protect resources against reverse engineering [closed]

喜夏-厌秋 提交于 2019-12-24 00:58:53

问题


In order to address some level of protection against reverse engineering or decompilation, I decided to move the important parts of my C# application including several xml resources into a native C++ DLL file based on the method described here for using resources in C++ programs and practice1 and practice2 for utilizing C++ DLL files in C# applications. Now i have two questions:

  1. Is this a proper approach for addressing the application protection against reverse engineering?
  2. W̶h̶a̶t̶ ̶i̶s̶ ̶t̶h̶e̶ ̶c̶o̶r̶r̶e̶c̶t̶ ̶w̶a̶y̶ ̶o̶f̶ ̶r̶e̶t̶u̶r̶n̶i̶n̶g̶ ̶t̶e̶x̶t̶ ̶c̶o̶n̶t̶e̶n̶t̶s̶ ̶i̶n̶ ̶C̶+̶+̶ ̶D̶L̶L̶ ̶f̶i̶l̶e̶s̶ ̶b̶a̶s̶e̶d̶ ̶o̶n̶ ̶p̶r̶a̶c̶t̶i̶c̶e̶1̶ ̶a̶n̶d̶ ̶p̶r̶a̶c̶t̶i̶c̶e̶2̶.̶ ̶I̶ ̶h̶a̶v̶e̶ ̶r̶e̶a̶d̶ ̶m̶a̶n̶a̶y̶ ̶s̶a̶m̶p̶l̶e̶s̶,̶ ̶b̶u̶t̶ ̶a̶l̶l̶ ̶o̶f̶ ̶t̶h̶o̶s̶e̶ ̶t̶h̶a̶t̶ ̶I̶ ̶r̶e̶a̶d̶ ̶h̶a̶d̶ ̶d̶e̶s̶c̶r̶i̶b̶e̶d̶ ̶b̶y̶ ̶u̶s̶i̶n̶g̶ ̶A̶d̶d̶/̶S̶u̶b̶t̶r̶a̶c̶t̶/̶M̶u̶l̶t̶i̶p̶l̶y̶/̶D̶e̶v̶i̶d̶e̶ ̶f̶u̶n̶c̶t̶i̶o̶n̶s̶.̶

Update: I skip the second question as might be coding question while the first one is a question about practice.


回答1:


Placing text resources in a DLL is a technique of hiding resources, not protecting them. If the goal is to protect your resources against reverse engineering, this technique would qualify only as the lowest and the least effective measure of "security by obscurity," which provides no security against anyone with minimal amount of determination to hack your resources.

For any degree of real protection you need to use encryption, because encrypting your resources with a custom key would require much higher degree of sophistication from anyone trying to reverse-engineer your system. This wouldn't made it completely impossible to reverse-engineer your system, but it would do enough to discourage hackers with limited knowledge from messing around with your code.



来源:https://stackoverflow.com/questions/35521857/best-practice-to-protect-resources-against-reverse-engineering

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!