Coder Social home page Coder Social logo

dosx-dev / obfus.h Goto Github PK

View Code? Open in Web Editor NEW
422.0 10.0 47.0 784 KB

Macro-header for compile-time C obfuscation (tcc, win x86/x64)

License: MIT License

C 100.00%
c confuse easy-to-use information-security macro native obfuscation obfuscator protection tcc

obfus.h's Introduction

obfus.h

obfus.h is a macro-only library for compile-time obfuscating C applications, designed specifically for the Tiny C (tcc). It is tailored for Windows x86 and x64 platforms and supports almost all versions of the compiler. Very reliable armor for your C programs!

  • ๐Ÿ” Function Call Obfuscation: Confuse function calls to make your code less readable to unauthorized eyes.
  • ๐Ÿ›ก๏ธ Anti-Debugging Techniques: Built-in mechanisms to prevent code analysis during runtime.
  • ๐Ÿ”„ Control Flow Code Mutation: Turns code into spaghetti, making it difficult to parse conditions and loops.
  • ๐Ÿšซ Anti-Decompilation Techniques: Makes many popular decompilers useless visually breaking their output.
  • ๐Ÿ˜ˆ Fake Signatures Adding: Can add fake signatures of various packers and protectors to confuse reverse engineers.

Usage

Integrating obfus.h into your project is a simple process. Just include the following line in your code:

#include "obfus.h"

This will automatically obfuscate your code during compilation, ensuring protection and confidentiality of your intellectual property.

Available options for protection configuring:

// Additional options
#define cflow_v2       1  // More powerful Control Flow obfuscation (slowly!)
#define antidebug_v2   1  // Use better dynamic anti-debugging protection
#define fake_signs     1  // Adds fake signatures of various protectors or packers

// Disabling default features
#define no_cflow       1  // Don't use Control-Flow obfuscation
#define no_antidebug   1  // Don't build in debugging protection

or use it with compiler args:

tcc "app.c" -w  -D no_cflow  -D antidebug_v2  -D fake_signs

โš ๏ธ When compiling an application with obfuscation, use the -w argument to suppress warnings. Otherwise, the console will display numerous intimidating logs that have no impact on the final result. There's no need to be alarmed by them.

Example

// Let's obfuscate your code!

#include <stdio.h>

#define cflow_v2     1 // [+] ControlFlow v2
#define fake_signs   1 // [+] Fake signatures
#define antidebug_v2 1 // [+] AntiDebug v2
#define no_cflow     0 // [-] Disable ControlFlow
#define no_antidebug 0 // [-] Disable AntiDebug

#include "obfus.h"

void main() {
    char *out = malloc(256);

    strcpy(out, "Hello, world!");

    if (out) {
        printf(out);
    } else {
        printf("Error!");
    }
}

Version

The latest version of Tiny C (0.9.27) is recommended for use. Unfortunately, some versions of the compiler do not support the functionality needed to completely obfuscation.

Special thanks

Thanks to everyone who helped in the development of this project. I appreciate it! โค๏ธ

  • ๐Ÿ‘จ๐Ÿผโ€๐Ÿ’ป @horsicq (for help with the code and advices)
  • ๐ŸฆŠ @ac3ss0r (for cool ideas and their solutions)

obfus.h's People

Contributors

dosx-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

obfus.h's Issues

MSVC

I'd like to see msvc support.
I'm getting a lot of errors in visual studio.

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.