BishopFox / iSpy

A reverse engineering framework for iOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to compile iSpy to the end - Please Kindly Assist. Thanks

waelsaad opened this issue · comments

commented

Hi,

I followed the instructions, I am not sure if there are some setup differences in my Theos !

I am getting the following error. Could you please help me get to the bottom of this.

192-168-1-3:iSpy X$ make package
/Users/X/iSpy/theos/makefiles/targets/Darwin/iphone.mk:41: Deploying to iOS 3.0 while building for 6.0 will generate armv7-only binaries.
Making all for tweak iSpy...
Linking tweak iSpy...
Undefined symbols for architecture armv7:
"OBJC_CLASS$DAVResponse", referenced from:
objc-class-ref in CocoaHTTPServer.a(DAVConnection.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [obj/iSpy.dylib.ba964c90.unsigned] Error 1
make[1]: *** [internal-library-all
] Error 2
make: *** [iSpy.all.tweak.variables] Error 2
192-168-1-3:iSpy X$

If I add the following line
ARCHS = armv7 armv7s arm64

I get different errors.

Thanks

Will

commented

Making all for tweak iSpy...
Preprocessing Tweak.xm...
Compiling Tweak.xm...
Preprocessing iSpy.logwriter.xm...
Compiling iSpy.logwriter.xm...
Preprocessing iSpy.substrate.xm...
Compiling iSpy.substrate.xm...
Preprocessing iSpy.msgSend.xm...
Compiling iSpy.msgSend.xm...
Preprocessing iSpy.msgSend_stret.xm...
Compiling iSpy.msgSend_stret.xm...
Preprocessing hooks_C_system_calls.xm...
Compiling hooks_C_system_calls.xm...
Preprocessing hooks_CoreFoundation.xm...
Compiling hooks_CoreFoundation.xm...
Preprocessing iSpy.instance.xm...
Compiling iSpy.instance.xm...
Preprocessing iSpy.class.xm...
Compiling iSpy.class.xm...
Preprocessing iSpy.web.xm...
Compiling iSpy.web.xm...
Preprocessing typestring.xm...
Compiling typestring.xm...
Preprocessing iSpy.msgSend.whitelist.xm...
Compiling iSpy.msgSend.whitelist.xm...
Preprocessing iSpy.msgSend.common.xm...
Compiling iSpy.msgSend.common.xm...
Preprocessing iSpy.rpc.xm...
Compiling iSpy.rpc.xm...
Preprocessing iSpyServer/iSpyHTTPServer.xm...
Compiling iSpyServer/iSpyHTTPServer.xm...
Preprocessing iSpyServer/iSpyHTTPConnection.xm...
Compiling iSpyServer/iSpyHTTPConnection.xm...
Preprocessing iSpyServer/iSpyWebSocket.xm...
Compiling iSpyServer/iSpyWebSocket.xm...
Preprocessing iSpyServer/shellWebSocket.xm...
Compiling iSpyServer/shellWebSocket.xm...
Preprocessing iSpyServer/iSpyStaticFileResponse.xm...
Compiling iSpyServer/iSpyStaticFileResponse.xm...
Linking tweak iSpy...
Undefined symbols for architecture armv7:
"OBJC_CLASS$DAVResponse", referenced from:
objc-class-ref in CocoaHTTPServer.a(DAVConnection.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [obj/iSpy.dylib.ba964c90.unsigned] Error 1
make[1]: *** [internal-library-all
] Error 2
make: *** [iSpy.all.tweak.variables] Error 2

Try this:

carl@europa ~/P/iSpy> cd iSpyServer/CocoaHTTPServer/
carl@europa ~/P/i/i/CocoaHTTPServer> ./build.sh
carl@europa ~/P/i/i/CocoaHTTPServer> cd ../..
carl@europa ~/P/iSpy> make

commented

Thank you for the response. I had done this as part of the steps already explained and I did it again but no difference.

Is it at all possible to get a copy of your Theos folder including the headers to ensure I have the exact same setup? and or at least a copy of a pre-compiled iSpy please.

Thanking you in advance.

It does compile with one error :-
DAVResponse.m:1:9: fatal error: 'libxml/parser.h' file not found

I have this file generate : CocoaHTTPServer.a but this does not change the above problem.

Here is the output of that step:-

bash-3.2# ./build.sh
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk

[+] Removing old object files ...
[+] Compiling Objective-C files ...
DAVResponse.m:1:9: fatal error: 'libxml/parser.h' file not found
#import <libxml/parser.h>
^
1 error generated.
DDTTYLogger.m:688:83: warning: implicit conversion from enumeration type 'enum CGImageAlphaInfo' to different enumeration type 'CGBitmapInfo'
(aka 'enum CGBitmapInfo') [-Wenum-conversion]
CGContextRef context = CGBitmapContextCreate(&pixel, 1, 1, 8, 4, rgbColorSpace, kCGImageAlphaNoneSkipLast);
~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~
DDTTYLogger.m:825:24: warning: 'NSYearCalendarUnit' is deprecated: first deprecated in iOS 8.0 - Use NSCalendarUnitYear instead [-Wdeprecated-declarations]
calendarUnitFlags |= NSYearCalendarUnit;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCalendar.h:63:2: note:
'NSYearCalendarUnit' has been explicitly marked deprecated here
NSYearCalendarUnit NS_CALENDAR_ENUM_DEPRECATED(10_4, 10_10, 2_0, 8_0, "Use NSCalendarUnitYear instead") = NSCalendarUnitYear,
^
DDTTYLogger.m:826:24: warning: 'NSMonthCalendarUnit' is deprecated: first deprecated in iOS 8.0 - Use NSCalendarUnitMonth instead
[-Wdeprecated-declarations]
calendarUnitFlags |= NSMonthCalendarUnit;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCalendar.h:64:2: note:
'NSMonthCalendarUnit' has been explicitly marked deprecated here
NSMonthCalendarUnit NS_CALENDAR_ENUM_DEPRECATED(10_4, 10_10, 2_0, 8_0, "Use NSCalendarUnitMonth instead") = NSCalendarUnitMonth,
^
DDTTYLogger.m:827:24: warning: 'NSDayCalendarUnit' is deprecated: first deprecated in iOS 8.0 - Use NSCalendarUnitDay instead [-Wdeprecated-declarations]
calendarUnitFlags |= NSDayCalendarUnit;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCalendar.h:65:2: note:
'NSDayCalendarUnit' has been explicitly marked deprecated here
NSDayCalendarUnit NS_CALENDAR_ENUM_DEPRECATED(10_4, 10_10, 2_0, 8_0, "Use NSCalendarUnitDay instead") = NSCalendarUnitDay,
^
DDTTYLogger.m:828:24: warning: 'NSHourCalendarUnit' is deprecated: first deprecated in iOS 8.0 - Use NSCalendarUnitHour instead [-Wdeprecated-declarations]
calendarUnitFlags |= NSHourCalendarUnit;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCalendar.h:66:2: note:
'NSHourCalendarUnit' has been explicitly marked deprecated here
NSHourCalendarUnit NS_CALENDAR_ENUM_DEPRECATED(10_4, 10_10, 2_0, 8_0, "Use NSCalendarUnitHour instead") = NSCalendarUnitHour,
^
DDTTYLogger.m:829:24: warning: 'NSMinuteCalendarUnit' is deprecated: first deprecated in iOS 8.0 - Use NSCalendarUnitMinute instead
[-Wdeprecated-declarations]
calendarUnitFlags |= NSMinuteCalendarUnit;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCalendar.h:67:2: note:
'NSMinuteCalendarUnit' has been explicitly marked deprecated here
NSMinuteCalendarUnit NS_CALENDAR_ENUM_DEPRECATED(10_4, 10_10, 2_0, 8_0, "Use NSCalendarUnitMinute instead") = NSCalendarUnitMinute,
^
DDTTYLogger.m:830:24: warning: 'NSSecondCalendarUnit' is deprecated: first deprecated in iOS 8.0 - Use NSCalendarUnitSecond instead
[-Wdeprecated-declarations]
calendarUnitFlags |= NSSecondCalendarUnit;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCalendar.h:68:2: note:
'NSSecondCalendarUnit' has been explicitly marked deprecated here
NSSecondCalendarUnit NS_CALENDAR_ENUM_DEPRECATED(10_4, 10_10, 2_0, 8_0, "Use NSCalendarUnitSecond instead") = NSCalendarUnitSecond,
^
7 warnings generated.
GCDAsyncSocket.m:5869:50: warning: 'kCFStreamSSLAllowsAnyRoot' is deprecated: first deprecated in iOS 4.0 [-Wdeprecated-declarations]
value = [tlsSettings objectForKey:(NSString *)kCFStreamSSLAllowsAnyRoot];
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:596:30: note:
'kCFStreamSSLAllowsAnyRoot' has been explicitly marked deprecated here
CFN_EXPORT const CFStringRef kCFStreamSSLAllowsAnyRoot CF_DEPRECATED(10_4, 10_6, 2_0, 4_0);
^
GCDAsyncSocket.m:5873:50: warning: 'kCFStreamSSLAllowsExpiredRoots' is deprecated: first deprecated in iOS 4.0 [-Wdeprecated-declarations]
value = [tlsSettings objectForKey:(NSString *)kCFStreamSSLAllowsExpiredRoots];
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:595:30: note:
'kCFStreamSSLAllowsExpiredRoots' has been explicitly marked deprecated here
CFN_EXPORT const CFStringRef kCFStreamSSLAllowsExpiredRoots CF_DEPRECATED(10_4, 10_6, 2_0, 4_0);
^
GCDAsyncSocket.m:5881:50: warning: 'kCFStreamSSLAllowsExpiredCertificates' is deprecated: first deprecated in iOS 4.0 [-Wdeprecated-declarations]
value = [tlsSettings objectForKey:(NSString *)kCFStreamSSLAllowsExpiredCertificates];
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:594:30: note:
'kCFStreamSSLAllowsExpiredCertificates' has been explicitly marked deprecated here
CFN_EXPORT const CFStringRef kCFStreamSSLAllowsExpiredCertificates CF_DEPRECATED(10_4, 10_6, 2_0, 4_0);
^
GCDAsyncSocket.m:6233:48: warning: 'kCFStreamSSLAllowsAnyRoot' is deprecated: first deprecated in iOS 4.0 [-Wdeprecated-declarations]
value = [tlsSettings objectForKey:(NSString *)kCFStreamSSLAllowsAnyRoot];
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:596:30: note:
'kCFStreamSSLAllowsAnyRoot' has been explicitly marked deprecated here
CFN_EXPORT const CFStringRef kCFStreamSSLAllowsAnyRoot CF_DEPRECATED(10_4, 10_6, 2_0, 4_0);
^
GCDAsyncSocket.m:6254:48: warning: 'kCFStreamSSLAllowsExpiredRoots' is deprecated: first deprecated in iOS 4.0 [-Wdeprecated-declarations]
value = [tlsSettings objectForKey:(NSString *)kCFStreamSSLAllowsExpiredRoots];
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:595:30: note:
'kCFStreamSSLAllowsExpiredRoots' has been explicitly marked deprecated here
CFN_EXPORT const CFStringRef kCFStreamSSLAllowsExpiredRoots CF_DEPRECATED(10_4, 10_6, 2_0, 4_0);
^
GCDAsyncSocket.m:6296:48: warning: 'kCFStreamSSLAllowsExpiredCertificates' is deprecated: first deprecated in iOS 4.0 [-Wdeprecated-declarations]
value = [tlsSettings objectForKey:(NSString *)kCFStreamSSLAllowsExpiredCertificates];
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:594:30: note:
'kCFStreamSSLAllowsExpiredCertificates' has been explicitly marked deprecated here
CFN_EXPORT const CFStringRef kCFStreamSSLAllowsExpiredCertificates CF_DEPRECATED(10_4, 10_6, 2_0, 4_0);
^
6 warnings generated.
MultipartFormDataParser.m:420:73: warning: conflicting parameter types in implementation of 'numberOfBytesToLeavePendingWithData:length:encoding:':
'NSUInteger' (aka 'unsigned int') vs 'int' [-Wmismatched-parameter-types]

  • (int) numberOfBytesToLeavePendingWithData:(NSData*) data length:(int) length encoding:(int) encoding {
    ~~~ ^
    MultipartFormDataParser.m:32:80: note: previous definition is here
  • (int) numberOfBytesToLeavePendingWithData:(NSData*) data length:(NSUInteger) length encoding:(int) encoding;
    ~~~~~~~~~~ ^
    1 warning generated.
    [+] Creating CocoaHTTPServer.a archive
    [+] Copying CocoaHTTPServer.a into libs/
    [+] The CocoaHTTPServer libraries were copied into into libs/ directory. My work is done.
commented

You're missing a few of CocoaHTTPServer's dependancies. The easiest way to get them is to use brew. Once you have hombrew installed install these packages:

brew install libxml2

This library usually comes with OSX, but I think with certain versions of Xcode the path differs, installing from homebrew should resolve the issue.

commented

Thanks, I will have an attempt after work tonight and get back. Thanks again.

commented

Thank you. I have it working.

CocoaHTTPServer.a was already generated as part of the package, so the problem was not generating this file.

I made sure I installed Brew

Never the less when I try to ./build it I get the following error
DAVResponse.m:1:9: fatal error: 'libxml/parser.h' file not found

This led me to the fact that I didn't have the Xcode command line installed and this is the line that helped me:
xcode-select --install

I have it installed now on device which is great so thank you.

Now I have the same problem as the other user, I don't see Showtime overlay message in the upper right as the application loads.

: MS:Error: dlopen(/Library/MobileSubstrate/DynamicLibraries/iSpy.dylib, 9): no suitable image found. Did find:
/Library/MobileSubstrate/DynamicLibraries/iSpy.dylib: mach-o, but wrong architecture

Thank you

Closing and marking as a duplicate of #7 (comment)