Hikari-LLVM15 icon indicating copy to clipboard operation
Hikari-LLVM15 copied to clipboard

String encryption don't seem to work

Open wizardengineer opened this issue 2 years ago • 8 comments

I added the flags -Xllvm -enable-strcry -Xllvm -strcry-encrypt-global-string in the Other Swift Flags of Xcode; however, it don't seem to make a change with the IOS app.

juliusalexandre@Juliuss-MacBook-Pro testing-obf.app % strings testing-obf

...
Body
Previews
Body
ContentView
ContentView_Previews
$s11testing_obf11ContentViewV4bodyQrvp
$s11testing_obf20ContentView_PreviewsV8previewsQrvpZ
testing_obf
testing_obfApp
$s11testing_obf0a1_B3AppV4bodyQrvp
globe
Hello, world!
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>application-identifier</key>
<string>TCKTXXK9UU.test.testing-obf</string>
</dict>
</plist>
;09

application-identifier

is there any reason why this is happening?

wizardengineer avatar Oct 22 '22 02:10 wizardengineer

Have you tried "Clean Build Folder" before building?

61bcdefg avatar Oct 22 '22 02:10 61bcdefg

Have you tried "Clean Build Folder" before building?

Thanks for the reply and yes I did a "Clean Build Folder", it didn't change much. Is there anything I need to do to the Build Settings of xcode? I'm in debug mode.

wizardengineer avatar Oct 22 '22 05:10 wizardengineer

Other than Optimization Level and Custom Flag, you should not need to do much with the Build Settings of Xcode. I'm not sure what's going on, can you upload your xcode project?

61bcdefg avatar Oct 22 '22 05:10 61bcdefg

Sorry for the late reply, but here's the xcode project t1.zip

wizardengineer avatar Oct 23 '22 20:10 wizardengineer

Sorry for the late reply, but here's the xcode project

t1.zip

On my Xcode, StringEncryption works great on this project. Maybe there are some problems with your Hanabi installation?

61bcdefg avatar Oct 24 '22 12:10 61bcdefg

On my Xcode, StringEncryption works great on this project. Maybe there are some problems with your Hanabi installation?

I'm assuming that's the case, because when I run the swiftc in the command line, I get this

juliusalexandre@Julius-MacBook-Pro LearningTime % swiftc simple.swift                     
Applying Apple Clang Hooks...
Initializing Hikari Core with Revision ID:
Applying Apple SwiftC Hooks...
std::mt19937_64 seeded with current timestamp: 1666618184832
Failed To Link PreCompiled AntiHooking IR From:/Users/juliusalexandre/Hikari/PrecompiledAntiHooking-unknown-unknown.bc
Failed To Loading Symbol Configuration From:/Users/juliusalexandre/Hikari/SymbolConfig.json
Doing Post-Run Cleanup
Hikari Out

wizardengineer avatar Oct 24 '22 13:10 wizardengineer

Is there any way i can fix this Symbol Configuration and PreCompiled AntiHooing issue? I can't seem to find anything on the original git repo

wizardengineer avatar Oct 26 '22 20:10 wizardengineer

Is there any way i can fix this Symbol Configuration and PreCompiled AntiHooing issue? I can't seem to find anything on the original git repo

You can find examples of this in addition to AntiHooking at https://github.com/HikariObfuscator/Resources, with the ".bc" suffix is the LLVM Bitcode file, which is mainly used for some customization functions. For example, customize the callback after InlineHook is detected

61bcdefg avatar Oct 28 '22 23:10 61bcdefg

Everything works fine now, I uninstalled (unload) the .dylib and I reinstalled it with the latest .dylib's as of now Hanabi_for_Xcode-14.0.1_20221030-2

wizardengineer avatar Oct 31 '22 22:10 wizardengineer