对 C++ 的混淆和逆向工程威慑 Win/OSX 应用程序
我有一个在 Windows 和 OSX 上运行的 C++ 应用程序。 它使用 TCP(当然使用 OpenSSL 加密)与我们的后端通信。 我想为那些试图对协议进行逆向工程和/或反汇编可执行文件的人们提供一些减速带。
Skype 在这方面做得非常出色,这就是为什么您找不到很多支持 Skype 的应用程序。 关于它的作用,这里有一篇非常好的读物: http://www.secdev.org /conf/skype_BHEU06.handout.pdf
我想要一些关于如何在我们的应用程序中完成类似功能的想法。 是否有商业产品使代码更难以静态分析? 投入时间来实现我列出的目标的最佳方式是什么?
谢谢,
I've got a C++ app that ships on Windows and OSX. It communicates with our backend using TCP (encrypted with OpenSSL, natch). I'd like to throw up some speed bumps for folks who are trying to reverse engineer the protocol and/or disassemble the executable.
Skype does an excellent job of this, which is why you won't find a lot of apps that speak skype. Here is a really good read about what it does: http://www.secdev.org/conf/skype_BHEU06.handout.pdf
I'd like some ideas about how to accomplish similar stuff our app. Are there commercial products that make code harder to statically analyze? What is the best way to invest my time to accomplish the goals I've listed?
Thanks,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
针对 OSX 的一些简单建议:
防止 gdb 附加到您的程序
http://www.steike.com/code/debugging-itunes-with -gdb/
(这可以解决,但会让一些临时探索者望而却步)
将产品中的至少一些代码存储在可执行文件的文本段之外,例如在数据中,或在外部(加密)共享中库。
不以纯文本形式存储任何敏感字符串数据,以最大限度地保护这些数据。 针对您的可执行文件运行“字符串”,如果您发现任何可能对试图找出协议的人有帮助的内容,请将其加密。
GCC 的 -fomit-frame-pointer 选项可以使调试更加痛苦(但可能与 C++ 异常交互不良)。
Some simple suggestions for OSX:
Prevent gdb from attaching to your program
http://www.steike.com/code/debugging-itunes-with-gdb/
(this can be worked around, but will keep some casual explorers away)
Have at least some of the code in your product stored outside the text segment of the executable, for example in data, or in an external (encrypted) shared library.
Minimally protect any sensitive string data by not storing it in plain text. Run "strings" against your executable, and if you see anything that might be helpful to someone trying to figure out the protocol, encrypt it.
GCC's -fomit-frame-pointer option can make debugging more painful (but can interact badly with C++ exceptions).
如果我没记错的话,Skype正在使用类似于“Code Guards”的东西(也许他们付钱给他们在Skype中实现,谁知道):
https://www.cerias.purdue.edu/tools_and_resources/bibtex_archive/archive/2001-49.pdf
If I remember correctly Skype is using something similar (maybe they pay them to implement it in Skype, who knows) to "Code Guards" described in:
https://www.cerias.purdue.edu/tools_and_resources/bibtex_archive/archive/2001-49.pdf