Skip to content

Instantly share code, notes, and snippets.

@MH2033
Last active August 6, 2022 09:16
Show Gist options
  • Save MH2033/510d26b2bd2b9caec9beb61fe481fa45 to your computer and use it in GitHub Desktop.
Save MH2033/510d26b2bd2b9caec9beb61fe481fa45 to your computer and use it in GitHub Desktop.
Research on making reverse engineer proof C++ apps
1. Tools for analyzing and exploring executables
strings, nm, readelf, objdump
2. Compiler flags to exclude global symbol table and information generated by compiler(Also removing dead code)
"-fvisibility=hidden -fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,-s -Wl,--exclude-libs=ALL"
3. Making program safe against nm command by stripping unnecessary code sections
"strip -S -R .comment -R .note -R .note.ABI-tag <exec name>"
4. Removing linkage details and used library names from the executable(removing RPATH and RUNPATH info)
"chrpath -d <exec name>"
5. Obfuscating constant expression and strings from the code
This one is the trickiest and requires using libraries and tools for obfuscation
Some useful projects: https://github.com/Snowapril/String-Obfuscator-In-Compile-Time
https://github.com/adamyaxley/Obfuscate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment