Anti-tampering and code obfuscation tool for iOS Swift
Asked Answered
M

2

5

I'm looking for an open source for antitampering and Code obfuscation tool for my iOS project. Some library like Proguard in Android. I found iXGuard and Dexprotector are paid tools. I'm looking for some open source tool. Any help will be appreciated.

Mutton answered 3/9, 2020 at 11:37 Comment(2)
You can imagine that the only people who care about obfuscating or anti-reverse-engineering technology are companies that are trying to protect something valuable, and by extension, are willing to pay for it. I would be surprised if anybody bothered to build something so niche and valuable for freeLemon
@divya-mg you are mixing things up - iOS , code tampering and obfuscation are hardly related terms because RELEASE native builds destroy names of variables, funstions, etc So I would hardly bother with obfuscation - you just do not need it. And what use case do you mean when you refer to anti-tampering? Do you mean relelease of the same app with different resources (images + brand name) to official app store? - I would hardly bother with such attemps. Please update your question to clarify thingsMame
S
8

Xcode already does most of the obfuscation part

Find the points below:

  1. Code tampering and obfuscation are hardly related terms because RELEASE native builds from Xcode destroy names of variables, functions, etc So I would hardly bother with obfuscation - you just do not need it.

  2. Apple encrypts the code of the applications submitted to the App Store and restricts access to the machine code of the apps after download to prevent easy static analysis of the application.

And what use case do you mean when you refer to anti-tampering? Do you mean the release of the same app with different resources (images + brand name) to the official app store? - I would hardly bother with such attempts.

And be prepared for any App Store rejection if you are doing any extra code obfuscation by using paid or any other third-party tools. Apple rejects most of the obfuscated things done through these tools. Apple rejection message looks like this:

  1. 3 Performance: Accurate Metadata Guideline 2.3.1 - Performance We discovered that your app contains obfuscated code, selector mangling, or features meant to subvert the App Review process by changing this app's concept after approval to the App Store.

https://developer.apple.com/forums/thread/113211

The code for a native app is stored in the form of a binary executable file, which is further encrypted; its decryption is performed only when the executable file is loaded by the processor into the random access memory and the whole decryption process happens at the hardware level. That is why it is very hard to create offline decryption tools. The only way to decrypt encrypted binary data is on a jailbroken device with a few special tools installed.

https://mentormate.com/blog/security-in-ios-protecting-ipa-file-content/

Settler answered 6/7, 2021 at 7:55 Comment(1)
Then you have clearly never reverse-engineered an iOS IPA file.Cove
G
0

I have searched for a library that helps me to obfuscate the code and I've found this one:

https://github.com/rockbruno/swiftshield

Ginter answered 7/5, 2021 at 20:22 Comment(1)
As suggested, pls don't use swiftshield Don't use this tool for production apps. I gave up on keeping this tool updated because every Swift release breaks SourceKit in a different way. It's probably really broken and is only useful as a way for you to learn more about obfuscation and SourceKit.Dearth

© 2022 - 2024 — McMap. All rights reserved.