-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build issues #16
Comments
How do you wish to reverse engineer that app? I might have an easier solution |
Thanks for the answer! Indeed opening the workspace seems to have fixed the build issues, back to work! The app I'm trying to reverse is a free home automation app, available both on iOS and Android. They are quite famous in my country, but their system is totally closed unfortunately. I was able to debug the initial login handshake that uses some kind of Digest access authentication but to initiate a WebSocket connection. That part is working fine and I'm properly receiving WebSocket (incoming) messages from the server (that looks like to be raw HTTP requests). The big issue is that I don't have a clue what is the proper (outgoing) messages API to trigger stuff (tried a few variations of the received message with no luck). I've spent a lot of time trying to debug these network frames using Charles for iOS, then a combination of mitm-proxy and WireShark combined with the use of a Remote Virtual Interface. Big issue is that it looks like WebSocket frames do not use the proxy, were not properly SSL decrypted by Charles, and when I finally was able to force the SSL override (via the virtual interface) the app did not work anymore (I guess it is due to SSL pining). So my only hope left was to somehow debug these WebSocket messages before they are sent / encrypted thanks to your work. If you have any other idea (or maybe some other iOS method injection to perform related to WebSocket usage), I'd be more than happy to hear them. If you are interested, I can send you unencrypted version of both iOS/Android apps! Thanks again for the help!
|
Drop me an email regarding the unencrypted app pls. |
@depoon done, thanks! |
On PatchLoader.m, since you are creating a framework, use this import instead #import <PatchFramework/PatchFramework-Swift.h> In CodeInjectionSwift you need to declare your class and func public in order to use them |
Thanks, it did indeed fixed build issues. Unfortunately it looks like I've hit another deadend, I can't import the required Swift dylibs as they crash (due to missing symbols), eg:
Probably because either XCode is too recent (and device is in 10.3) or maybe the fact that it is 32-bit. I've found out this repo with historical runtime headers: https://github.com/nst/iOS-Runtime-Headers/releases/tag/10.3 But there is no |
Hi @mgcrea, Not sure, if I'm on the right way understanding your issue. But I also got into trouble using the required (or not required) Swift dylibs while experimenting with CodeInjection. First I used all the default Swift dylibs (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift), but soon found out, that the easiest way of using only the required dylibs is to build your framework, open it in finder and copy all dylibs from the /Frameworks directory. Especially for libswiftSwiftOnoneSupport.dylib, this was only required if I wanted to use a debug version of the framework on my iOS-device. Otherwise this dylib is not required (and shouldn't therefore not be included). |
Indeed it looks like I was building it in debug mode. Had been able to get a 64-bit device and wanted to try again but I'm not sure if an Xcode update broke something but I get:
When trying to run the example (clean checkout from this repo). I've opened the workspace and built the NetworkInterceptor target first. Any ideas?
I'm exactly hitting this error message: razorpay/react-native-razorpay#125 @depoon do you think it would be possible to skip the NetworkInspector framework and do some basic pre-query body dumping directly with Objective-C? |
Finally made it work today!! had to compile my framework with Xcode 9 (still downloadable on Apple developer) to be on the same SDK than the app. However I'm receiving truncated body/content in the console,
Anyway I guess I can close this! |
Sorry for not keeping up. I will investigate how to apply the same concept for WebSockets |
So I'm pretty much very junior to swift related development (did some Obj-C back in the days but a bit rusty too).
I haven't found a way to properly build the example project:
NetworkInterceptor.framework
in Xcode appear to be missingHowever it won't build anyway as it could not find the module:
Have a working static injection project (following your tutorial), but as well, I'm stuck properly loading the
CodeInjectionSwift.swift
code, not sure if because it's Swift or if there is as well an issue while loading the built framework (same drag&drop from build).Would love any insight you could have on this,
Thanks for the great work! I'm looking to reverse-engineer an home automation app and your code looks like to be my last resort! (SSL certificate pinning).
EDIT
Tweaking the framework search path it looks like it loads it now but I'm encountering header issues:
The text was updated successfully, but these errors were encountered: