Obfuscator refactored and extended from OLLVM.

Overview

OLLVM++

Obfuscator refactored and extended from OLLVM.

Environment

  • Ubuntu 18.04.5 LTS
  • LLVM 12.0.1
  • Clang 12.0.1
  • CMake 3.21.1

Usage

Compile Obfuscation Passes

if [ ! -d "Build" ]; then
    mkdir Build
fi
cd ./Build
cmake ../Transforms
make

Generate LLVM IR

clang -S -emit-llvm TestProgram.cpp -o IR/orig.ll

Control Flow Flattening

opt -lowerswitch -S IR/orig.ll -o IR/lowerswitch.ll
opt -load ../Build/LLVMObfuscator.so -fla -split_num 3 -S IR/lowerswitch.ll -o IR/fla.ll
clang IR/fla.ll -o Bin/fla

Bogus Control Flow

opt -load ../Build/LLVMObfuscator.so -bcf -bcf_loop 1 -split_num 3 -S IR/orig.ll -o IR/bcf.ll
clang IR/bcf.ll -o Bin/bcf

Instruction Substitution

opt -load ../Build/LLVMObfuscator.so -sub -sub_loop 2 -S IR/orig.ll -o IR/sub.ll
clang IR/sub.ll -o Bin/sub

Random Control Flow

opt -load ../Build/LLVMObfuscator.so -rcf -S IR/orig.ll -o IR/rcf.ll
llc -filetype=obj -mattr=+rdrnd IR/rcf.ll -o Bin/rcf.o
clang Bin/rcf.o -o Bin/rcf

Constant Substitution

opt -load ../Build/LLVMObfuscator.so -csub -csub_loop 2 -S IR/orig.ll -o IR/csub.ll
clang IR/csub.ll -o Bin/csub

Features

Control Flow Flattening

Bogus Control Flow

Instruction Substitution

Random Control Flow

Constant Substitution

Comments
  • ndk-r23b版本 重编译后无法使用

    ndk-r23b版本 重编译后无法使用

    您好~在发出这份issues之前,我已经仔细拜读了您在看雪论坛的文章,并且在服务器环境尝试复现,但是我遇到了一些问题,请允许我向您详细说明,希望能获得您的帮助,感谢~


    复现环境

    • 服务器:Ubuntu 20.04 x64
    • 目标NDK:23.1.7779620
    • 添加的PASS:Pluto-Obfuscator

    操作方式

    其实就是按照您在看雪论坛的介绍来走的 已经重复操作3次 应该没有漏掉什么步骤 下面我简单描述一下操作步骤

    • 下载repo
      curl https://storage.googleapis.com/git-repo-downloads/repo > /usr/bin/repo
      chmod a+x /usr/bin/repo
      
    • repo下载对应版本的源码
      mkdir ndk-llvm && cd ndk-llvm
      repo init -u https://android.googlesource.com/platform/manifest -b llvm-toolchain
      cp $TOOLCHAIN_DIR/manifest_7714059.xml .repo/manifests
      repo init -m manifest_7714059.xml
      repo sync -c
      
    • 安装/修复必要环境
      sudo apt-get install cmake bison
      find /usr/lib -name libffi.so*
      ln -s /usr/lib/x86_64-linux-gnu/libffi.so.7 /usr/lib/x86_64-linux-gnu/libffi.so.6
      
    • 开始编译流程
      python toolchain/llvm_android/build.py --no-build linux
      
    • 添加PASS 这一步大佬在看雪论坛的文章中 漏掉了一些小步骤 不过无伤大雅 下面我简单对步骤进行概括
    • 添加/include/llvm/Transforms/Obfuscation <-- 此步大佬遗漏
    • 添加/lib/Transforms/Obfuscation
    • 修改/lib/Transforms/IPO/PassManagerBuilder.cpp三处代码
    • /lib/Transforms/IPO/CMakeLists.txt中添加Obfuscation
    • /lib/Transforms/CMakeLists.txt中添加Obfuscation <--此步大佬遗漏
    • 重新编译
      python toolchain/llvm_android/build.py --no-build linux
      

    得益于大佬您的文章介绍,我的编译流程比较顺利,中间没有因为erro而产生中断


    出现的问题

    就好像 #5 遇到的问题一样 我使用的是ndk-build脚本, #5 貌似使用的是cmake,不过情况都是一样的 我们自己编译的 ndk-r23,在移植后出现一些报错情况,关键内容如下:

    ....../build/core/setup-toolchain.mk:111: pipe: No error
    ....../build/core/prebuilt-library.mk:45: *** Android NDK: Aborting    .  Stop.
    ....../sources/cxx-stl/llvm-libc++abi/Android.mk:unwind: LOCAL_SRC_FILES points to a missing file 
    ......Android NDK: Check that /lib/linux/arm/libunwind.a exists  or that its path is correct 
    

    在参考了 #5 以后,我也查看了一下编译产物的格式

    • 这是我们自己编译的产物
      [email protected]:~/ndk-llvm-r416183c1/out/install/windows-x86/clang-dev/bin# file clang*
      clang-check.exe:  PE32+ executable (console) x86-64, for MS Windows
      clang-cl.exe:     symbolic link to clang.exe
      clang++.exe:      symbolic link to clang.exe
      clang.exe:        PE32+ executable (console) x86-64, for MS Windows
      clang-format.exe: PE32+ executable (console) x86-64, for MS Windows
      clang-tidy.exe:   PE32+ executable (console) x86-64, for MS Windows
      
    • 这是从谷歌官网下载的ndk
      ❯ file clang*
      clang++.exe:      PE32+ executable (console) x86-64, for MS Windows
      clang-check.exe:  PE32+ executable (console) x86-64, for MS Windows
      clang-cl.exe:     PE32+ executable (console) x86-64, for MS Windows
      clang-format.exe: PE32+ executable (console) x86-64, for MS Windows
      clang-tidy.exe:   PE32+ executable (console) x86-64, for MS Windows
      clang.exe:        PE32+ executable (console) x86-64, for MS Windows
      

    如果可以,我也想看一看大佬编译产物的格式,确认这之间是否存在差异


    自己尝试过的研究

    我本人使用的是macOS,最初是想要按照大佬的思路去编译mac版本的toolchain。 不过我发现按照谷歌官方对toolchain/llvm_android步骤操作后,有且只有Windows版本和Linux版本的clang-dev。 没有android/toolchain/prebuilts/ndk-darwin/r23中的产物,遂将目光转移到Windows版本的PASS移植。 这里插一嘴,如果大佬知道macOS版本的toolchain如何编译的话,烦请指点。

    1. 既然说按照大佬的文章操作,我这里出现了一点点问题,那么换一个角度。 我在macOS上按照常规方法操作,将大佬的项目clone下来以后,按照README的说法,使用cmake对大佬的项目进行构建。 即:添加PASS再编译llvm以后,将bin目录生成的工具替换到ndk中的toolchain里面去。 同时将编译后的lib64添加到ndk中toolchain的lib64里面去,同时修复头文件缺失问题以后。

      关于llvm编译后生成lib64目录
      如果我们单独在编译llvm时,为了适配ndk,应该对cmake编译添加参数 -DLLVM_LIBDIR_SUFFIX=64 ,即可让lib自动重命名为lib64,以此解决环境依赖问题,详细请参考Google的build.py脚本
      遗憾的是,在移植完成以后,`ndk-build`依然报错,由于未能及时记录报错信息,这里的erro无法进行展示,抱歉。 同时,我观察到,ndk中toolchain的clang-12约100+MB,可是我编译的貌似只有1MB大小,这是否是因为我仅只是clone了大佬的项目,直接进行编译,而没有将他们移植到整个llvm-project中导致的?
    2. 会不会在编译进PASS之前,bin目录的文件格式正常? 抱着这种想法,我重开项目,并且在没有添加PASS情况下,编译出了out产物。 很遗憾的是,我发现,对于ndk-r23b来说,即使我们没有添加PASS,他的编译产物格式依然如下:

      [email protected]:~/ndk-llvm-r416183c1/out/install/windows-x86/clang-dev/bin# file clang*
      clang-check.exe:  PE32+ executable (console) x86-64, for MS Windows
      clang-cl.exe:     symbolic link to clang.exe
      clang++.exe:      symbolic link to clang.exe
      clang.exe:        PE32+ executable (console) x86-64, for MS Windows
      clang-format.exe: PE32+ executable (console) x86-64, for MS Windows
      clang-tidy.exe:   PE32+ executable (console) x86-64, for MS Windows
      

      也就是说,我们自己编译的ndk-r23b的toolchain,就是和谷歌官方不一样的文件格式,即使没有添加进PASS

    3. 我的第二个分析,似乎是在说明,我们自己编译的toolchain是错误的,无法使用,但是谷歌官方的教程:Instructions to rebuild a particular toolchain release似乎也就是这样,我们并没有遗漏掉什么。 不甘心放弃,于是,我对老版本的ndk-22.1.7171670进行编译,发现了有意思的事情。 对老版本ndk-22.1.7171670进行编译以后,我对编译产物进行file发现:

      [email protected]:~/ndk-llvm-r416183c1/out/install/windows-x86/clang-dev/bin# file clang*
      clang++.exe:      PE32+ executable (console) x86-64, for MS Windows
      clang-check.exe:  PE32+ executable (console) x86-64, for MS Windows
      clang-cl.exe:     PE32+ executable (console) x86-64, for MS Windows
      clang-format.exe: PE32+ executable (console) x86-64, for MS Windows
      clang-tidy.exe:   PE32+ executable (console) x86-64, for MS Windows
      clang.exe:        PE32+ executable (console) x86-64, for MS Windows
      

      按照这种方式,编译的老版本ndk居然是正常的!没有出现所谓的symbolic link to clang.exe! 果断添加PASS重新编译 --> 再次file -- > 文件格式正常! --> 移植ndk -- > 测试ndk-build 让人欣喜的事情来了,在file文件格式全部正常的情况下,使用ndk-build,编译过程没有任何问题!没有报错! 到这里,我们至少确认了一件事,那就是,之前的报错就是因为file文件格式不正确导致的 于是,添加混淆参数,进行混淆编译 --> 未混淆编译产物5kb,混淆后编译产物23kb 貌似成功了?抱着激动的心情,打开ida,分别对比未混淆和混淆后,让我失望的事情来了,混淆前后在ida中的表现是一样的。 也就是说,除了文件体积的变化外,文件并没有得到更安全的保护。

    4. 转念一想,大佬您的这款PASS是基于llvm-12编写的,也许他对老版本的ndk所采用的llvm-11是不生效的。 于是,我换用了heroims大佬的PASS,移植结束以后 file文件格式依然全部正常,编译流程没有erro <-- 这里再次证明,ndk-r23b的toolchain之所以报错,就是因为file格式问题 很遗憾的是,虽然编译确实没有报错,混淆前后文件大小确实也产生变化,但是,使用ida进行查看的时候,混淆依然没有生效。

      顺便一提,我们ndk-r23b使用的是clang12,在heroims大佬项目的issues中 我找到了libunwind.a有关报错的解决方案https://github.com/heroims/obfuscator/issues/7#issuecomment-1025939903 导致该问题的原因,大概就是谷歌build.py脚本让lib自动重命名为lib64,产生的环境依赖问题 但由于我们本身就应该是build.py构建的环境,不应该有这种报错才对


    最后

    至此,我已经无计可施,本以为是谷歌ndk在r23版本存在某种问题。 但是转念一想,大佬您已经在和我相同的ndk版本下,实测成功,并且上传了examples。 我认为,是我在某些步骤上的操作有所遗漏或者错误。 希望大佬能够分析一下我的流程有哪些地方存在问题,不胜感激~

    opened by SsageParuders 20
  • Failing to build project.

    Failing to build project.

    Hi! I have compiled the project by following your instruction on bbs.pediy forum, everything goes smoothly but for some reason I cannot compile my project in Android Studio, following error shows whenever I try to compile.

    CXX5202] This app only has 32-bit [armeabi-v7a] native libraries. Beginning August 1, 2019 Google Play store requires that all apps that include native libraries must provide 64-bit versions. For more information, visit https://g.co/64-bit-requirement
    C/C++: process_begin: CreateProcess(F:\AndroidSdk\ndk\pluto-ndk\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe, F:/AndroidSdk/ndk/pluto-ndk/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -print-resource-dir, ...) failed.
    C/C++: F:/AndroidSdk/ndk/pluto-ndk/build//../build/core/setup-toolchain.mk:111: pipe: No error
    C/C++: F:/AndroidSdk/ndk/pluto-ndk/build//../build/core/prebuilt-library.mk:45: *** Android NDK: Aborting    .  Stop.
    [CXX1405] error when building with ndkBuild using C:\Users\Admin\Desktop\MyProject\app\src\main\jni\Android.mk: Build command failed.
    Error while executing process F:\AndroidSdk\ndk\pluto-ndk\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\Admin\Desktop\MyProject\app\src\main\jni\Android.mk NDK_APPLICATION_MK=C:\Users\Admin\Desktop\MyProject\app\src\main\jni\Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 APP_PLATFORM=android-19 NDK_OUT=C:\Users\Admin\Desktop\MyProject\app\build\intermediates\cxx\Debug\1d81t4p4/obj NDK_LIBS_OUT=C:\Users\Admin\Desktop\MyProject\app\build\intermediates\cxx\Debug\1d81t4p4/lib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
    Android NDK: ERROR:F:/AndroidSdk/ndk/pluto-ndk/build//../sources/cxx-stl/llvm-libc++abi/Android.mk:unwind: LOCAL_SRC_FILES points to a missing file    
    Android NDK: Check that /lib/linux/arm/libunwind.a exists  or that its path is correct   
    
    process_begin: CreateProcess(F:\AndroidSdk\ndk\pluto-ndk\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe, F:/AndroidSdk/ndk/pluto-ndk/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -print-resource-dir, ...) failed.
    F:/AndroidSdk/ndk/pluto-ndk/build//../build/core/setup-toolchain.mk:111: pipe: No error
    F:/AndroidSdk/ndk/pluto-ndk/build//../build/core/prebuilt-library.mk:45: *** Android NDK: Aborting    .  Stop.
    

    The error states that Android NDK: Check that /lib/linux/arm/libunwind.a exists or that its path is correct but the file is clearly present under the path F:\AndroidSdk\ndk\pluto-ndk\toolchains\llvm\prebuilt\windows-x86_64\lib64\clang\12.0.8\lib\linux\arm

    One more thing I have noticed that the clang++ of newly compile llvm cannot be executed, it states that 16-bit applications are not supported whereas the clang++ of original ndk is executed without any issue.

    Dont know if its worth mentioning or not, but I compiled the modified llvm in ubuntu.

    Any help or insight will be appreciated.

    opened by afk-Legacy 6
  • Compile error

    Compile error

    There seems to be error in CodeGenPassBuilder. I could not figure out how to fix this error

    FAILED: lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/CodeGenPassBuilder.cpp.obj
    E:\llvm-mingw-20220906-ucrt-x86_64\bin\c++.exe -DGTEST_HAS_RTTI=0 -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IE:/Github/Pluto-Obfuscator/build/lib/CodeGen -IE:/Github/Pluto-Obfuscator/llvm/lib/CodeGen -IE:/Github/Pluto-Obfuscator/build/include -IE:/Github/Pluto-Obfuscator/llvm/include -Wa,-mbig-obj -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -O3 -DNDEBUG  -fno-exceptions -fno-rtti -std=c++14 -MD -MT lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/CodeGenPassBuilder.cpp.obj -MF lib\CodeGen\CMakeFiles\LLVMCodeGen.dir\CodeGenPassBuilder.cpp.obj.d -o lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/CodeGenPassBuilder.cpp.obj -c E:/Github/Pluto-Obfuscator/llvm/lib/CodeGen/CodeGenPassBuilder.cpp
    In file included from E:/Github/Pluto-Obfuscator/llvm/lib/CodeGen/CodeGenPassBuilder.cpp:14:
    In file included from E:/Github/Pluto-Obfuscator/llvm/include/llvm/CodeGen/CodeGenPassBuilder.h:21:
    In file included from E:/Github/Pluto-Obfuscator/llvm/include/llvm/Analysis/AliasAnalysis.h:40:
    E:/Github/Pluto-Obfuscator/llvm/include/llvm/ADT/DenseMap.h:128:16: warning: variable 'NumEntries' set but not used [-Wunused-but-set-variable]
          unsigned NumEntries = getNumEntries();
                   ^
    In file included from E:/Github/Pluto-Obfuscator/llvm/lib/CodeGen/CodeGenPassBuilder.cpp:14:
    In file included from E:/Github/Pluto-Obfuscator/llvm/include/llvm/CodeGen/CodeGenPassBuilder.h:53:
    E:/Github/Pluto-Obfuscator/llvm/include/llvm/Transforms/Utils.h:170:1: error: expected function body after function declarator
    } // namespace llvm
    ^
    In file included from E:/Github/Pluto-Obfuscator/llvm/lib/CodeGen/CodeGenPassBuilder.cpp:21:
    E:/Github/Pluto-Obfuscator/llvm/include/llvm/CodeGen/MachinePassRegistry.def:131:47: error: use of undeclared identifier 'MachineOutlinerPass'
    DUMMY_MACHINE_MODULE_PASS("machine-outliner", MachineOutlinerPass, ())
                                                  ^
    In file included from E:/Github/Pluto-Obfuscator/llvm/lib/CodeGen/CodeGenPassBuilder.cpp:24:
    E:/Github/Pluto-Obfuscator/llvm/include/llvm/CodeGen/MachinePassRegistry.def:137:44: error: use of undeclared identifier 'PrintMIRPass'; did you mean 'PrintLoopPass'?
    DUMMY_MACHINE_FUNCTION_PASS("mir-printer", PrintMIRPass, ())
                                               ^~~~~~~~~~~~
                                               PrintLoopPass
    E:/Github/Pluto-Obfuscator/llvm/lib/CodeGen/CodeGenPassBuilder.cpp:23:15: note: expanded from macro 'DUMMY_MACHINE_FUNCTION_PASS'
      AnalysisKey PASS_NAME::Key;
                  ^
    E:/Github/Pluto-Obfuscator/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h:494:7: note: 'PrintLoopPass' declared here
    class PrintLoopPass : public PassInfoMixin<PrintLoopPass> {
          ^
    In file included from E:/Github/Pluto-Obfuscator/llvm/lib/CodeGen/CodeGenPassBuilder.cpp:24:
    E:/Github/Pluto-Obfuscator/llvm/include/llvm/CodeGen/MachinePassRegistry.def:137:1: error: cannot define or redeclare 'Key' here because namespace 'llvm' does not enclose namespace 'PrintLoopPass'
    DUMMY_MACHINE_FUNCTION_PASS("mir-printer", PrintMIRPass, ())
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    E:/Github/Pluto-Obfuscator/llvm/lib/CodeGen/CodeGenPassBuilder.cpp:23:26: note: expanded from macro 'DUMMY_MACHINE_FUNCTION_PASS'
      AnalysisKey PASS_NAME::Key;
                  ~~~~~~~~~~~^
    In file included from E:/Github/Pluto-Obfuscator/llvm/lib/CodeGen/CodeGenPassBuilder.cpp:24:
    E:/Github/Pluto-Obfuscator/llvm/include/llvm/CodeGen/MachinePassRegistry.def:138:54: error: use of undeclared identifier 'FreeMachineFunctionPass'
    DUMMY_MACHINE_FUNCTION_PASS("free-machine-function", FreeMachineFunctionPass, ())
                                                         ^
    E:/Github/Pluto-Obfuscator/llvm/include/llvm/CodeGen/MachinePassRegistry.def:139:46: error: use of undeclared identifier 'FinalizeISelPass'
    DUMMY_MACHINE_FUNCTION_PASS("finalize-isel", FinalizeISelPass, ())
                                                 ^
    E:/Github/Pluto-Obfuscator/llvm/include/llvm/CodeGen/MachinePassRegistry.def:140:48: error: use of undeclared identifier 'LocalStackSlotPass'
    DUMMY_MACHINE_FUNCTION_PASS("localstackalloc", LocalStackSlotPass, ())
                                                   ^
    E:/Github/Pluto-Obfuscator/llvm/include/llvm/CodeGen/MachinePassRegistry.def:141:44: error: use of undeclared identifier 'ShrinkWrapPass'
    DUMMY_MACHINE_FUNCTION_PASS("shrink-wrap", ShrinkWrapPass, ())
                                               ^
    E:/Github/Pluto-Obfuscator/llvm/include/llvm/CodeGen/MachinePassRegistry.def:142:45: error: use of undeclared identifier 'PrologEpilogInserterPass'
    DUMMY_MACHINE_FUNCTION_PASS("prologepilog", PrologEpilogInserterPass, ())
                                                ^
    E:/Github/Pluto-Obfuscator/llvm/include/llvm/CodeGen/MachinePassRegistry.def:143:46: error: use of undeclared identifier 'ExpandPostRAPseudosPass'
    DUMMY_MACHINE_FUNCTION_PASS("postrapseudos", ExpandPostRAPseudosPass, ())
                                                 ^
    E:/Github/Pluto-Obfuscator/llvm/include/llvm/CodeGen/MachinePassRegistry.def:144:53: error: use of undeclared identifier 'ImplicitNullChecksPass'
    DUMMY_MACHINE_FUNCTION_PASS("implicit-null-checks", ImplicitNullChecksPass, ())
                                                        ^
    E:/Github/Pluto-Obfuscator/llvm/include/llvm/CodeGen/MachinePassRegistry.def:145:44: error: use of undeclared identifier 'PostMachineSchedulerPass'
    DUMMY_MACHINE_FUNCTION_PASS("postmisched", PostMachineSchedulerPass, ())
                                               ^
    E:/Github/Pluto-Obfuscator/llvm/include/llvm/CodeGen/MachinePassRegistry.def:146:50: error: use of undeclared identifier 'MachineSchedulerPass'
    DUMMY_MACHINE_FUNCTION_PASS("machine-scheduler", MachineSchedulerPass, ())
                                                     ^
    E:/Github/Pluto-Obfuscator/llvm/include/llvm/CodeGen/MachinePassRegistry.def:147:43: error: use of undeclared identifier 'MachineCopyPropagationPass'
    DUMMY_MACHINE_FUNCTION_PASS("machine-cp", MachineCopyPropagationPass, ())
                                              ^
    E:/Github/Pluto-Obfuscator/llvm/include/llvm/CodeGen/MachinePassRegistry.def:148:46: error: use of undeclared identifier 'PostRASchedulerPass'
    DUMMY_MACHINE_FUNCTION_PASS("post-RA-sched", PostRASchedulerPass, ())
                                                 ^
    E:/Github/Pluto-Obfuscator/llvm/include/llvm/CodeGen/MachinePassRegistry.def:149:46: error: use of undeclared identifier 'FEntryInserterPass'
    DUMMY_MACHINE_FUNCTION_PASS("fentry-insert", FEntryInserterPass, ())
                                                 ^
    E:/Github/Pluto-Obfuscator/llvm/include/llvm/CodeGen/MachinePassRegistry.def:150:53: error: use of undeclared identifier 'XRayInstrumentationPass'
    DUMMY_MACHINE_FUNCTION_PASS("xray-instrumentation", XRayInstrumentationPass, ())
                                                        ^
    E:/Github/Pluto-Obfuscator/llvm/include/llvm/CodeGen/MachinePassRegistry.def:151:51: error: use of undeclared identifier 'PatchableFunctionPass'
    DUMMY_MACHINE_FUNCTION_PASS("patchable-function", PatchableFunctionPass, ())
                                                      ^
    E:/Github/Pluto-Obfuscator/llvm/include/llvm/CodeGen/MachinePassRegistry.def:152:54: error: use of undeclared identifier 'RegUsageInfoPropagationPass'
    DUMMY_MACHINE_FUNCTION_PASS("reg-usage-propagation", RegUsageInfoPropagationPass, ())
                                                         ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    1 warning and 20 errors generated.
    [332/4104] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/CFIInstrInserter.cpp.obj
    In file included from E:/Github/Pluto-Obfuscator/llvm/lib/CodeGen/CFIInstrInserter.cpp:23:
    In file included from E:/Github/Pluto-Obfuscator/llvm/include/llvm/CodeGen/MachineFunctionPass.h:21:
    In file included from E:/Github/Pluto-Obfuscator/llvm/include/llvm/CodeGen/MachineFunction.h:22:
    E:/Github/Pluto-Obfuscator/llvm/include/llvm/ADT/DenseMap.h:128:16: warning: variable 'NumEntries' set but not used [-Wunused-but-set-variable]
          unsigned NumEntries = getNumEntries();
                   ^
    1 warning generated.
    [333/4104] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/CommandFlags.cpp.obj
    In file included from E:/Github/Pluto-Obfuscator/llvm/lib/CodeGen/CommandFlags.cpp:15:
    In file included from E:/Github/Pluto-Obfuscator/llvm/include/llvm/CodeGen/CommandFlags.h:18:
    In file included from E:/Github/Pluto-Obfuscator/llvm/include/llvm/IR/Instructions.h:28:
    In file included from E:/Github/Pluto-Obfuscator/llvm/include/llvm/IR/BasicBlock.h:22:
    In file included from E:/Github/Pluto-Obfuscator/llvm/include/llvm/IR/Instruction.h:22:
    In file included from E:/Github/Pluto-Obfuscator/llvm/include/llvm/IR/DebugLoc.h:17:
    In file included from E:/Github/Pluto-Obfuscator/llvm/include/llvm/IR/TrackingMDRef.h:16:
    In file included from E:/Github/Pluto-Obfuscator/llvm/include/llvm/IR/Metadata.h:19:
    E:/Github/Pluto-Obfuscator/llvm/include/llvm/ADT/DenseMap.h:128:16: warning: variable 'NumEntries' set but not used [-Wunused-but-set-variable]
          unsigned NumEntries = getNumEntries();
                   ^
    1 warning generated.
    [334/4104] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/CodeGenPrepare.cpp.obj
    In file included from E:/Github/Pluto-Obfuscator/llvm/lib/CodeGen/CodeGenPrepare.cpp:17:
    E:/Github/Pluto-Obfuscator/llvm/include/llvm/ADT/DenseMap.h:128:16: warning: variable 'NumEntries' set but not used [-Wunused-but-set-variable]
          unsigned NumEntries = getNumEntries();
                   ^
    1 warning generated.
    ninja: build stopped: subcommand failed.
    PS E:\Github\Pluto-Obfuscator>
    
    bug 
    opened by VanHoevenTR 5
  • Compiling under Windows

    Compiling under Windows

    I try to install pluto obfuscator in Android NDK 23 by following this step https://github.com/o2e/OLLVM-9.0.1#%E6%95%B4%E5%90%88%E5%88%B0ndk but i'm getting error

    C:\Users\uwu\AppData\Local\Android\Sdk\ndk\23.0.7599858\ndk-build
    fcntl(): Bad file descriptor
    Android NDK: APP_PLATFORM not set. Defaulting to minimum supported version android-16.
    Android NDK: WARNING: APP_PLATFORM android-16 is higher than android:minSdkVersion 1 in ./AndroidManifest.xml. NDK binaries will *not* be compatible with devices older than android-16. See https://android.googlesource.com/platform/ndk/+/master/docs/user/common_problems.md for more information.
    Android NDK: ERROR:C:/Users/uwu/AppData/Local/Android/Sdk/ndk/23.0.7599858/build//../sources/cxx-stl/llvm-libc++abi/Android.mk:unwind: LOCAL_SRC_FILES points to a missing file
    Android NDK: Check that /lib/linux/arm/libunwind.a exists  or that its path is correct
    C:/Users/uwu/AppData/Local/Android/Sdk/ndk/23.0.7599858/build//../build/core/prebuilt-library.mk:45: *** Android NDK: Aborting    .  Stop.
    

    I read this issue to solve, so the directory become C:\Users\uwu\AppData\Local\Android\Sdk\ndk\23.0.7599858\toolchains\llvm\prebuilt\windows-x86_64\lib\clang\12.0.1\lib\linux\arm but still getting same error https://github.com/heroims/obfuscator/issues/7#issuecomment-1025939903

    What i'm missing?

    Can you upgrade llvm to 12.0.5 by any change?

    question 
    opened by VanHoevenTR 5
  • LLVMObfuscator.so missing

    LLVMObfuscator.so missing

    compiling using

    cd build
    cmake -G "Ninja" -DLLVM_ENABLE_PROJECTS="clang" \
        -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86" \
        -DBUILD_SHARED_LIBS=On ../llvm
    ninja
    

    on macOS does not seem to compile LLVMObfuscator.so but anything else

    opened by iraizo 3
  • [MacOS] don't hardcode z3lib.so and build errors

    [MacOS] don't hardcode z3lib.so and build errors

    if you want this to be cross-platform do not hardcode link_libraries("/usr/lib/libz3.so"). Perhaps add a dep requirement in the readme and if/else OS directive?

    i have installed z3 via homebrew and it triggers the build: link_libraries("/opt/homebrew/lib/libz3.dylib")

    however, I get lots of build warnings and errors half way.

    .../Obfuscation/CryptoUtils.h:68:2: error: "Unknown endianness of the compilation platform, check this header aes_encrypt.h" #error

    opened by nullhook 2
  • cannot find -lLLVMTransformUtils

    cannot find -lLLVMTransformUtils

    Hi, I've recently built this project and ran into the following issues:

    • the line link_libraries("libLLVMTransformUtils.so") in Transforms/CMakeLists.txt results in /usr/bin/ld: cannot find -lLLVMTransformUtils and so LLVMObfuscator.so cannot be built.
    • but then I tried to remove that line from Transforms/CMakeLists.txt and the test successfully ran, I've also checked the generated binaries and they seemed to be obfuscated fine.

    I wonder how can the project be built successfully without that line, and does it affect the result if I remove it? Thank you.

    opened by lkmidas 2
  • Obfuscation/MBAUtils.h:1:10: fatal error: 'z3++.h' file not found

    Obfuscation/MBAUtils.h:1:10: fatal error: 'z3++.h' file not found

    按照看雪的教程编译win ndk,但是出现这个,我已经安装了 sudo apt install libz3-dev ,测试没有用。我又在 ~/llvm-toolchain/toolchain/llvm-project/llvm/lib/Transforms/IPO/CMakeLists.txt 中添加了,也没起到作用。

    include_directories ("/usr/include/") link_directories("/usr/lib/x86_64-linux-gnu/")

    bug 
    opened by HuErr 1
  • Compiler not found on Windows

    Compiler not found on Windows

    I'm getting this error trying to compile on Win10. i have cmake and ninja installed. How can i fix it?

    PS C:\Users\Administrator\Documents\GitHub\Pluto-Obfuscator\build> cmake -G "Ninja" -DLLVM_ENABLE_PROJECTS="clang"  -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86" -DBUILD_SHARED_LIBS=On ../llvm
    -- The C compiler identification is unknown
    -- The CXX compiler identification is unknown
    -- The ASM compiler identification is unknown
    -- Didn't find assembler
    CMake Error at CMakeLists.txt:38 (project):
      No CMAKE_C_COMPILER could be found.
    
      Tell CMake where to find the compiler by setting either the environment
      variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
      the compiler, or to the compiler name if it is in the PATH.
    
    
    CMake Error at CMakeLists.txt:38 (project):
      No CMAKE_CXX_COMPILER could be found.
    
      Tell CMake where to find the compiler by setting either the environment
      variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
      to the compiler, or to the compiler name if it is in the PATH.
    
    
    CMake Error at CMakeLists.txt:38 (project):
      No CMAKE_ASM_COMPILER could be found.
    
      Tell CMake where to find the compiler by setting either the environment
      variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
      to the compiler, or to the compiler name if it is in the PATH.
    
    
    -- Warning: Did not find file Compiler/-ASM
    -- Configuring incomplete, errors occurred!
    See also "C:/Users/Administrator/Documents/GitHub/Pluto-Obfuscator/build/CMakeFiles/CMakeOutput.log".
    See also "C:/Users/Administrator/Documents/GitHub/Pluto-Obfuscator/build/CMakeFiles/CMakeError.log".
    PS C:\Users\Administrator\Documents\GitHub\Pluto-Obfuscator\build> ninja
    ninja: error: loading 'build.ninja': The system cannot find the file specified.
    
    opened by ghost 1
  • Invite for collaboration

    Invite for collaboration

    Hi bluesadi or 34r7hm4n ,

    First of, I would like to thank you for your hardwork researching obfuscation methods with LLVM, or OLLVM as we all call. I have checked out your blog posts and projects, those are wonderful and insightful.

    As I am currently working on OLLVM and researching about obfuscation. I think that we can work together to bring more ideas and improve the project. That is why I am writing you this as an invitation for collaboration.

    Furthur details can be discussed directly to me in discord: luibo#0645.

    If you're reluctant to have a conversation, you can try our RE challenge released at https://ctf.hackemall.live/. The CTF starts 00:00 01/01/2022 (UTC). The challenge is named crackme pls and authored by midas and luibo. The challenge is obfuscated using our customed version of OLLVM.

    Looking forward to your reply.

    P/S 1: I left comments in your latest blog post about MBA, but I feel the need to message you here because there is no direct contact methods and you may not read blog comments and the CTF is starting soon.

    P/S 2: I welcome your CTF team to join the CTF also.

    P/S 3: Have a wonderful new year.

    opened by nganhkhoa 1
  •  fatal error: 'llvm/Transforms/Obfuscation/HelloWorld.h' file not found

    fatal error: 'llvm/Transforms/Obfuscation/HelloWorld.h' file not found

    我根据文章操作,"在toolchain/llvm-project/llvm/lib/Transforms/Obfuscation/中加入自己的代码" (Obfuscation没有这个文件夹,我直接把你的Pluto-Obfuscator里的文件夹及文件复制过去了)

    然后python3 toolchain/llvm_android/build.py --no-build linux

    最后报错:

    -- Configuring done
    
    -- Generating done
    
    -- Build files have been written to: /home/guo/test/llvm-toolchain/out/stage1
    
    DEBUG:utils:subprocess.run:10:26:48 /home/guo/test/llvm-toolchain/prebuilts/build-tools/linux-x86/bin/ninja
    
    [5/44] Linking CXX shared library lib6...libclang_rt.ubsan_standalone-x86_64.so
    
    clang-12: warning: argument unused during compilation: '-static-libstdc++' [-Wunused-command-line-argument]
    
    [6/44] Linking CXX shared library lib6...lib/linux/libclang_rt.hwasan-x86_64.so
    
    clang-12: warning: argument unused during compilation: '-static-libstdc++' [-Wunused-command-line-argument]
    
    [7/44] Linking CXX shared library lib6...9/lib/linux/libclang_rt.asan-x86_64.so
    
    clang-12: warning: argument unused during compilation: '-static-libstdc++' [-Wunused-command-line-argument]
    
    [8/44] Linking CXX shared library lib6...ib/linux/libclang_rt.memprof-x86_64.so
    
    clang-12: warning: argument unused during compilation: '-static-libstdc++' [-Wunused-command-line-argument]
    
    [9/44] Building CXX object lib/Transfo...s/LLVMipo.dir/PassManagerBuilder.cpp.o
    
    FAILED: lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/PassManagerBuilder.cpp.o 
    
    /home/guo/test/llvm-toolchain/prebuilts/clang/host/linux-x86/clang-bootstrap/bin/clang++ --sysroot=/home/guo/test/llvm-toolchain/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/sysroot -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Transforms/IPO -I/home/guo/test/llvm-toolchain/out/llvm-project/llvm/lib/Transforms/IPO -Iinclude -I/home/guo/test/llvm-toolchain/out/llvm-project/llvm/include -ffile-prefix-map=/home/guo/test/llvm-toolchain/= -B/home/guo/test/llvm-toolchain/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/x86_64-linux/bin -stdlib=libc++ -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -fexperimental-new-pass-manager -O3 -DNDEBUG -fPIC  -fno-exceptions -fno-rtti -std=c++14 -MD -MT lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/PassManagerBuilder.cpp.o -MF lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/PassManagerBuilder.cpp.o.d -o lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/PassManagerBuilder.cpp.o -c /home/guo/test/llvm-toolchain/out/llvm-project/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
    
    /home/guo/test/llvm-toolchain/out/llvm-project/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:51:10: fatal error: 'llvm/Transforms/Obfuscation/HelloWorld.h' file not found
    
    #include "llvm/Transforms/Obfuscation/HelloWorld.h"
    
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    1 error generated.
    
    [10/44] Building CXX object tools/llvm...iles/llvm-config.dir/llvm-config.cpp.o
    
    ninja: build stopped: subcommand failed.
    
    Traceback (most recent call last):
    
      File "/home/guo/test/llvm-toolchain/toolchain/llvm_android/do_build.py", line 768, in <module>
    
        main()
    
      File "/home/guo/test/llvm-toolchain/toolchain/llvm_android/do_build.py", line 678, in main
    
        stage1.build()
    
      File "/home/guo/test/llvm-toolchain/toolchain/llvm_android/builder_registry.py", line 67, in wrapper
    
        function(builder, *args, **kwargs)
    
      File "/home/guo/test/llvm-toolchain/toolchain/llvm_android/base_builders.py", line 139, in build
    
        self._build_config()
    
      File "/home/guo/test/llvm-toolchain/toolchain/llvm_android/base_builders.py", line 424, in _build_config
    
        utils.check_call(ninja_cmd, cwd=self.output_dir, env=env)
    
      File "/home/guo/test/llvm-toolchain/toolchain/llvm_android/utils.py", line 56, in check_call
    
        return subprocess_run(cmd, *args, **kwargs, check=True)
    
      File "/home/guo/test/llvm-toolchain/toolchain/llvm_android/utils.py", line 46, in subprocess_run
    
        return subprocess.run(cmd, *args, **kwargs, text=True)
    
      File "/home/guo/test/llvm-toolchain/prebuilts/python/linux-x86/lib/python3.9/subprocess.py", line 524, in run
    
        raise CalledProcessError(retcode, process.args,
    
    subprocess.CalledProcessError: Command '['/home/guo/test/llvm-toolchain/prebuilts/build-tools/linux-x86/bin/ninja']' returned non-zero exit status 1.
    
    Traceback (most recent call last):
    
      File "/home/guo/test/llvm-toolchain/toolchain/llvm_android/build.py", line 21, in <module>
    
        py3_utils.run_with_py3('do_build.py')
    
      File "/home/guo/test/llvm-toolchain/toolchain/llvm_android/py3_utils.py", line 35, in run_with_py3
    
        subprocess.check_call(
    
      File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    
        raise CalledProcessError(retcode, cmd)
    
    subprocess.CalledProcessError: Command '['/home/guo/test/llvm-toolchain/prebuilts/python/linux-x86/bin/python3', '/home/guo/test/llvm-toolchain/toolchain/llvm_android/do_build.py', '--no-build', 'linux']' returned non-zero exit status 1.
    

    fatal error: 'llvm/Transforms/Obfuscation/HelloWorld.h' file not found

    实际上我试着把关于HelloWorld的添加的三行注释掉

    #include "llvm/Transforms/Obfuscation/HelloWorld.h"

    cl::opt RunHelloWorld("hlw",cl::init(false),cl::desc("Enable the HelloWorld pass"));

    MPM.add(createHelloWorldPass(RunHelloworld));

    但后面添加的的SplitBasicBlock,Flattening等等依然会报没有发现文件

    另外我翻阅项目里的Pluto-Obfuscator\Pluto-Obfuscator-main\llvm\lib\Transforms\CMakeLists.txt

    add_subdirectory(Utils)
    add_subdirectory(Instrumentation)
    add_subdirectory(AggressiveInstCombine)
    add_subdirectory(InstCombine)
    add_subdirectory(Scalar)
    add_subdirectory(IPO)
    add_subdirectory(Vectorize)
    add_subdirectory(Hello)
    add_subdirectory(HelloNew)
    add_subdirectory(ObjCARC)
    add_subdirectory(Coroutines)
    add_subdirectory(CFGuard)
    add_subdirectory(Obfuscation)
    

    add_subdirectory(Obfuscation) 在看雪文章里并没有提及添加,我根据看雪文章步骤操作是否需要添加呢

    opened by GXSZone 0
  • 是时候升级到 New Pass Manager 了

    是时候升级到 New Pass Manager 了

    首先当然是插件形式更加方便使用,其次是 Legacy Pass 目前已经废弃的事实 而且New Pass Manager并不难适配 这个Issue( https://github.com/bluesadi/Pluto-Obfuscator/issues/6 )里面也有提到过相关教程 我自己也尝试移植了一份(https://github.com/TheDivisibly/Pluto-Obfuscator/tree/NewPassManager_port) 经过测试除了Bogus 和 Trap 会出问题之外 别的 功能基本上都能正常在我的测试用例下面正常工作 除了参数配置需要额外考虑之外好像没有需要特别考虑的了

    enhancement 
    opened by TheDivisibly 0
  • Compilation failed in Android Studio (NDK)

    Compilation failed in Android Studio (NDK)

    I build ollvm in Windows using MinGw. And merged llvm with ndk r23-c.

    When i build my c++ project in android studio : ld: error: unable to find library -lgcc Trying to add -nostdlib but still error' ld: error: unable to find library -latomic

    opened by CFZxa 0
  • RandomControlFlow crashing and leaking memory

    RandomControlFlow crashing and leaking memory

    I'm using Pluto Obfuscator on NDK 23.2.8568313 . When using RandomControlFlow flag, it crashes and leaks memory to the max

    PS C:\Users\Administrator\Desktop\AMain-Android-Hooking-Project> ./compile23
    
    C:\Users\Administrator\Desktop\AMain-Android-Hooking-Project>E:\AndroidSDK\ndk\23.2.8568313\ndk-build
    Android NDK: APP_PLATFORM not set. Defaulting to minimum supported version android-16.
    [armeabi-v7a] Compile++ arm  : ab <= dobby.cpp
    [armeabi-v7a] Compile++ arm  : ab <= InterceptEntry.cpp
    [armeabi-v7a] Compile++ arm  : ab <= Interceptor.cpp
    [arm64-v8a] Compile++      : ab <= RoutingImpl.cc
    [arm64-v8a] Compile++      : ab <= InterceptRouting.cpp
    [arm64-v8a] Compile++      : ab <= dobby.cpp
    [arm64-v8a] Compile++      : ab <= Interceptor.cpp
    [arm64-v8a] Compile++      : ab <= InterceptEntry.cpp
    [armeabi-v7a] Compile++ arm  : ab <= hook.cpp
    [armeabi-v7a] Compile++ arm  : ab <= KittyMemory.cpp
    [armeabi-v7a] Compile++ arm  : ab <= MemoryPatch.cpp
    [armeabi-v7a] Compile++ arm  : ab <= KittyUtils.cpp
    PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
    Stack dump:
    0.      Program arguments: E:/AndroidSDK/ndk/23.2.8568313/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -MMD -MP -MF ./obj/local/armeabi-v7a/objs/ab/KittyMemory/KittyUtils.o.d -target armv7-none-linux-androideabi16 -fdata-sections -ffunction-sections -fstack-protector-strong -funwind-tables -no-canonical-prefixes --sysroot E:/AndroidSDK/ndk/23.2.8568313/build//../toolchains/llvm/prebuilt/windows-x86_64/sysroot -g -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-rtti -fpic -march=armv7-a -O2 -DNDEBUG -Ijni/thirdparty/include -Ijni/thirdparty/whale/include -Ijni/Substrate -Ijni/JNI -Ijni/dobby/include -Ijni/dobby/source/InterceptRouting/Routing/FunctionInlineReplace -Ijni/dobby/source -Ijni/dobby/source/include -Ijni/dobby/xnucxx/xnucxx -Ijni/dobby/external/logging -Ijni/dobby/external/misc-helper -Ijni/dobby/external -Ijni/dobby/external -Ijni/dobby/source/Backend/UserMode/ -IE:/AndroidSDK/ndk/23.2.8568313/build//../sources/cxx-stl/llvm-libc++/include -IE:/AndroidSDK/ndk/23.2.8568313/build//../sources/cxx-stl/llvm-libc++abi/include -Ijni -DANDROID -Wno-error=format-security -fvisibility=hidden -ffunction-sections -fdata-sections -w -fpermissive -Wextra -std=c17 -fexceptions -nostdinc++ -Wformat -Werror=format-security -fno-strict-aliasing -Wno-error=format-security -fvisibility=hidden -ffunction-sections -fdata-sections -Werror -std=c++17 -w -fms-extensions -fpermissive -fexceptions -Wno-error=c++11-narrowing -mllvm -rcf -fexceptions -c jni/KittyMemory/KittyUtils.cpp -o ./obj/local/armeabi-v7a/objs/ab/KittyMemory/KittyUtils.o
    1.      <eof> parser at end of file
    2.      Code generation
    [armeabi-v7a] Compile++ arm  : ab <= MemoryBackup.cpp
    [armeabi-v7a] Compile++ arm  : ab <= fake_dlfcn.cpp
     #0 0x00007ff7aa38fff0 llvm::DIE::getUnitDie() const (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1bdfff0)
     #1 0x00007ff7aa2a365c llvm::DwarfDebug::finalizeModuleInfo() (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1af365c)
     #2 0x00007ff7aa2a3df6 llvm::DwarfDebug::endModule() (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1af3df6)
     #3 0x00007ff7a9013f2a llvm::AsmPrinter::doFinalization(llvm::Module&) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x863f2a)
     #4 0x00007ff7a8b1dd81 llvm::FPPassManager::doFinalization(llvm::Module&) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x36dd81)
     #5 0x00007ff7a8b17ff1 llvm::legacy::PassManagerImpl::run(llvm::Module&) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x367ff1)
     #6 0x00007ff7a9ee1723 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::__1::unique_ptr<llvm::raw_pwrite_stream, std::__1::default_delete<llvm::raw_pwrite_stream> >) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1731723)
     #7 0x00007ff7aa21ea3a clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1a6ea3a)
     #8 0x00007ff7ab8a4a43 clang::ParseAST(clang::Sema&, bool, bool) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x30f4a43)
     #9 0x00007ff7aa18a444 clang::FrontendAction::Execute() (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x19da444)
    #10 0x00007ff7a8f92270 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x7e2270)
    #11 0x00007ff7a900a7b8 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x85a7b8)
    #12 0x00007ff7a87b6252 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x6252)
    #13 0x00007ff7a87b464a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x464a)
    #14 0x00007ff7a9faa1e6 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, bool*) const::$_1>(long long) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x17fa1e6)
    #15 0x00007ff7a8e3dd53 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x68dd53)
    #16 0x00007ff7a9fa9c80 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, bool*) const (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x17f9c80)
    #17 0x00007ff7a8f5b124 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x7ab124)
    #18 0x00007ff7a8f5b505 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*> >&) const (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x7ab505)
    #19 0x00007ff7a8f6d9c6 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*> >&) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x7bd9c6)
    #20 0x00007ff7a87b403b main (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x403b)
    #21 0x00007ff7a87b13d6 __tmainCRTStartup /build/mingw-w64/mingw-w64-crt/build-x86_64\../crt\crtexe.c:329:13
    #22 0x00007ff7a87b1426 mainCRTStartup /build/mingw-w64/mingw-w64-crt/build-x86_64\../crt\crtexe.c:208:3
    #23 0x00007ffec34d74b4 (C:\windows\System32\KERNEL32.DLL+0x174b4)
    #24 0x00007ffec41626a1 (C:\windows\SYSTEM32\ntdll.dll+0x526a1)
    clang++: error: clang frontend command failed due to signal (use -v to see invocation)
    clang version 12.0.1 (https://github.com/bluesadi/Pluto-Obfuscator.git 62972af5be7eeb6ddca9bdcf4dc1c7cb6964c5d2)
    Target: armv7-none-linux-android16
    Thread model: posix
    InstalledDir: E:/AndroidSDK/ndk/23.2.8568313/build//../toolchains/llvm/prebuilt/windows-x86_64/bin
    clang++: note: diagnostic msg:
    ********************
    
    PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
    Preprocessed source(s) and associated run script(s) are located at:
    clang++: note: diagnostic msg: C:\Users\ADMINI~1\AppData\Local\Temp\KittyUtils-8df4b4.cpp
    clang++: note: diagnostic msg: C:\Users\ADMINI~1\AppData\Local\Temp\KittyUtils-8df4b4.sh
    clang++: note: diagnostic msg:
    
    ********************
    make: *** [E:/AndroidSDK/ndk/23.2.8568313/build//../build/core/build-binary.mk:478: obj/local/armeabi-v7a/objs/ab/KittyMemory/KittyUtils.o] Error 1
    make: *** Waiting for unfinished jobs....
    PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
    Stack dump:
    0.      Program arguments: E:/AndroidSDK/ndk/23.2.8568313/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -MMD -MP -MF ./obj/local/armeabi-v7a/objs/ab/hook.o.d -target armv7-none-linux-androideabi16 -fdata-sections -ffunction-sections -fstack-protector-strong -funwind-tables -no-canonical-prefixes --sysroot E:/AndroidSDK/ndk/23.2.8568313/build//../toolchains/llvm/prebuilt/windows-x86_64/sysroot -g -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-rtti -fpic -march=armv7-a -O2 -DNDEBUG -Ijni/thirdparty/include -Ijni/thirdparty/whale/include -Ijni/Substrate -Ijni/JNI -Ijni/dobby/include -Ijni/dobby/source/InterceptRouting/Routing/FunctionInlineReplace -Ijni/dobby/source -Ijni/dobby/source/include -Ijni/dobby/xnucxx/xnucxx -Ijni/dobby/external/logging -Ijni/dobby/external/misc-helper -Ijni/dobby/external -Ijni/dobby/external -Ijni/dobby/source/Backend/UserMode/ -IE:/AndroidSDK/ndk/23.2.8568313/build//../sources/cxx-stl/llvm-libc++/include -IE:/AndroidSDK/ndk/23.2.8568313/build//../sources/cxx-stl/llvm-libc++abi/include -Ijni -DANDROID -Wno-error=format-security -fvisibility=hidden -ffunction-sections -fdata-sections -w -fpermissive -Wextra -std=c17 -fexceptions -nostdinc++ -Wformat -Werror=format-security -fno-strict-aliasing -Wno-error=format-security -fvisibility=hidden -ffunction-sections -fdata-sections -Werror -std=c++17 -w -fms-extensions -fpermissive -fexceptions -Wno-error=c++11-narrowing -mllvm -rcf -fexceptions -c jni/hook.cpp -o ./obj/local/armeabi-v7a/objs/ab/hook.o
    1.      <eof> parser at end of file
    2.      Code generation
     #0 0x00007ff7aa38fff0 llvm::DIE::getUnitDie() const (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1bdfff0)
     #1 0x00007ff7aa2a365c llvm::DwarfDebug::finalizeModuleInfo() (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1af365c)
     #2 0x00007ff7aa2a3df6 llvm::DwarfDebug::endModule() (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1af3df6)
     #3 0x00007ff7a9013f2a llvm::AsmPrinter::doFinalization(llvm::Module&) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x863f2a)
     #4 0x00007ff7a8b1dd81 llvm::FPPassManager::doFinalization(llvm::Module&) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x36dd81)
     #5 0x00007ff7a8b17ff1 llvm::legacy::PassManagerImpl::run(llvm::Module&) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x367ff1)
     #6 0x00007ff7a9ee1723 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::__1::unique_ptr<llvm::raw_pwrite_stream, std::__1::default_delete<llvm::raw_pwrite_stream> >) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1731723)
     #7 0x00007ff7aa21ea3a clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1a6ea3a)
     #8 0x00007ff7ab8a4a43 clang::ParseAST(clang::Sema&, bool, bool) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x30f4a43)
     #9 0x00007ff7aa18a444 clang::FrontendAction::Execute() (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x19da444)
    #10 0x00007ff7a8f92270 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x7e2270)
    #11 0x00007ff7a900a7b8 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x85a7b8)
    #12 0x00007ff7a87b6252 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x6252)
    #13 0x00007ff7a87b464a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x464a)
    #14 0x00007ff7a9faa1e6 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, bool*) const::$_1>(long long) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x17fa1e6)
    #15 0x00007ff7a8e3dd53 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x68dd53)
    #16 0x00007ff7a9fa9c80 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, bool*) const (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x17f9c80)
    #17 0x00007ff7a8f5b124 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x7ab124)
    #18 0x00007ff7a8f5b505 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*> >&) const (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x7ab505)
    #19 0x00007ff7a8f6d9c6 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*> >&) (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x7bd9c6)
    #20 0x00007ff7a87b403b main (E:\AndroidSDK\ndk\23.2.8568313\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x403b)
    #21 0x00007ff7a87b13d6 __tmainCRTStartup /build/mingw-w64/mingw-w64-crt/build-x86_64\../crt\crtexe.c:329:13
    #22 0x00007ff7a87b1426 mainCRTStartup /build/mingw-w64/mingw-w64-crt/build-x86_64\../crt\crtexe.c:208:3
    #23 0x00007ffec34d74b4 (C:\windows\System32\KERNEL32.DLL+0x174b4)
    #24 0x00007ffec41626a1 (C:\windows\SYSTEM32\ntdll.dll+0x526a1)
    clang++: error: clang frontend command failed due to signal (use -v to see invocation)
    clang version 12.0.1 (https://github.com/bluesadi/Pluto-Obfuscator.git 62972af5be7eeb6ddca9bdcf4dc1c7cb6964c5d2)
    Target: armv7-none-linux-android16
    Thread model: posix
    InstalledDir: E:/AndroidSDK/ndk/23.2.8568313/build//../toolchains/llvm/prebuilt/windows-x86_64/bin
    clang++: note: diagnostic msg:
    ********************
    
    PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
    Preprocessed source(s) and associated run script(s) are located at:
    clang++: note: diagnostic msg: C:\Users\ADMINI~1\AppData\Local\Temp\hook-68ff46.cpp
    clang++: note: diagnostic msg: C:\Users\ADMINI~1\AppData\Local\Temp\hook-68ff46.sh
    clang++: note: diagnostic msg:
    
    ********************
    make: *** [E:/AndroidSDK/ndk/23.2.8568313/build//../build/core/build-binary.mk:478: obj/local/armeabi-v7a/objs/ab/hook.o] Error 1
    PS C:\Users\Administrator\Desktop\AMain-Android-Hooking-Project>
    
    
    bug 
    opened by BoomboomDada 2
  • 'MBA' Obfuscation: Any Plans To Allow Integer Constants Passed As Parameters t

    'MBA' Obfuscation: Any Plans To Allow Integer Constants Passed As Parameters t

    Good Afternoon!

    I have a particular use case that oddly MBAObfuscation doesn't fit - I'm working on seeing if I can add it myself, but figured I'd ask here for some insight in case its something I'm missing:

    In cases where function calls accept integer parameters that are constant, like say the following function definition:

    UINT32 Function( _In_ UINT32 Value, _In_ UINT32 ConstantValue )
    

    With a callee say executing

    Function( Variable, 0x41424344 );
    

    One would expect that either the variable substituion or MBA obfuscation would inherently obfuscate the 0x41424344 value - However, even with the isa<CallInst>(I) enabled - IT oddly still misses it. Is there any particular reason for this?

    question 
    opened by realoriginal 2
  • RCF: inline assembly requires more registers than available

    RCF: inline assembly requires more registers than available

    RandomControlFlow is problematic in some cases.

    ./check.sh -rcf failed:

    ./src/scalar_4x64_impl.h:259:5: error: inline assembly requires more registers than available
        "movq 32(%%rsi), %%r11\n"
        ^
    ./src/scalar_4x64_impl.h:259:5: error: inline assembly requires more registers than available
    ./src/scalar_4x64_impl.h:259:5: error: inline assembly requires more registers than available
    ./src/scalar_4x64_impl.h:259:5: error: inline assembly requires more registers than available
    ./src/scalar_4x64_impl.h:259:5: error: inline assembly requires more registers than available
    ./src/scalar_4x64_impl.h:259:5: error: inline assembly requires more registers than available
    18 errors generated.
    make[1]: *** [Makefile:1173: src/bench_ecmult-bench_ecmult.o] Error 1
    In file included from src/bench_internal.c:8:
    In file included from ./src/secp256k1.c:14:
    In file included from ./src/field_impl.h:17:
    In file included from ./src/field_5x52_impl.h:19:
    ./src/field_5x52_asm_impl.h:29:5: error: inline assembly requires more registers than available
        "movq 0(%%rsi),%%r10\n"
        ^
    ./src/field_5x52_asm_impl.h:29:5: error: inline assembly requires more registers than available
    ./src/field_5x52_asm_impl.h:29:5: error: inline assembly requires more registers than available
    ./src/field_5x52_asm_impl.h:29:5: error: inline assembly requires more registers than available
    ./src/field_5x52_asm_impl.h:29:5: error: inline assembly requires more registers than available
    ./src/field_5x52_asm_impl.h:29:5: error: inline assembly requires more registers than available
    ./src/field_5x52_asm_impl.h:299:5: error: inline assembly requires more registers than available
        "movq 0(%%rsi),%%r10\n"
        ^
    ./src/field_5x52_asm_impl.h:299:5: error: inline assembly requires more registers than available
    ./src/field_5x52_asm_impl.h:299:5: error: inline assembly requires more registers than available
    ./src/field_5x52_asm_impl.h:299:5: error: inline assembly requires more registers than available
    ./src/field_5x52_asm_impl.h:299:5: error: inline assembly requires more registers than available
    ./src/field_5x52_asm_impl.h:299:5: error: inline assembly requires more registers than available
    18 errors generated.
    make[1]: *** [Makefile:1187: src/bench_internal-bench_internal.o] Error 1
    In file included from src/tests_exhaustive.c:20:
    In file included from ./src/secp256k1.c:14:
    In file included from ./src/field_impl.h:17:
    In file included from ./src/field_5x52_impl.h:19:
    ./src/field_5x52_asm_impl.h:299:5: error: inline assembly requires more registers than available
        "movq 0(%%rsi),%%r10\n"
        ^
    ./src/field_5x52_asm_impl.h:299:5: error: inline assembly requires more registers than available
    ./src/field_5x52_asm_impl.h:299:5: error: inline assembly requires more registers than available
    ./src/field_5x52_asm_impl.h:299:5: error: inline assembly requires more registers than available
    ./src/field_5x52_asm_impl.h:299:5: error: inline assembly requires more registers than available
    ./src/field_5x52_asm_impl.h:299:5: error: inline assembly requires more registers than available
    ./src/field_5x52_asm_impl.h:29:5: error: inline assembly requires more registers than available
    
    bug 
    opened by bluesadi 0
  • mingw.thread.h erro

    mingw.thread.h erro

    #log

    [email protected]:~/CLionProjects/test$ x86_64-w64-mingw32-clang++ checkDebug.cpp -lws2_32 -static -lpsapi -s -w -fpermissive  -Xclang -flto-visibility-public-std -mllvm -fla -mllvm -bcf  -mllvm -sub  -mllvm -gle 
    PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
    Stack dump:
    0.      Program arguments: /usr/local/bin/clang-12 -cc1 -triple x86_64-w64-windows-gnu -emit-obj -mrelax-all --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name checkDebug.cpp -static-define -mrelocation-model pic -pic-level 2 -mframe-pointer=none -fmath-errno -fno-rounding-math -mconstructor-aliases -mms-bitfields -munwind-tables -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -nostdsysteminc -nobuiltininc -resource-dir /usr/local/lib/clang/12.0.1 -isystem /usr/local/bin/../lib/clang/12.0.1/include -isystem /usr/x86_64-w64-mingw32/include/../../../usr/lib/gcc/x86_64-w64-mingw32/9.3-win32/include/c++ -isystem /usr/x86_64-w64-mingw32/include/../../../usr/lib/gcc/x86_64-w64-mingw32/9.3-win32/include/c++/x86_64-w64-mingw32 -isystem /usr/x86_64-w64-mingw32/include -w -fdeprecated-macro -fdebug-compilation-dir /home/ubuntu/CLionProjects/test -ferror-limit 19 -fno-use-cxa-atexit -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -exception-model=seh -fcolor-diagnostics -flto-visibility-public-std -mllvm -fla -mllvm -bcf -mllvm -sub -mllvm -gle -faddrsig -o /tmp/checkDebug-848831.o -x c++ checkDebug.cpp
    1.      <eof> parser at end of file
    2.      Per-module optimization passes
    3.      Running pass 'Unnamed pass: implement Pass::getPassName()' on module 'checkDebug.cpp'.
     #0 0x00007fd688a2a2a1 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/local/bin/../lib/libLLVMSupport.so.12+0x1a62a1)
     #1 0x00007fd688a28064 llvm::sys::RunSignalHandlers() (/usr/local/bin/../lib/libLLVMSupport.so.12+0x1a4064)
     #2 0x00007fd688a281db SignalHandler(int) (/usr/local/bin/../lib/libLLVMSupport.so.12+0x1a41db)
     #3 0x00007fd6884df090 (/lib/x86_64-linux-gnu/libc.so.6+0x43090)
     #4 0x00007fd686b6b6c8 llvm::GlobalsEncryption::runOnModule(llvm::Module&) (/usr/local/bin/../lib/../lib/libLLVMObfuscation.so.12+0x1f6c8)
     #5 0x00007fd688d82a10 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/local/bin/../lib/libLLVMCore.so.12+0x20ca10)
     #6 0x00007fd68b4eace3 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/usr/local/bin/../lib/libclangCodeGen.so.12+0xe8ce3)
     #7 0x00007fd68b860979 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/usr/local/bin/../lib/libclangCodeGen.so.12+0x45e979)
     #8 0x00007fd686a2ff79 clang::ParseAST(clang::Sema&, bool, bool) (/usr/local/bin/../lib/../lib/libclangParse.so.12+0x39f79)
     #9 0x00007fd68b85f656 clang::CodeGenAction::ExecuteAction() (/usr/local/bin/../lib/libclangCodeGen.so.12+0x45d656)
    #10 0x00007fd68a3263c1 clang::FrontendAction::Execute() (/usr/local/bin/../lib/libclangFrontend.so.12+0x11b3c1)
    #11 0x00007fd68a2ba9db clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/local/bin/../lib/libclangFrontend.so.12+0xaf9db)
    #12 0x00007fd68baa4210 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/local/bin/../lib/libclangFrontendTool.so.12+0x5210)
    #13 0x00005625d902dedb cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/local/bin/clang-12+0x13edb)
    #14 0x00005625d902b6eb ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (/usr/local/bin/clang-12+0x116eb)
    #15 0x00005625d90282ae main (/usr/local/bin/clang-12+0xe2ae)
    #16 0x00007fd6884c0083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
    #17 0x00005625d902b27e _start (/usr/local/bin/clang-12+0x1127e)
    clang-12: error: unable to execute command: Segmentation fault (core dumped)
    clang-12: error: clang frontend command failed due to signal (use -v to see invocation)
    clang version 12.0.1 (https://github.com/bluesadi/Pluto-Obfuscator a9d03fea2e714ba2bddf2d60adaf87392b08adb5)
    Target: x86_64-w64-windows-gnu
    Thread model: posix
    InstalledDir: /usr/local/bin
    clang-12: note: diagnostic msg: 
    ********************
    
    PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
    Preprocessed source(s) and associated run script(s) are located at:
    clang-12: note: diagnostic msg: /tmp/checkDebug-7d65ca.cpp
    clang-12: note: diagnostic msg: /tmp/checkDebug-7d65ca.sh
    clang-12: note: diagnostic msg: 
    
    ********************
    
    
    bug 
    opened by zhihuba 2
Owner
34r7hm4n
冷静认真专注自信
34r7hm4n
Automatically de-obfuscate ollvm and generate binaries

AntiOllvm Automatically deobfuscate binaries and generate new binaries. Chinese Help 中文帮助点击 帮助 Decriptor Software obfuscation protection is very commo

sanfengAndroid 71 Dec 6, 2022
Toy LLVM obfuscator pass

ToyObfuscator Some simple obfuscator ;) (base on llvm-10) Compile Build out-tree pass git clone https://github.com/veritas501/ToyObfuscator.git cd Toy

veritas501 51 Nov 6, 2022
Automatic Disassembly Desynchronization Obfuscator

desync-cc --- Automatic Disassembly Desynchronization Obfuscator desync-cc is designed as a drop-in replacement for gcc, which applies disassembly des

Ulf Kargén 8 Dec 30, 2022
The core engine forked from NVidia's Q2RTX. Heavily modified and extended to allow for a nicer experience all-round.

Polyhedron - A Q2RTX Fork A fork of the famous Q2RTX project by NVIDIA™ that strives to improve all of its other factors of what was once upon a time

Polyhedron Studio 21 Dec 22, 2022
Extended kalman filter implementation.

EKF (Extended Kalman Filter) This project is a C++ implementation of EKF.For the related principles of EKF, please check this tutorial (TODO). Project

null 6 Jan 6, 2023
Half-Life : Extended main branch for developing purposes

Half Life : Extended SDK Source Code of Half Life : Extended as a open source modbase for everyone publicly, make your own mod with alot of features e

Bacontsu 15 Dec 12, 2022
Xtl - eXtended Template Library

eXtended Template Library Open Hub Linux Windows Coverage Technical Debt Code Quality License Contribute with Gratipay Contribute with Beerpay View th

David Mott 4 Sep 26, 2022
Invariant-ekf - C++ library to implement invariant extended Kalman filtering for aided inertial navigation.

inekf This repository contains a C++ library that implements an invariant extended Kalman filter (InEKF) for 3D aided inertial navigation. This filter

Ross Hartley 273 Dec 24, 2022
A small XM (FastTracker II Extended Module) player library.

libxm A small XM (FastTracker II Extended Module) player library. Main features: Small size in mind; many features can be disabled at compile-time, or

Romain D. 109 Dec 20, 2022
A CUDA-accelerated cloth simulation engine based on Extended Position Based Dynamics (XPBD).

Velvet Velvet is a CUDA-accelerated cloth simulation engine based on Extended Position Based Dynamics (XPBD). Why another cloth simulator? There are a

Vital Chen 39 Dec 21, 2022
null 313 Dec 31, 2022
PikaScript is an ultra-lightweight Python engine with zero dependencies and zero-configuration, that can run with 4KB of RAM (such as STM32G030C8 and STM32F103C8), and is very easy to deploy and expand.

PikaScript 中文页| Star please~ 1. Abstract PikaScript is an ultra-lightweight Python engine with zero dependencies and zero-configuration, that can run

Lyon 906 Dec 29, 2022
Signed - a 3D modeling and construction language based on Lua and SDFs. Signed will be available for macOS and iOS and is heavily optimized for Metal.

Signed - A 3D modeling language Abstract Signed is a Lua based 3D modeling language, it provides a unique way to create high quality 3D content for yo

Markus Moenig 90 Nov 21, 2022
ESP32 firmware to read and control EMS and Heatronic compatible equipment such as boilers, thermostats, solar modules, and heat pumps

EMS-ESP is an open-source firmware for the Espressif ESP8266 and ESP32 microcontroller that communicates with EMS (Energy Management System) based equipment from manufacturers like Bosch, Buderus, Nefit, Junkers, Worcester and Sieger.

EMS-ESP 274 Jan 8, 2023
Hobbyist Operating System targeting x86_64 systems. Includes userspace, Virtual File System, An InitFS (tarfs), Lua port, easy porting, a decent LibC and LibM, and a shell that supports: piping, file redirection, and more.

SynnixOS Epic Hobby OS targeting x86_64 CPUs, it includes some hacked together functionality for most essential OSs although, with interactivity via Q

RaidTheWeb 42 Oct 28, 2022
🎮 Plants vs. Zombies multiplayer battle, developed via reverse engineering, inline hook and dynamic-link library injection. Two online players defend and attack as the plant side and zombie side respectively.

Plants vs. Zombies Online Battle This project has two original repositories: https://github.com/czs108/Plants-vs.-Zombies-Online-Battle https://github

Liugw 71 Oct 14, 2021
Free,Open-Source,Cross-platform agent and Post-exploiton tool written in Golang and C++, the architecture and usage like Cobalt Strike

Khepri Free,Open-Source,Cross-platform agent and Post-exploiton tool written in Golang and C++ Description Khepri is a Cross-platform agent, the archi

Young 1.4k Jan 3, 2023
PLP Project Programming Language | Programming for projects and computer science and research on computer and programming.

PLPv2b PLP Project Programming Language Programming Language for projects and computer science and research on computer and programming. What is PLP L

PLP Language 5 Aug 20, 2022
A run-time C++ library for working with units of measurement and conversions between them and with string representations of units and measurements

Units What's new Some of the CMake target names have changed in the latest release, please update builds appropriately Documentation A library that pr

Lawrence Livermore National Laboratory 112 Dec 14, 2022