GithubHelp home page GithubHelp logo

preemptive / ppios-rename Goto Github PK

View Code? Open in Web Editor NEW

This project forked from polidea/ios-class-guard

364.0 364.0 56.0 6.17 MB

Symbol obfuscator for iOS apps

Home Page: https://www.preemptive.com/products/ppios

License: Other

Objective-C 93.41% C 0.26% Makefile 0.53% Ruby 0.02% Shell 5.79%
ios obfuscation objective-c

ppios-rename's People

Contributors

0xced avatar aricha avatar ayufan avatar earlz avatar jakublipinski avatar minsko avatar nygard avatar rodionovd avatar tgrf avatar truist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ppios-rename's Issues

iOS8 support

Hi,
This is not an issue, but a question.
While I understand that you do not support lower than iOS9, I'm curious as to whether you know of any incompatibilities with iOS8. Are the expected related incompatibilities related to XIB, storyboards etc. Or is it something else?

Error: PPiOS-Rename cannot process apps containing Swift code

My Objective C project uses a cocoapod written in swift, and I'm getting the next error:
Error: PPiOS-Rename cannot process apps containing Swift code
I know that PPiOS-Rename doesn't support Swift, but is there a way to filter swift files? Thanks.

Error when OBFUSCATE with SDK 11.0 XCode 9.0

Originally posted here by renlix:

Hello Nathan, I'm starting to use PPIOS-Rename according to you, but I'm facing some problems.
I run the commands: "ppios-rename --analyze -x IgnoredSymbol -F !ExcludedClass -F !FBS* -F !FIR* -F !ModalSMSCredito* -F !GAI* -F !GGL* -F !Branch* /Desktop/Projetos/IOS/appPontoCerto//DerivedData/Build/Products/Debug-iphoneos/XXXXX.app" and "ppios-rename --obfuscate-sources".
But when I build my project, I get a lot of mistakes in relation to the 'FBSDK'(Facebook), 'FIRA'(Firebase), in my class 'ModalSMSCredito' and so on.
It is as if all the options "-F !YYY*" were ignored, and all were included in the obfuscation.

Uncaught exception crash (in obfuscated app)

I have this when loading a new view controller:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView (<UITableView: 0x7fb7b318a000; frame = (0 0; 375 812); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x604000a4d5c0>; layer = <CALayer: 0x604000829c40>; contentOffset: {0, -88}; contentSize: {375, 132}; adjustedContentInset: {88, 0, 34, 0}>) failed to obtain a cell from its dataSource (<_UIFilteredDataSource: 0x604000a4d0e0>)'

Tried and solved some with #3 but still having this in many parts of the code. Any solution?

Path in anaylsis

Hello,

Im trying to use this repository to obfuscate my objective C source code for an ionic application.

I have installed the .exe and have added to the usr/local/bin.

Im preforming the following command:

ppios-rename --analyze /path/to/program.app/program but I'm not sure what the path should be.

I tried to use the path where the ios generated project is located, but I keep getting:

Input file does not contain an executable

Example of the command:

ppios-rename --analyze /location/platforms/ios

About small methods , can not dump the instanceMethod name and types .

After merge this change , i can get the class but i can not dump the small method name and types .

debug info : in CDObjectiveC2Processor.m , when i try to get a class instance method ,
objc2Method.name = [cursor readPtr:small];
objc2Method.types = [cursor readPtr:small];
objc2Method.imp = [cursor readPtr:small];
NSString *name = [self.machOFile stringAtAddress:objc2Method.name];
NSString *types = [self.machOFile stringAtAddress:objc2Method.types];
i got a nil value . All the instance method is this . It look like the offset or mask did not right .

How to obfuscate watch target?

I'm trying to obfuscate the main app and watch executables, but after that symbols.h file contains the following:

#ifndef DOUBLE_OBFUSCATION_GUARD_PPIOS
#define DOUBLE_OBFUSCATION_GUARD_PPIOS
#else
#error Double obfuscation detected. This will result in an unobfuscated binary. Please see the documentation for details.
#endif

Is there a way to also obfuscate the watch target, or it is not yet supported?

Unknown class error in Interface Builder file

I have used Xcode run script method to obfuscate the Objective-c code on Xcode 8.3.3. Project can be build. But the app crashes upon launch due to story board key value coding-compliant.

Unknown class s3YfbbAX in Interface Builder file

I am getting 5 Unknown class xxxxxxx in Interface Builder file errors. All those 5 are not external libraries which provide Interface Builder files.
Instead those 5 are the root view controllers (TabbarController and 4 UIViewControllers).

Problem is, I cannot find s3YfbbAX in the symbols.h file. I can see this key in the story board. But, in symbols.h has a different key for the equivalent Class name.

Please advice me on this

Obfuscate Static Library directly

Hi,
I have an application Unity that uses the iOS static library. Then this application Unity is build in XCode.
I carefully read your documentation "Obfuscate Static Libraries", but at the time of building, the iOS static library are already "hidden in the root" of the Unity app, and XCode cannot obfuscate this. Maybe you can suggest a workaround or another tool? I'll be very grateful.

Throwing unknown load command on dataOffsetForAddress

Recently ppios stopped working and it's throwing dozens of unknown errors on dataOffsetForAddress.
My project didn't change at all, this happened over night, after I updated to MacOS 12.6 and Xcode 14.0.1

All missing commands are related to 0x80000034 and 0x80000033

This should not be Swift related because I don't use any Swift code.

Any ideas? Thanks in advance

snippet:
...
2022-10-11 21:51:39.307 ppios-rename[15534:139893] Unknown load command: 0x80000033
2022-10-11 21:51:39.307 ppios-rename[15534:139893] Unknown load command: 0x80000034
...
2022-10-11 21:51:39.419 ppios-rename[15534:139893] Error: Cannot find offset for address 0x801000000000000d in dataOffsetForAddress:

Side note: the same project/file works fine when I switch to a MacOS 12.3 / XCode 13.1 Macbbok

Obfuscating framework

Just wanted to know is it possible to obfuscate just framework? Because when I do analyze my framework it returns empty symbol.map file. Best regards

Error when running on simulator

Hi,

I followed the instructions to use PPiOS-Rename in order to obfuscate the source code of my iOS App. As per the instructions mentioned in the guide, I created two additional targets Build and analyze and Apply Renaming. I followed the below steps:

1- Build using Build and analyze target
2- Build using Apply Renaming target
3-Finally build using the original target

All 3 were build successfully without any errors. However when I run the application on the simulator after the step 3 above, I get the following error for my view controller:


Terminating app due to uncaught exception 'NSUnknownKeyException'
[<StartupViewController 0x7fb5a6515510> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key y4feaiGk

Upon inspecting the y4feaiGk, its assigned to a UIButton in the corresponding xib file.
If i exclude the above view controller, the error comes up in the next ViewController.

I will appreciate any help as I am unsure what is going wrong over here. Thanks a lot!

No visible @interface

No visible @interface for 'UIViewController' declares the selector 'a5srnjH7'

//in symbols.h
#ifndef viewDidLoad
#define viewDidLoad a5srnjH7
#endif // viewDidLoad

why not exclude system framework method?

linker command failed with exit code 1 (use -v to see invocation)

Im having an issue while building the scheme "Build and Analyze ".

I keep getting the following error:

  "_OBJC_CLASS_$_f3shXsUG", referenced from:
      _OBJC_CLASS_$_j4UKvDhU in CDVCryptURLProtocol.o
  "_OBJC_METACLASS_$_f3shXsUG", referenced from:
      _OBJC_METACLASS_$_j4UKvDhU in CDVCryptURLProtocol.o
  "_OBJC_CLASS_$_i7CNC3Kc", referenced from:
      objc-class-ref in CDVInAppBrowser.o
  "_OBJC_CLASS_$_j3snjIBa", referenced from:
      objc-class-ref in CDVWKWebViewEngine.o
  "_OBJC_CLASS_$_q4GLxE1o", referenced from:
      objc-class-ref in CDVInAppBrowser.o
      objc-class-ref in CDVWKWebViewEngine.o
  "_OBJC_CLASS_$_k7bYNcKR", referenced from:
      _OBJC_CLASS_$_t5Kyo770 in AppDelegate.o
  "_OBJC_METACLASS_$_z8xufo3B", referenced from:
      _OBJC_METACLASS_$_z5YTLq8C in startApp.o
      _OBJC_METACLASS_$_k2IOLyY5 in ActionSheet.o
      _OBJC_METACLASS_$_t2g4VydP in AppVersion.o
      _OBJC_METACLASS_$_n6oyrgeV in CDVDevice.o
      _OBJC_METACLASS_$_p0PzeX0L in APPBackgroundMode.o
      _OBJC_METACLASS_$_a4j9NSX8 in CDVNotification.o
      _OBJC_METACLASS_$_v94YN61I in CDVLocation.o
      ...
  "_OBJC_METACLASS_$_k7bYNcKR", referenced from:
      _OBJC_METACLASS_$_t5Kyo770 in AppDelegate.o
  "_OBJC_CLASS_$_z8xufo3B", referenced from:
      _OBJC_CLASS_$_z5YTLq8C in startApp.o
      _OBJC_CLASS_$_k2IOLyY5 in ActionSheet.o
      _OBJC_CLASS_$_t2g4VydP in AppVersion.o
      _OBJC_CLASS_$_n6oyrgeV in CDVDevice.o
      _OBJC_CLASS_$_p0PzeX0L in APPBackgroundMode.o
      _OBJC_CLASS_$_a4j9NSX8 in CDVNotification.o
      _OBJC_CLASS_$_v94YN61I in CDVLocation.o
      ...
  "_OBJC_METACLASS_$_k2Zd2t4Z", referenced from:
      _OBJC_METACLASS_$_h3cCZdvs in MainViewController.o
  "_OBJC_CLASS_$_k2Zd2t4Z", referenced from:
      _OBJC_CLASS_$_h3cCZdvs in MainViewController.o
  "_OBJC_METACLASS_$_t0jP3koH", referenced from:
      _OBJC_METACLASS_$_k4VDUxxg in MainViewController.o
  "_OBJC_CLASS_$_t0jP3koH", referenced from:
      _OBJC_CLASS_$_k4VDUxxg in MainViewController.o
  "_OBJC_METACLASS_$_r9BHmaH3", referenced from:
      _OBJC_METACLASS_$_x4Ww0EhU in MainViewController.o
  "_OBJC_CLASS_$_r9BHmaH3", referenced from:
      _OBJC_CLASS_$_x4Ww0EhU in MainViewController.o
      objc-class-ref in CDVWKWebViewEngine.o
      l_OBJC_$_CATEGORY_r9BHmaH3_$_h4OKThHd in CDVViewController+SplashScreen.o
  "_OBJC_CLASS_$_q5SAu8P7", referenced from:
      objc-class-ref in startApp.o
      objc-class-ref in ActionSheet.o
      objc-class-ref in AppVersion.o
      objc-class-ref in CDVDevice.o
      objc-class-ref in APPBackgroundMode.o
      objc-class-ref in CDVNotification.o
      objc-class-ref in CDVLocation.o
      ...
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

any help please?

Error during obfuscation process

Hi everyone,

I'm facing this error message. Can you help me to solve it?

error: no visible @interface for 'MyManager' declares the selector 'setC1OpVkNd:'
[[MyManager sharedInstance] setPublicKey: pulicKey];

Preventing common rejection from App Review

Apple would reject an app using this library straight forward for that reason:

From Apple 2. 3 Performance: Accurate Metadata Guideline 2.3.1 - Performance

We discovered that your app contains hidden features. Specifically, It would be appropriate to remove all code obfuscation and selector mangling from this app before resubmitting for review.

The next submission of this app may require a longer review time.

Next Steps

    Review the Performance section of the App Store Review Guidelines.
    Ensure your app is compliant with all sections of the App Store Review Guidelines and the Terms & Conditions of the Apple Developer Program.
    Once your app is fully compliant, resubmit your app for review.

Submitting apps designed to mislead or harm customers or evade the review process may result in the termination of your Apple Developer Program account. Review the Terms & Conditions of the Apple Developer Program to learn more about our policies regarding termination.

If you believe your app is compliant with the App Store Review Guidelines, you may submit an appeal. Alternatively, you may provide additional details about your app by replying directly to this message.

I thought of replacing the random numbers on symbols.map file into some dictionary words. And then run the obfuscation code (using the new created symbols).

What I wanted to know is if the obfuscation process change anything further then those names to random number that could look "strange" on the binary? What I mean is that if instead of random numbers I would use some English words would the binary have anything else that would point that the app uses obfuscation?

Problem with PPIOS-Rename

I use the PPIOS-Rename framework. I'm doing everything right on the description, but why does not it obfuscate my methods and classes? What could be the reason?

Missing .pch file

I followed the trouble shooting steps and auto generated my own pch file, I named the file accordingly yet I still get the error “Couldn’t find any *-Prefix.pch files under .” - what am I doing wrong? I followed all the instructions and i have configured my build settings to us the pch file as well.

Unknown class error in Interface Builder file AGAIN

I understand there is an issue about this issue #6 , but my situation is quite different.

I have used Xcode run script method to obfuscate the Objective-c code on Xcode 10.1. Project can be build. But the app crashes upon launch due to xib file key value coding-compliant.

Unknown class v7aeUe4E in Interface Builder file

this class is a UIView subclass, and the v7aeUe4E DO EXISTS in the symbol.h with corrent class name

Please advice me on this. Thanks a lot, it costed me 4 hours and didn't find any solution.

PPiOS-ControlFlow Source/Download

I'm looking for the ControlFlow utility mentioned in your README.md, although came up empty locating it.

It is possible to reverse the process of obfuscation in dSYMs by using a utility included with PPiOS-ControlFlow. 

Where can I obtain this tool? Thank you.

Notice: Is there a solution?

如果你的APP打算发布到App Store,切勿用代码混淆。 会被无情驳回且延期审核/(ㄒoㄒ)/~~
If your APP is going to be published to the APP Store, don't confuse code. It will be ruthlessly rejected and delayed.

Guideline 2.3.1 - Performance

We discovered that your app contains hidden features. Specifically, It would be appropriate to remove all code obfuscation and selector mangling or to explain in detail the purpose of its inclusion before resubmitting for review.

Double obfuscation detected. This will result in an unobfuscated binary. Please see the documentation for details.

I am using Xcode 13.2.1

I had created one demo project for integrating code obfuscation, but facing above issue.
My app name is : COTest
Screenshot 2022-08-27 at 6 05 01 PM
Screenshot 2022-08-27 at 6 05 12 PM

I performed below steps:-

STEP- 1) ppios-rename --analyze --symbols-map /Users/Justmac/Desktop/TEMP/symbols.map /Users/Justmac/Library/Developer/Xcode/DerivedData/COTest-bsavpegzjpcdskanvimkgayjsktr/Build/Products/Debug-iphonesimulator/COTest.app

After performing this step the symbols.map file had been successfully created in TEMP folder.

STEP 2) ppios-rename --obfuscate-sources --symbols-map /Users/Justmac/Desktop/TEMP/symbols.map.

After this step storyboard outlets & action get renamed(only on storyboard) & generated the symbols.h file & showing error in that file.

Using Obfuscated framework

I am trying to obfuscate my code which includes dynamic framework.
I don't want to exclude the framework because then the binary contains unobfuscated functions from the framework.
Is there a way to do it?

I tried to obfuscate my code with my linked framework and I got the error: Use of undeclared identifier {framwork}
I tried to obfuscate my code with my linked framewor, which was already obfuscated (added the symbols.h file to the *.pch file ) and I got the error:Undefined symbol: OBJC_CLASS$_{framwork}

I ran out of ideas, can you help me?

xcframework obfuscation

Hi,
Please I have an XCFramework and I am using PPIOS for obfuscation,
I execute the following instructions to do that:
a-ppios-rename --analyze --framework ProjectName /path/to/framework/executable
b-ppios-rename --obfuscate-sources
I successfully create symbol.map and symbols .h but the clients are still able to access and read all functions , how can I build this framework before drop it inside another project.?

Or in another way , if I have an Xcode project created as framework , I obfuscate this project as you mentioned how can I generate now the xcframework from this obfuscated code?

The obfuscation should be done before or after creating the xcframework?

Your help is really appreciated.

Regards

Obfuscating objective-c project with Swift frameworks

Hi,
I've an objective-c project that use several pods. Some of that pods are written in swift.

I've understood that swift code is not supported, so I've tried to include swift pods as compiled .frameworks (so NO swift code, but compiled binaries), but I obtain the same error "PPiOS-Rename cannot process apps containing Swift code".

As you know objective-c is dying, and any modern project use dependencies
which will increasingly be in swift.

Any idea how to bypass the restriction? Maybe an exclude feature, or a bridge header, or something?

Thanks for your precious support.

Hybrid Obj-c/ Swift app

This isn't so much a bug but a question. How will this tool handle a hybrid Obj-c/Swift application? Can swift code be obfuscated as well? If not is it just ignored by default, or would I need to manually setup an ignore file of sorts?

Thanks in advance for your time

Double Obfuscation Issue

Have used PPiOS-Rename for my project and observed double obfuscation detected. To fix this issue, the documentation says that make sure that source tree is always reset to an unmodified state. Could you please explain in detail, what is that need to be taken care here.

[Crash] Value for undefined key

Hello,
I did obfuscate my project using the correct steps and everything worked till I found this crash.
ppios-rename version: v1.2.0

2018-04-18 11:43:15.905099+0300 XXXX[1907:388059] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<k5kGGmHJ 0x17ad4fc0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key XXXX.'

I believe my class does not recognize my property after obfuscation.
How should I fix this crash ?

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.