LLVM混淆器Hikari


#268

我这边出现这种情况的代码不用混淆编译器,
用xcode9.3自己的clang都会出现
最开始没发现是因为原流程中不会生成bc,直接是源码到obj文件的过程

如果是先编译成bc然后吧bc编译成obj文件就会出现,
所以针对这个问题和obf pass应该没多大关系。

而且非常诡异的是我使用xcodebuild 命令行工具才会出现,如果xcode ui上去点击build就不会出现,命令行都是一样的,这个估计是和环境变量有关了吧。


#269

没太关注pmb的scheduling逻辑 : (


#270

我的编译也是1g,
编译的时候报错
git clone -b release_60 --recursive https://github.com/HikariObfuscator/Hikari.git Hikari && mkdir Build && cd Build && cmake -G “Ninja” -DCMAKE_BUILD_TYPE=MinSizeRel -DLLVM_APPEND_VC_REV=on -DLLVM_CREATE_XCODE_TOOLCHAIN=on -DCMAKE_INSTALL_PREFIX=~/Library/Developer/ …/Hikari && ninja &&ninja install-xcode-toolchain && git clone https://github.com/HikariObfuscator/Resources.git ~/Hikari && rsync -ua /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ ~/Library/Developer/Toolchains/Hikari.xctoolchain/ && rm ~/Library/Developer/Toolchains/Hikari.xctoolchain/ToolchainInfo.plist
Cloning into ‘Hikari’…
remote: Counting objects: 57412, done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed


#271

你网有问题clone断了


#272

怎么看是否编译成功了啊。。 我这下面是最后的编译日志:
Creating llvm-readelf
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/bin/llvm-rtdyld
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/bin/llvm-size
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/bin/llvm-split
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/bin/llvm-stress
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/bin/llvm-strings
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/bin/llvm-symbolizer
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/bin/llvm-xray
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/bin/obj2yaml
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/bin/opt
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/share/opt-viewer/opt-diff.py
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/share/opt-viewer/opt-stats.py
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/share/opt-viewer/opt-viewer.py
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/share/opt-viewer/optpmap.py
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/share/opt-viewer/optrecord.py
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/share/opt-viewer/style.css
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/bin/sancov
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/bin/sanstats
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/bin/verify-uselistorder
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/bin/yaml2obj
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/LLVMExports.cmake
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/LLVMExports-minsizerel.cmake
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/LLVMConfig.cmake
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/LLVMConfigVersion.cmake
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/LLVM-Config.cmake
– Up-to-date: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/.
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/./AddLLVM.cmake
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/./AddLLVMDefinitions.cmake
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/./AddOCaml.cmake
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/./AddSphinxTarget.cmake
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/./CheckAtomic.cmake
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/./CheckCompilerVersion.cmake
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/./CheckLinkerFlag.cmake
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/./ChooseMSVCCRT.cmake
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/./CrossCompile.cmake
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/./DetermineGCCCompatible.cmake
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/./FindOCaml.cmake
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/./FindSphinx.cmake
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/./GenerateVersionFromCVS.cmake
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/./GetSVN.cmake
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/./HandleLLVMOptions.cmake
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/./HandleLLVMStdlib.cmake
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/./LLVMExternalProjectUtils.cmake
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/./LLVMInstallSymlink.cmake
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/./LLVMProcessSources.cmake
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/./TableGen.cmake
– Installing: /Users/lz/Library/Developer/Toolchains/Hikari.xctoolchain//usr/lib/cmake/llvm/./VersionFromVCS.cmake
fatal: destination path ‘/Users/lz/Hikari’ already exists and is not an empty directory.


#273

文档里写着

这个脚本假设当前工作目录不是用户的家目录(即~/) ,如果是的话请先cd到其他目录。

脑好希有


#274

:monkey_face:


#275

张大 -mllvm -enable-strcry 请问字符串加密支持对某些文件不进行编译么?因为我编译过后,某些文件无法执行


#276

单个文件配置cflags即可


#278

你好,想问一下。就是工程本身没用到pch,是cocoapods里面的framework有用到,然后每个库的pch都加了这几句,编译出来的还是有这个提示,是加的方式不对还是怎么设置。谢谢了🙏


#279

Swift移植试试。或者工程打包给我


#280

张总,cocoapods的enable index在哪儿关啊:joy: 谷歌都查不到,还是搜到你这儿来了


#282

READ THE FUCKING MANUAL


#283

zhang总你好,我shell编译的时候出现

ms/Obfuscation/CMakeFiles/LLVMObfuscation.dir/Flattening.cpp.o -c /Library/Developer/Toolchains/Hikari/lib/Transforms/Obfuscation/Flattening.cpp
/Library/Developer/Toolchains/Hikari/lib/Transforms/Obfuscation/Flattening.cpp:82:11: error: use of undeclared identifier ‘basicBlocks’
basicBlocks.push_back(BB);
^
/Library/Developer/Toolchains/Hikari/lib/Transforms/Obfuscation/Flattening.cpp:82:33: error: use of undeclared identifier ‘BB’
basicBlocks.push_back(BB);
^

2 errors generated.
[1189/8093] Building CXX object lib/Transforms/O…akeFiles/LLVMObfuscation.dir/AntiClassDump.cpp.o
ninja: build stopped: subcommand failed.

但是xcode 中可以选择

小白请教这该如何解决


#284

Oops我可能昨天把源码改挂了


#286

我也没找到这个


#287

张总,求进群啊!!!,那qq群不能加


#288

加我我拉你。


#289

Zhang总,小白请教一下,我工程配置基本都正常,但是在添加-enable-indibran标记的时候就会报错:

Running IndirectBranch On ZNSt3__114pointer_traitsIPKcE10pointer_toERS1
Running IndirectBranch On ZNSt3__19addressofIKcEEPT_RS2
Hikari Out
fatal error: error in backend: unsupported relocation of variable ‘’
Command /Users/xxx/Library/Developer/Toolchains/Hikari.xctoolchain/usr/bin/clang failed with exit code 1

想问下要如何解决这个问题


#290

你好,请问一下我报这个错怎么解决 Library/Developer/Toolchains/Hikari.xctoolchain/usr/bin/clang++ failed with exit code 1