Skip to content

Templated Obfuscation example in C++ for protecting/hiding values in memory

License

Notifications You must be signed in to change notification settings

AlSch092/ObfuscateThis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ObfuscateThis

Templated Obfuscation example in C++ for protecting/hiding values in memory, provides a class Obfuscator which contains static routines for obfuscating + deobfuscatiing basic types, along with a class template specialization for string type which deals with string encryption specifically.

What is this?

A standalone class for runtime obfuscation written in C++ which supports all basic data types and std::string. A simple (optional) wrapper is included in the 'tests' file (Obfuscate.cpp), and demonstrates usage of the class. String obfuscation loops over each letter of an input string and performs a XOR and then adds/subtracts another value based on the element's index being even or odd. Additional measures have been made to ensure that XOR brute forcing cannot occur, by using bit shifting.

Memory Implications

All routines are set as __forceinline such that a single location in memory cannot be hooked to reveal secrets. During deobfuscation, the obfuscated value is not revealed in memory, as only a deobfuscated copy is returned from the function.

License

There is no license associated with this code, you are free to use it as you wish!

Thank you for reading and taking an interest, happy coding.

About

Templated Obfuscation example in C++ for protecting/hiding values in memory

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages