Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add yag00's String Obfuscation pass #11

Open
wants to merge 1 commit into
base: llvm-3.4
Choose a base branch
from

Conversation

Fuzion24
Copy link

This iterates over all of the global variables, adds a ciphered version of the strings, iterates over all the instructions and replaces references to the global variables with a function to decipher the string.

It seems to work well for me:

➜  build git:(yag00/StringObfuscation) ✗ cat /tmp/test.c
#include <stdio.h>

 const char * worldHi = "whatup, world";

int main(void){
  printf("Hello, there\n");
  printf("%s\n", worldHi);
  return 0;
}
➜  build git:(yag00/StringObfuscation) ✗ bin/clang -mllvm -xse /tmp/test.c
➜  build git:(yag00/StringObfuscation) ✗ ./a.out
Hello, there
whatup, world
➜  build git:(yag00/StringObfuscation) ✗ strings a.out
5]YEV$
*9/mi

string encryption pass : handle more cases

fix filename AbstractStringEncryptionPass.cpp

fix cmake build

remove unused clear string global variable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants