Skip to content

Conversation

@romainthomas
Copy link
Collaborator

Voici le début de ma contribution sur l'obfuscation : "Variable splitting". La passe marche avec des codes très simples (tests/ObfuscateVar/basic.c) et il y a encore un grand nombre d'ameliorations que je dois faire sur la structure de la passe et ses fonctionnalités.

	nouveau fichier : CMakeLists.txt
	nouveau fichier : cmake/Python.cmake
	nouveau fichier : llvm-passes/CMakeLists.txt
	nouveau fichier : llvm-passes/ObfuscateVar/ObfuscateVar.cpp
	nouveau fichier : llvm-passes/ObfuscateZero/ObfuscateZero.cpp
	nouveau fichier : tests/ObfuscateVar/basic.c
	nouveau fichier : tests/ObfuscateZero/basic_test.c
	nouveau fichier : tests/ObfuscateZero/check_openssl.sh
	nouveau fichier : tests/ObfuscateZero/check_zlib.sh
	nouveau fichier : tests/ObfuscateZero/null_pointer_test.c
	nouveau fichier : tests/ObfuscateZero/test_gep.c
	nouveau fichier : tests/ObfuscateZero/test_maxint.cpp
	nouveau fichier : tests/lit.cfg.in
	supprimé :        cmake/Python.cmake
@serge-sans-paille
Copy link
Contributor

I'll have a look at this tomorrow morning!

.gitignore Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not, but this is specific to your configuration, so I would not add this entry (e.g. I a generally using _build, or _fastbuild etc, should we list all of them here?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you delete the LiCENSE?

@serge-sans-paille
Copy link
Contributor

There are two big issues in your PR 👍
1/ the commit is not atomic (there should be a single commit, nobody cares about your private things ;-))
2/ Your transformation algorithm is not correct. What you should do is start with an empty value_map, then fill it with the converted values of the function arguments when it's legal (i.e. integer type), then process each instruction. For each instruction if it's an add and the operands have been transformed (or are constants), then replace it by the splitted operation and store a new binding in your valuemap. If it's an illegal operation, for each operand that has a splitted value, unsplit it and replace the value.

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