Giter Site home page Giter Site logo

obfuscator's Introduction

Obfuscator

This is an obfuscator demonstrating how to use C++11/14 to generate, at compile time, obfuscated code without modifying the compiler or using any external obfuscation tools. It obfuscates strings and calls to functions. Based on the ADVobfuscator.

Installing

Just include Obfuscation.h and obfuscate all the way!

Examples

Obfuscate strings:

#define OBFUSCATE_STRINGS // to enable string obfuscation
include "Obfuscation.h"
...
XOR("This is an obfuscated string");
XORW(L"This is an obfuscated wide string");

Obfuscate function calls:

IFN(LoadLibraryA)("user32.dll"); // load the DLL where the MessageBoxA function is located
IFN(MessageBoxA)(NULL, "Hello World!", "Info", MB_OK); // make obfuscated function call

How it Works

The fundamentals of string obfuscation is discussed here. As for the obfuscated function call, basically, the approach is to use an indirect function call so that the address must be computed first and then called. The address of the function is hashed at compile-time. The hashed address is then compared to the hash map of functions from the imported modules of our program. If the hashes match, we invoke the function in that module.

How the hashes of functions from other modules are stored? A hash map of functions from the allowed modules are computed. We only limit a certain number of common imported modules to reduce unnecessary hashed functions that aren't commonly used and also to reduce the slowness of computing the hashes and tabulating them in our hash map.

obfuscator's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.