diff --git a/HackingGuide.md b/HackingGuide.md index e663367..606272d 100644 --- a/HackingGuide.md +++ b/HackingGuide.md @@ -41,21 +41,27 @@ Add Your Own Preferences in **Preferences/** With Filename **MODULENAME.plist** They will be injected into the *items* of the final Preferences Loader PLIST file ####Marcos -Six Marcos Has Been Created For Logging Purposes. +Two Groups Of Marcos Has Been Created For Logging Purposes. Please Call Exactly In The Following Sequence - +#####Common Logging 1. WTInit(ClassName,methodName) **(For C Functions. Change ClassName to Library Name. For Example dlopen corresponds to dlfcn because it's in dlfcn.h)** 2. WTAdd(Argument,Name) **The First is the argument itself. The second is the argument name** 3. WTReturn(Return) **Return is the return value to add** -4. WTSave **No Arguments. It save the log to database.** +4. WTSave **No Arguments. It saves the log to database.** 5. WTRelease **Release The Memory Of The Logger** 6. WTShouldLog **if(WTShouldLog){} to check if it's called by the app itself** +#####dyld CallBack +1. WTCallBack(LibraryName,FunctionToCall) **Generate A Function That Call FunctionToCall() when an image which path containing LibraryName is loaded. You Can Init Hooks inside FunctionToCall** +2. WTAddCallBack **Register the callback with dyld** + Please Note: 1. WTAdd can be called for many times. That's for adding Arguments 2. WTInit,WTSave,WTRelease Must Be Called Under any circumstances 3. Add Semicolons Yourself +4. Don't add semicolon to WTCallBack +5. Only One Set Of **dyld CallBack** Marcos Can Be Called In A Module ####Misc Some functions don't come with the binary and you'll have to wait the related library to be loaded @@ -64,6 +70,6 @@ Some functions don't come with the binary and you'll have to wait the related li I personally use a dyldCallBack for that. -You might want to dlopen() that library itself +You might want to dlopen() that library itself.However that will also cause performance issues diff --git a/Hooks/APIHooks/AntiAntiDebugging.xm b/Hooks/API/AntiAntiDebugging.xm similarity index 100% rename from Hooks/APIHooks/AntiAntiDebugging.xm rename to Hooks/API/AntiAntiDebugging.xm diff --git a/Hooks/APIHooks/CommonCryptor.xm b/Hooks/API/CommonCryptor.xm similarity index 100% rename from Hooks/APIHooks/CommonCryptor.xm rename to Hooks/API/CommonCryptor.xm diff --git a/Hooks/APIHooks/CommonDigest.xm b/Hooks/API/CommonDigest.xm similarity index 100% rename from Hooks/APIHooks/CommonDigest.xm rename to Hooks/API/CommonDigest.xm diff --git a/Hooks/APIHooks/CommonHMAC.xm b/Hooks/API/CommonHMAC.xm similarity index 100% rename from Hooks/APIHooks/CommonHMAC.xm rename to Hooks/API/CommonHMAC.xm diff --git a/Hooks/APIHooks/CommonKeyDerivation.xm b/Hooks/API/CommonKeyDerivation.xm similarity index 100% rename from Hooks/APIHooks/CommonKeyDerivation.xm rename to Hooks/API/CommonKeyDerivation.xm diff --git a/Hooks/APIHooks/CoreLocation.xm.empty b/Hooks/API/CoreLocation.xm.empty similarity index 100% rename from Hooks/APIHooks/CoreLocation.xm.empty rename to Hooks/API/CoreLocation.xm.empty diff --git a/Hooks/APIHooks/CoreTelephony.xm b/Hooks/API/CoreTelephony.xm similarity index 100% rename from Hooks/APIHooks/CoreTelephony.xm rename to Hooks/API/CoreTelephony.xm diff --git a/Hooks/APIHooks/Keychain.xm b/Hooks/API/Keychain.xm similarity index 100% rename from Hooks/APIHooks/Keychain.xm rename to Hooks/API/Keychain.xm diff --git a/Hooks/APIHooks/LSApplication.xm b/Hooks/API/LSApplication.xm similarity index 98% rename from Hooks/APIHooks/LSApplication.xm rename to Hooks/API/LSApplication.xm index 60947f2..4fd8209 100644 --- a/Hooks/APIHooks/LSApplication.xm +++ b/Hooks/API/LSApplication.xm @@ -154,6 +154,12 @@ %end +static void Loader(){ +%init(LSApplication); + +} +WTCallBack(@"MobileCoreServices",Loader) extern void init_LSApplication_hook() { - %init(LSApplication); +WTAddCallBack; + } diff --git a/Hooks/APIHooks/NSData.xm b/Hooks/API/NSData.xm similarity index 100% rename from Hooks/APIHooks/NSData.xm rename to Hooks/API/NSData.xm diff --git a/Hooks/APIHooks/NSFileHandle.xm b/Hooks/API/NSFileHandle.xm similarity index 100% rename from Hooks/APIHooks/NSFileHandle.xm rename to Hooks/API/NSFileHandle.xm diff --git a/Hooks/APIHooks/NSFileManager.xm b/Hooks/API/NSFileManager.xm similarity index 100% rename from Hooks/APIHooks/NSFileManager.xm rename to Hooks/API/NSFileManager.xm diff --git a/Hooks/APIHooks/NSHTTPCookie.xm b/Hooks/API/NSHTTPCookie.xm similarity index 100% rename from Hooks/APIHooks/NSHTTPCookie.xm rename to Hooks/API/NSHTTPCookie.xm diff --git a/Hooks/APIHooks/NSInputStream.xm b/Hooks/API/NSInputStream.xm similarity index 100% rename from Hooks/APIHooks/NSInputStream.xm rename to Hooks/API/NSInputStream.xm diff --git a/Hooks/APIHooks/NSKeyedArchiver.xm b/Hooks/API/NSKeyedArchiver.xm similarity index 100% rename from Hooks/APIHooks/NSKeyedArchiver.xm rename to Hooks/API/NSKeyedArchiver.xm diff --git a/Hooks/APIHooks/NSKeyedUnarchiver.xm b/Hooks/API/NSKeyedUnarchiver.xm similarity index 100% rename from Hooks/APIHooks/NSKeyedUnarchiver.xm rename to Hooks/API/NSKeyedUnarchiver.xm diff --git a/Hooks/APIHooks/NSOutputStream.xm b/Hooks/API/NSOutputStream.xm similarity index 100% rename from Hooks/APIHooks/NSOutputStream.xm rename to Hooks/API/NSOutputStream.xm diff --git a/Hooks/APIHooks/NSProcessInfo.xm b/Hooks/API/NSProcessInfo.xm similarity index 100% rename from Hooks/APIHooks/NSProcessInfo.xm rename to Hooks/API/NSProcessInfo.xm diff --git a/Hooks/APIHooks/NSURLConnection.xm b/Hooks/API/NSURLConnection.xm similarity index 100% rename from Hooks/APIHooks/NSURLConnection.xm rename to Hooks/API/NSURLConnection.xm diff --git a/Hooks/APIHooks/NSURLCredential.xm b/Hooks/API/NSURLCredential.xm similarity index 100% rename from Hooks/APIHooks/NSURLCredential.xm rename to Hooks/API/NSURLCredential.xm diff --git a/Hooks/APIHooks/NSURLSession.xm b/Hooks/API/NSURLSession.xm similarity index 100% rename from Hooks/APIHooks/NSURLSession.xm rename to Hooks/API/NSURLSession.xm diff --git a/Hooks/APIHooks/NSUserDefaults.xm b/Hooks/API/NSUserDefaults.xm similarity index 100% rename from Hooks/APIHooks/NSUserDefaults.xm rename to Hooks/API/NSUserDefaults.xm diff --git a/Hooks/APIHooks/NSXMLParser.xm b/Hooks/API/NSXMLParser.xm similarity index 100% rename from Hooks/APIHooks/NSXMLParser.xm rename to Hooks/API/NSXMLParser.xm diff --git a/Hooks/APIHooks/SSLKillSwitch.xm b/Hooks/API/SSLKillSwitch.xm similarity index 100% rename from Hooks/APIHooks/SSLKillSwitch.xm rename to Hooks/API/SSLKillSwitch.xm diff --git a/Hooks/APIHooks/Security.xm b/Hooks/API/Security.xm similarity index 100% rename from Hooks/APIHooks/Security.xm rename to Hooks/API/Security.xm diff --git a/Hooks/APIHooks/UIPasteboard.xm b/Hooks/API/UIPasteboard.xm similarity index 100% rename from Hooks/APIHooks/UIPasteboard.xm rename to Hooks/API/UIPasteboard.xm diff --git a/Hooks/APIHooks/dlfcn.xm b/Hooks/API/dlfcn.xm similarity index 100% rename from Hooks/APIHooks/dlfcn.xm rename to Hooks/API/dlfcn.xm diff --git a/Hooks/APIHooks/libC.xm b/Hooks/API/libC.xm similarity index 100% rename from Hooks/APIHooks/libC.xm rename to Hooks/API/libC.xm diff --git a/Hooks/APIHooks/libMobileGestalt.xm b/Hooks/API/libMobileGestalt.xm similarity index 100% rename from Hooks/APIHooks/libMobileGestalt.xm rename to Hooks/API/libMobileGestalt.xm diff --git a/Hooks/APIHooks/sysctl.xm b/Hooks/API/sysctl.xm similarity index 100% rename from Hooks/APIHooks/sysctl.xm rename to Hooks/API/sysctl.xm diff --git a/Hooks/SDKHooks/FclBlowfish.xm b/Hooks/SDK/FclBlowfish.xm similarity index 100% rename from Hooks/SDKHooks/FclBlowfish.xm rename to Hooks/SDK/FclBlowfish.xm diff --git a/Hooks/SDKHooks/JSPatch.xm b/Hooks/SDK/JSPatch.xm similarity index 100% rename from Hooks/SDKHooks/JSPatch.xm rename to Hooks/SDK/JSPatch.xm diff --git a/Hooks/SDKHooks/OpenSSLAES.xm b/Hooks/SDK/OpenSSLAES.xm similarity index 100% rename from Hooks/SDKHooks/OpenSSLAES.xm rename to Hooks/SDK/OpenSSLAES.xm diff --git a/Hooks/SDKHooks/OpenSSLBlowFish.xm b/Hooks/SDK/OpenSSLBlowFish.xm similarity index 100% rename from Hooks/SDKHooks/OpenSSLBlowFish.xm rename to Hooks/SDK/OpenSSLBlowFish.xm diff --git a/Hooks/SDKHooks/OpenSSLMD5.xm b/Hooks/SDK/OpenSSLMD5.xm similarity index 100% rename from Hooks/SDKHooks/OpenSSLMD5.xm rename to Hooks/SDK/OpenSSLMD5.xm diff --git a/Hooks/SDKHooks/OpenSSLSHA1.xm b/Hooks/SDK/OpenSSLSHA1.xm similarity index 100% rename from Hooks/SDKHooks/OpenSSLSHA1.xm rename to Hooks/SDK/OpenSSLSHA1.xm diff --git a/Hooks/SDKHooks/OpenSSLSHA512.xm b/Hooks/SDK/OpenSSLSHA512.xm similarity index 100% rename from Hooks/SDKHooks/OpenSSLSHA512.xm rename to Hooks/SDK/OpenSSLSHA512.xm diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/aes.h b/Hooks/SDK/OpenSSLUnimplemented/aes.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/aes.h rename to Hooks/SDK/OpenSSLUnimplemented/aes.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/asn1.h b/Hooks/SDK/OpenSSLUnimplemented/asn1.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/asn1.h rename to Hooks/SDK/OpenSSLUnimplemented/asn1.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/asn1t.h b/Hooks/SDK/OpenSSLUnimplemented/asn1t.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/asn1t.h rename to Hooks/SDK/OpenSSLUnimplemented/asn1t.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/async.h b/Hooks/SDK/OpenSSLUnimplemented/async.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/async.h rename to Hooks/SDK/OpenSSLUnimplemented/async.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/bio.h b/Hooks/SDK/OpenSSLUnimplemented/bio.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/bio.h rename to Hooks/SDK/OpenSSLUnimplemented/bio.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/bn.h b/Hooks/SDK/OpenSSLUnimplemented/bn.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/bn.h rename to Hooks/SDK/OpenSSLUnimplemented/bn.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/buffer.h b/Hooks/SDK/OpenSSLUnimplemented/buffer.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/buffer.h rename to Hooks/SDK/OpenSSLUnimplemented/buffer.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/camellia.h b/Hooks/SDK/OpenSSLUnimplemented/camellia.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/camellia.h rename to Hooks/SDK/OpenSSLUnimplemented/camellia.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/cast.h b/Hooks/SDK/OpenSSLUnimplemented/cast.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/cast.h rename to Hooks/SDK/OpenSSLUnimplemented/cast.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/cmac.h b/Hooks/SDK/OpenSSLUnimplemented/cmac.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/cmac.h rename to Hooks/SDK/OpenSSLUnimplemented/cmac.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/cms.h b/Hooks/SDK/OpenSSLUnimplemented/cms.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/cms.h rename to Hooks/SDK/OpenSSLUnimplemented/cms.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/comp.h b/Hooks/SDK/OpenSSLUnimplemented/comp.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/comp.h rename to Hooks/SDK/OpenSSLUnimplemented/comp.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/conf.h b/Hooks/SDK/OpenSSLUnimplemented/conf.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/conf.h rename to Hooks/SDK/OpenSSLUnimplemented/conf.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/conf_api.h b/Hooks/SDK/OpenSSLUnimplemented/conf_api.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/conf_api.h rename to Hooks/SDK/OpenSSLUnimplemented/conf_api.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/crypto.h b/Hooks/SDK/OpenSSLUnimplemented/crypto.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/crypto.h rename to Hooks/SDK/OpenSSLUnimplemented/crypto.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/des.h b/Hooks/SDK/OpenSSLUnimplemented/des.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/des.h rename to Hooks/SDK/OpenSSLUnimplemented/des.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/dh.h b/Hooks/SDK/OpenSSLUnimplemented/dh.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/dh.h rename to Hooks/SDK/OpenSSLUnimplemented/dh.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/dsa.h b/Hooks/SDK/OpenSSLUnimplemented/dsa.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/dsa.h rename to Hooks/SDK/OpenSSLUnimplemented/dsa.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/dso.h b/Hooks/SDK/OpenSSLUnimplemented/dso.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/dso.h rename to Hooks/SDK/OpenSSLUnimplemented/dso.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/dtls1.h b/Hooks/SDK/OpenSSLUnimplemented/dtls1.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/dtls1.h rename to Hooks/SDK/OpenSSLUnimplemented/dtls1.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/e_os2.h b/Hooks/SDK/OpenSSLUnimplemented/e_os2.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/e_os2.h rename to Hooks/SDK/OpenSSLUnimplemented/e_os2.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/ebcdic.h b/Hooks/SDK/OpenSSLUnimplemented/ebcdic.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/ebcdic.h rename to Hooks/SDK/OpenSSLUnimplemented/ebcdic.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/ec.h b/Hooks/SDK/OpenSSLUnimplemented/ec.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/ec.h rename to Hooks/SDK/OpenSSLUnimplemented/ec.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/ecdh.h b/Hooks/SDK/OpenSSLUnimplemented/ecdh.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/ecdh.h rename to Hooks/SDK/OpenSSLUnimplemented/ecdh.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/ecdsa.h b/Hooks/SDK/OpenSSLUnimplemented/ecdsa.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/ecdsa.h rename to Hooks/SDK/OpenSSLUnimplemented/ecdsa.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/engine.h b/Hooks/SDK/OpenSSLUnimplemented/engine.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/engine.h rename to Hooks/SDK/OpenSSLUnimplemented/engine.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/err.h b/Hooks/SDK/OpenSSLUnimplemented/err.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/err.h rename to Hooks/SDK/OpenSSLUnimplemented/err.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/evp.h b/Hooks/SDK/OpenSSLUnimplemented/evp.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/evp.h rename to Hooks/SDK/OpenSSLUnimplemented/evp.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/hmac.h b/Hooks/SDK/OpenSSLUnimplemented/hmac.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/hmac.h rename to Hooks/SDK/OpenSSLUnimplemented/hmac.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/idea.h b/Hooks/SDK/OpenSSLUnimplemented/idea.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/idea.h rename to Hooks/SDK/OpenSSLUnimplemented/idea.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/jpake.h b/Hooks/SDK/OpenSSLUnimplemented/jpake.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/jpake.h rename to Hooks/SDK/OpenSSLUnimplemented/jpake.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/kdf.h b/Hooks/SDK/OpenSSLUnimplemented/kdf.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/kdf.h rename to Hooks/SDK/OpenSSLUnimplemented/kdf.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/lhash.h b/Hooks/SDK/OpenSSLUnimplemented/lhash.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/lhash.h rename to Hooks/SDK/OpenSSLUnimplemented/lhash.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/md2.h b/Hooks/SDK/OpenSSLUnimplemented/md2.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/md2.h rename to Hooks/SDK/OpenSSLUnimplemented/md2.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/md4.h b/Hooks/SDK/OpenSSLUnimplemented/md4.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/md4.h rename to Hooks/SDK/OpenSSLUnimplemented/md4.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/md5.h b/Hooks/SDK/OpenSSLUnimplemented/md5.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/md5.h rename to Hooks/SDK/OpenSSLUnimplemented/md5.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/mdc2.h b/Hooks/SDK/OpenSSLUnimplemented/mdc2.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/mdc2.h rename to Hooks/SDK/OpenSSLUnimplemented/mdc2.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/modes.h b/Hooks/SDK/OpenSSLUnimplemented/modes.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/modes.h rename to Hooks/SDK/OpenSSLUnimplemented/modes.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/obj_mac.h b/Hooks/SDK/OpenSSLUnimplemented/obj_mac.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/obj_mac.h rename to Hooks/SDK/OpenSSLUnimplemented/obj_mac.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/objects.h b/Hooks/SDK/OpenSSLUnimplemented/objects.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/objects.h rename to Hooks/SDK/OpenSSLUnimplemented/objects.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/ocsp.h b/Hooks/SDK/OpenSSLUnimplemented/ocsp.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/ocsp.h rename to Hooks/SDK/OpenSSLUnimplemented/ocsp.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/opensslconf.h.in b/Hooks/SDK/OpenSSLUnimplemented/opensslconf.h.in similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/opensslconf.h.in rename to Hooks/SDK/OpenSSLUnimplemented/opensslconf.h.in diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/opensslv.h b/Hooks/SDK/OpenSSLUnimplemented/opensslv.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/opensslv.h rename to Hooks/SDK/OpenSSLUnimplemented/opensslv.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/ossl_typ.h b/Hooks/SDK/OpenSSLUnimplemented/ossl_typ.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/ossl_typ.h rename to Hooks/SDK/OpenSSLUnimplemented/ossl_typ.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/pem.h b/Hooks/SDK/OpenSSLUnimplemented/pem.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/pem.h rename to Hooks/SDK/OpenSSLUnimplemented/pem.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/pem2.h b/Hooks/SDK/OpenSSLUnimplemented/pem2.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/pem2.h rename to Hooks/SDK/OpenSSLUnimplemented/pem2.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/pkcs12.h b/Hooks/SDK/OpenSSLUnimplemented/pkcs12.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/pkcs12.h rename to Hooks/SDK/OpenSSLUnimplemented/pkcs12.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/pkcs7.h b/Hooks/SDK/OpenSSLUnimplemented/pkcs7.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/pkcs7.h rename to Hooks/SDK/OpenSSLUnimplemented/pkcs7.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/rand.h b/Hooks/SDK/OpenSSLUnimplemented/rand.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/rand.h rename to Hooks/SDK/OpenSSLUnimplemented/rand.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/rc2.h b/Hooks/SDK/OpenSSLUnimplemented/rc2.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/rc2.h rename to Hooks/SDK/OpenSSLUnimplemented/rc2.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/rc4.h b/Hooks/SDK/OpenSSLUnimplemented/rc4.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/rc4.h rename to Hooks/SDK/OpenSSLUnimplemented/rc4.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/rc5.h b/Hooks/SDK/OpenSSLUnimplemented/rc5.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/rc5.h rename to Hooks/SDK/OpenSSLUnimplemented/rc5.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/ripemd.h b/Hooks/SDK/OpenSSLUnimplemented/ripemd.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/ripemd.h rename to Hooks/SDK/OpenSSLUnimplemented/ripemd.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/rsa.h b/Hooks/SDK/OpenSSLUnimplemented/rsa.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/rsa.h rename to Hooks/SDK/OpenSSLUnimplemented/rsa.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/safestack.h b/Hooks/SDK/OpenSSLUnimplemented/safestack.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/safestack.h rename to Hooks/SDK/OpenSSLUnimplemented/safestack.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/seed.h b/Hooks/SDK/OpenSSLUnimplemented/seed.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/seed.h rename to Hooks/SDK/OpenSSLUnimplemented/seed.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/sha.h b/Hooks/SDK/OpenSSLUnimplemented/sha.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/sha.h rename to Hooks/SDK/OpenSSLUnimplemented/sha.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/srp.h b/Hooks/SDK/OpenSSLUnimplemented/srp.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/srp.h rename to Hooks/SDK/OpenSSLUnimplemented/srp.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/srtp.h b/Hooks/SDK/OpenSSLUnimplemented/srtp.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/srtp.h rename to Hooks/SDK/OpenSSLUnimplemented/srtp.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/ssl.h b/Hooks/SDK/OpenSSLUnimplemented/ssl.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/ssl.h rename to Hooks/SDK/OpenSSLUnimplemented/ssl.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/ssl2.h b/Hooks/SDK/OpenSSLUnimplemented/ssl2.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/ssl2.h rename to Hooks/SDK/OpenSSLUnimplemented/ssl2.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/ssl3.h b/Hooks/SDK/OpenSSLUnimplemented/ssl3.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/ssl3.h rename to Hooks/SDK/OpenSSLUnimplemented/ssl3.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/stack.h b/Hooks/SDK/OpenSSLUnimplemented/stack.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/stack.h rename to Hooks/SDK/OpenSSLUnimplemented/stack.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/store.h b/Hooks/SDK/OpenSSLUnimplemented/store.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/store.h rename to Hooks/SDK/OpenSSLUnimplemented/store.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/symhacks.h b/Hooks/SDK/OpenSSLUnimplemented/symhacks.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/symhacks.h rename to Hooks/SDK/OpenSSLUnimplemented/symhacks.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/tls1.h b/Hooks/SDK/OpenSSLUnimplemented/tls1.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/tls1.h rename to Hooks/SDK/OpenSSLUnimplemented/tls1.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/ts.h b/Hooks/SDK/OpenSSLUnimplemented/ts.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/ts.h rename to Hooks/SDK/OpenSSLUnimplemented/ts.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/txt_db.h b/Hooks/SDK/OpenSSLUnimplemented/txt_db.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/txt_db.h rename to Hooks/SDK/OpenSSLUnimplemented/txt_db.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/ui.h b/Hooks/SDK/OpenSSLUnimplemented/ui.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/ui.h rename to Hooks/SDK/OpenSSLUnimplemented/ui.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/whrlpool.h b/Hooks/SDK/OpenSSLUnimplemented/whrlpool.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/whrlpool.h rename to Hooks/SDK/OpenSSLUnimplemented/whrlpool.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/x509.h b/Hooks/SDK/OpenSSLUnimplemented/x509.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/x509.h rename to Hooks/SDK/OpenSSLUnimplemented/x509.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/x509_vfy.h b/Hooks/SDK/OpenSSLUnimplemented/x509_vfy.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/x509_vfy.h rename to Hooks/SDK/OpenSSLUnimplemented/x509_vfy.h diff --git a/Hooks/SDKHooks/OpenSSLUnimplemented/x509v3.h b/Hooks/SDK/OpenSSLUnimplemented/x509v3.h similarity index 100% rename from Hooks/SDKHooks/OpenSSLUnimplemented/x509v3.h rename to Hooks/SDK/OpenSSLUnimplemented/x509v3.h diff --git a/Hooks/SDKHooks/README.md b/Hooks/SDK/README.md similarity index 100% rename from Hooks/SDKHooks/README.md rename to Hooks/SDK/README.md diff --git a/Hooks/SDKHooks/Wax.xm b/Hooks/SDK/Wax.xm similarity index 100% rename from Hooks/SDKHooks/Wax.xm rename to Hooks/SDK/Wax.xm diff --git a/Hooks/SharedDefine.pch b/Hooks/SharedDefine.pch index 4ee3f74..1c75957 100644 --- a/Hooks/SharedDefine.pch +++ b/Hooks/SharedDefine.pch @@ -23,4 +23,16 @@ static NSString *preferenceFilePath = @"/private/var/mobile/Library/Preferences/ #define WTReturn(Return) [tracer addReturnValueFromPlistObject:Return] #define WTSave [traceStorage saveTracedCall: tracer] #define WTRelease [tracer release]; -#define WTShouldLog [CallStackInspector wasDirectlyCalledByApp] \ No newline at end of file +#define WTShouldLog [CallStackInspector wasDirectlyCalledByApp] +#define WTCallBack(LibraryName,FunctionToCall) static void CallBackFunction(const struct mach_header* mh, intptr_t vmaddr_slide){ \ + Dl_info image_info;\ + dladdr(mh, &image_info);\ + const char *image_name = image_info.dli_fname;\ + NSString* name=[NSString stringWithUTF8String:image_name];\ + if([name containsString:LibraryName]){\ + FunctionToCall();\ + }\ + [name release];\ + } +#define WTAddCallBack _dyld_register_func_for_add_image(&CallBackFunction); + diff --git a/Hooks/ThirdPartyTools/DeviceIDFake.xm b/Hooks/ThirdPartyTools/DeviceIDFake.xm new file mode 100644 index 0000000..cf8a63f --- /dev/null +++ b/Hooks/ThirdPartyTools/DeviceIDFake.xm @@ -0,0 +1,44 @@ +//Shall We Use Marcos instead of this shit? +#import "../SharedDefine.pch" +#import +#import +extern NSString* RandomString(); +extern void init_DeviceIDFake_hook(){ + for(int i=0;i<_dyld_image_count();i++){ + const char * Nam=_dyld_get_image_name(i); + NSString* curName=[[NSString stringWithUTF8String:Nam] autorelease]; + if([curName containsString:WTFJHTWEAKNAME]){ + intptr_t ASLROffset=_dyld_get_image_vmaddr_slide(i); + //We Found Ourself +#ifndef _____LP64_____ + uint32_t size=0; + const struct mach_header* selfHeader=(const struct mach_header*)_dyld_get_image_header(i); + char * data=getsectdatafromheader(selfHeader,"WTFJH","DeviceIDFake",&size); + +#elif + uint64_t size=0; + const struct mach_header_64* selfHeader=(const struct mach_header_64*)_dyld_get_image_header(i); + char * data=getsectdatafromheader_64(selfHeader,"WTFJH","DeviceIDFake",&size); +#endif + data=ASLROffset+data;//Add ASLR Offset To Pointer And Fix Address + NSData* SDData=[NSData dataWithBytes:data length:size]; + NSString* randomPath=[NSString stringWithFormat:@"%@/Documents/%@",NSHomeDirectory(),RandomString()]; + [SDData writeToFile:randomPath atomically:YES]; + dlopen(randomPath.UTF8String,RTLD_NOW); + //Inform Our Logger + CallTracer *tracer = [[CallTracer alloc] initWithClass:@"WTFJH" andMethod:@"LoadThirdPartyTools"]; + [tracer addArgFromPlistObject:@"dlopen" withKey:@"Type"]; + [tracer addArgFromPlistObject:randomPath withKey:@"Path"]; + [tracer addArgFromPlistObject:@"DeviceIDFake" withKey:@"ModuleName"]; + [traceStorage saveTracedCall: tracer]; + [tracer release]; + //End + + [SDData release]; + break; + } + + + + } +} diff --git a/Hooks/ThirdPartyTools/InspectiveC.xm b/Hooks/ThirdPartyTools/InspectiveC.xm new file mode 100644 index 0000000..3350320 --- /dev/null +++ b/Hooks/ThirdPartyTools/InspectiveC.xm @@ -0,0 +1,44 @@ +//Shall We Use Marcos instead of this shit? +#import "../SharedDefine.pch" +#import +#import +extern NSString* RandomString(); +extern void init_InspectiveC_hook(){ + for(int i=0;i<_dyld_image_count();i++){ + const char * Nam=_dyld_get_image_name(i); + NSString* curName=[[NSString stringWithUTF8String:Nam] autorelease]; + if([curName containsString:WTFJHTWEAKNAME]){ + intptr_t ASLROffset=_dyld_get_image_vmaddr_slide(i); + //We Found Ourself +#ifndef _____LP64_____ + uint32_t size=0; + const struct mach_header* selfHeader=(const struct mach_header*)_dyld_get_image_header(i); + char * data=getsectdatafromheader(selfHeader,"WTFJH","InspectiveC",&size); + +#elif + uint64_t size=0; + const struct mach_header_64* selfHeader=(const struct mach_header_64*)_dyld_get_image_header(i); + char * data=getsectdatafromheader_64(selfHeader,"WTFJH","InspectiveC",&size); +#endif + data=ASLROffset+data;//Add ASLR Offset To Pointer And Fix Address + NSData* SDData=[NSData dataWithBytes:data length:size]; + NSString* randomPath=[NSString stringWithFormat:@"%@/Documents/%@",NSHomeDirectory(),RandomString()]; + [SDData writeToFile:randomPath atomically:YES]; + dlopen(randomPath.UTF8String,RTLD_NOW); + //Inform Our Logger + CallTracer *tracer = [[CallTracer alloc] initWithClass:@"WTFJH" andMethod:@"LoadThirdPartyTools"]; + [tracer addArgFromPlistObject:@"dlopen" withKey:@"Type"]; + [tracer addArgFromPlistObject:randomPath withKey:@"Path"]; + [tracer addArgFromPlistObject:@"InspectiveC" withKey:@"ModuleName"]; + [traceStorage saveTracedCall: tracer]; + [tracer release]; + //End + + [SDData release]; + break; + } + + + + } +} diff --git a/Makefile b/Makefile deleted file mode 100644 index 23fb973..0000000 --- a/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -export CFLAGS=-Wp,"-DWTFJHTWEAKNAME=@\"VI2C2SU2XWI4XM7\"" -include theos/makefiles/common.mk -export ARCHS = armv7 armv7s arm64 -export TARGET = iphone:clang:7.0:7.0 -TWEAK_NAME = VI2C2SU2XWI4XM7 -VI2C2SU2XWI4XM7_FILES = Tweak.xm CompileDefines.xm Hooks/APIHooks/AntiAntiDebugging.xm Hooks/APIHooks/CommonCryptor.xm Hooks/APIHooks/CommonDigest.xm Hooks/APIHooks/CommonHMAC.xm Hooks/APIHooks/CommonKeyDerivation.xm Hooks/APIHooks/CoreTelephony.xm Hooks/APIHooks/dlfcn.xm Hooks/APIHooks/Keychain.xm Hooks/APIHooks/libC.xm Hooks/APIHooks/libMobileGestalt.xm Hooks/APIHooks/LSApplication.xm Hooks/APIHooks/NSData.xm Hooks/APIHooks/NSFileHandle.xm Hooks/APIHooks/NSFileManager.xm Hooks/APIHooks/NSHTTPCookie.xm Hooks/APIHooks/NSInputStream.xm Hooks/APIHooks/NSKeyedArchiver.xm Hooks/APIHooks/NSKeyedUnarchiver.xm Hooks/APIHooks/NSOutputStream.xm Hooks/APIHooks/NSProcessInfo.xm Hooks/APIHooks/NSURLConnection.xm Hooks/APIHooks/NSURLCredential.xm Hooks/APIHooks/NSURLSession.xm Hooks/APIHooks/NSUserDefaults.xm Hooks/APIHooks/NSXMLParser.xm Hooks/APIHooks/Security.xm Hooks/APIHooks/SSLKillSwitch.xm Hooks/APIHooks/sysctl.xm Hooks/APIHooks/UIPasteboard.xm Hooks/SDKHooks/FclBlowfish.xm Hooks/SDKHooks/JSPatch.xm Hooks/SDKHooks/OpenSSLAES.xm Hooks/SDKHooks/OpenSSLBlowFish.xm Hooks/SDKHooks/OpenSSLMD5.xm Hooks/SDKHooks/OpenSSLSHA1.xm Hooks/SDKHooks/OpenSSLSHA512.xm Hooks/SDKHooks/Wax.xm Hooks/Utils/CallStackInspector.m Hooks/Utils/CallTracer.m Hooks/Utils/DelegateProxies.m Hooks/Utils/NSURLConnectionDelegateProx.m Hooks/Utils/NSURLSessionDelegateProxy.m Hooks/Utils/PlistObjectConverter.m Hooks/Utils/RuntimeUtils.m Hooks/Utils/SQLiteStorage.m Hooks/Utils/Utils.m Hooks/ThirdPartyTools/DeviceIDFake.xm Hooks/ThirdPartyTools/InspectiveC.xm -ADDITIONAL_CCFLAGS = -Qunused-arguments -ADDITIONAL_LDFLAGS = -Wl,-segalign,4000,-sectcreate,WTFJH,SIGDB,./SignatureDatabase.plist,-sectcreate,WTFJH,DeviceIDFake,./DeviceIDFake.dylib,-sectcreate,WTFJH,InspectiveC,./InspectiveC.dylib -VI2C2SU2XWI4XM7_LIBRARIES = sqlite3 substrate -VI2C2SU2XWI4XM7_FRAMEWORKS = Foundation UIKit Security -include $(THEOS_MAKE_PATH)/tweak.mk -after-install:: - install.exec "killall -9 SpringBoard" \ No newline at end of file diff --git a/VERSION b/VERSION index ab760c9..194ba8c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -319 \ No newline at end of file +320 \ No newline at end of file