c++ - Strip class name from rtti -
Let's say I'm writing some C ++ programs, I do not want to know how the binary leak information is working. I know that we can probably strip the symbols from binary, but class names are still archived and retrieved by RTTI information. So how can I avoid him? If I need to disable RTTI, will not be able to use C ++ features?
RTT depends on your compiler (and compiler version) what you lose if disabled.
For GCC 4.5, you can read:
Unable to generate information about each category with virtual functions -fno-rtti, the C ++ runtime If you do not use those parts of the language for use by typed identification features (dynamic_cast 'endipepid'), then you can save some space using this flag. Note that exception handling uses the same information, but it will generate it as necessary. The 'dynamic_cast' operator can still be used to enter, which does not require runtime type information, i.e. zero * or explicit base class is inserted.
For Visual Studio 2013:
Use / GR If the compiler can not resolve an object type in your code steadily. When your code uses dynamic_caster operator or typed, you usually need a GR option. However, / gr of your image Rdata increases the size of the square. If your code does not use dynamic_cast or typed, then / gr - can produce a small image
In this way, in fact, in these cases, it only
Dynamic_cast and
typed .
However, if the goal is to hide the behavior and some information about your executable, I do not think that
strip and RTTI has been disabled. This may be a good start, but to get a genuine binary security, you have to look at the Packer / Executable Protector / Opacity Tool ().
Comments
Post a Comment