Obfuscator-llvm Theos integrated configuration
I wrote an article about how to integrate and configure obfuscator-llvm in Xcode.
Obfuscator-llvm Xcode integrated configuration
In some cases when we use Theos to develop tweak, we need to integrate obfuscator-llvm into Theos, so the compiled dylib is also confusing. Through the official instructions to understand, use obfuscator-llvm 's clang to compile the program, and then add the-mllv-fla parameter can be confused, so as long as the Makefile to change the path of clang to obfuscator-llvm, and then add parameters on the line?
Include $(THEOS) / makefiles/common.mk THEOS_DEVICE_IP = 192.168.4.26 ARCHS = armv7 arm64TARGET = iphone:latest:8.0 TWEAK_NAME = test_dylibtest_dylib_FILES = $(wildcard eXProtect/*.m) Tweak.xmtest_FRAMEWORKS = UIKIT include $(THEOS_MAKE_PATH) / tweak.mk TARGET_CC = / Users/exchen/dev/src/obfuscator4.0-build/bin/clangTARGET_CXX = / Users/exchen/dev/src/obfuscator4.0-build/bin/clang++TARGET _ LD = / Users/exchen/dev/src/obfuscator4.0-build/bin/clang++_THEOS_TARGET_CFLAGS + =-mllvm-fla
-
To compare the effects of confusion and non-confusion, write the simplest code.
# include void main () {int I = 0; if (I = = 0) {I = 8;} printf ("% d\ n", I);}
Compiled using the command line, clang has to be compiled in obfuscator
Clang test.c-o test-mllvm-fla
If prompted that stdio.h is not found, add the include path with uppercase I.
Clang test.c-I yourinclude-o test-mllvm-fla
Or you can write a Makefile and compile it using the make command.
CC = / Users/exchen/dev/src/obfuscator4.0-build/bin/clangCCFLAGS =-mllvm-flaEXEC = testSRC = test.c all: $(CC) $(SRC)-I yourinclude-o $(EXEC) $(CCFLAGS)
Use the F5 feature of IDA to see the effect of confusion:
Original address: https://www.exchen.net/obfuscator-llvm-theos.html