3

コンパイルされたリリース .exe ファイルのバイナリを見ると、クラス/構造体の名前を見つけることができます! これは奇妙です-これらのシンボルには明らかに必要はありません。私が懸念しているのは、そのようなシンボルがソフトウェアのリバース エンジニアリングに使用され、ソフトウェア ライセンス保護に大きなリスクをもたらす可能性があることです。

たとえば、テキスト .?AVCMySecureKeyManager (元のクラス名は CMySecureKeyManager、すべての名前にプレフィックス ".?AV" が追加されているように見えます) を見つけることができます。私のコードが何をしているのかを簡単に推測できますよね?..ハッカーのためのドア。

特に、Visual C++ コンパイラ/リンカー オプションで可能なすべての最適化を有効にし、すべての参照/デバッグ情報の生成をオフにしたことがわかります。おそらく何か不足していますか?

4

1 に答える 1

3

You're seeing RTTI (Run-time Type Information). If you don't use dynamic_cast or typeid in your code, you can usually turn it off safely. Please note that exceptions always use RTTI (for the catch statement matching) and it's not possible to disable it for them.

If you do need dynamic_cast, then you can scrub the names from the EXE after compilation. The code does not depend on the actual name strings, but just their addresses.

That said, the class names, while useful, are not critical in reverse-engineering. Don't rely on their absence as a guarantee.

于 2012-07-02T11:06:43.907 に答える