Jump to content

6 posts in this topic

Recommended Posts

Posted (edited)

tested on iphone6s plus & iphone5s

I thought arm64 devices can not hook like this.

#import <CoreFoundation/CoreFoundation.h>
#import "substrate.h"
#import "libMobileGestalt.h"

CFPropertyListRef (*orig_MGCopyAnswer)(CFStringRef key);//hook MGCopyAnswer
CFPropertyListRef replace_MGCopyAnswer(CFStringRef key)
{
    NSLog(@"my hookfunction");
    return orig_MGCopyAnswer(key);
}

__attribute__((constructor)) static void initialize() {
    MSHookFunction(MGCopyAnswer,replace_MGCopyAnswer,&orig_MGCopyAnswer);
}

any ideas to hook MGCopyAnswer on arm64 devices??  ;)

Updated by youngzzzzzzz
Posted

I can hook stuff fine on my 5s

 

I know one instance where stuff will crash when hooked, when something that you are hooking doesn't exist. Can you see "my hookfunction" in syslog?

Posted (edited)

syslog of my iphone6s plus 9.0.2jb before crashed

[0;37mJul 20 17:14:49 iPhone[0;36m MobileSafari[20940][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction
[0;37mJul 20 17:14:49 iPhone[0;36m MobileSafari[20940][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction
[0;37mJul 20 17:14:49 iPhone[0;36m MobileSafari[20940][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction
[0;37mJul 20 17:14:49 iPhone[0;36m com.apple.xpc.launchd[1][m (UIKitApplication:com.apple.mobilesafari[0xaa3f][20940])[m <Notice>: Service exited due to signal: Illegal instruction: 4
[0;37mJul 20 17:14:49 iPhone[0;36m diagnosticd[177][2;31m <[0;31mError[2;31m>[0;37m:[m unable to find offset 0x9a7f3a5c in shared cache for arch 'arm64'
[0;37mJul 20 17:14:49 iPhone[0;36m SpringBoard[783][2;33m <[0;33mWarning[2;33m>[0;37m:[m Application 'UIKitApplication:com.apple.mobilesafari[0xaa3f]' crashed.

and my iphone5s 9.1jb

[0;37mJul 20 17:30:42 iPhone[0;36m MobileSafari[969][2;32m <[0;32mNotice[2;32m>[0;37m:[m MS:Notice: Injecting: com.apple.mobilesafari [MobileSafari] (1241.11)
[0;37mJul 20 17:30:42 iPhone[0;36m MobileSafari[969][2;32m <[0;32mNotice[2;32m>[0;37m:[m CoreFoundation = 1241.110000
[0;37mJul 20 17:30:42 iPhone[0;36m MobileSafari[969][2;32m <[0;32mNotice[2;32m>[0;37m:[m Could not match CoreFoundation = 1241.110000
[0;37mJul 20 17:30:42 iPhone[0;36m MobileSafari[969][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction
[0;37mJul 20 17:30:42 iPhone[0;36m MobileSafari[969][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction
[0;37mJul 20 17:30:42 iPhone[0;36m MobileSafari[969][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction
[0;37mJul 20 17:30:42 iPhone[0;36m diagnosticd[191][2;31m <[0;31mError[2;31m>[0;37m:[m error evaluating process info - pid: 969, puniqueid: 969
[0;37mJul 20 17:30:42 iPhone[0;36m com.apple.xpc.launchd[1][m (UIKitApplication:com.apple.mobilesafari[0x8cb0][969])[m <Notice>: Service exited due to signal: Illegal instruction: 4
[0;37mJul 20 17:30:42 iPhone[0;36m SpringBoard[779][2;33m <[0;33mWarning[2;33m>[0;37m:[m Application 'UIKitApplication:com.apple.mobilesafari[0x8cb0]' crashed.

Tweak.xm:

#import <CoreFoundation/CoreFoundation.h>
#import "substrate.h"
#import "MobileGestalt.h"

CFPropertyListRef (*orig_MGCopyAnswer)(CFStringRef key);//hook MGCopyAnswer
CFPropertyListRef replace_MGCopyAnswer(CFStringRef key)
{
    NSLog(@"my hookfunction");
    return orig_MGCopyAnswer(key);
}

__attribute__((constructor)) static void initialize() {
    MSHookFunction(MGCopyAnswer,replace_MGCopyAnswer,&orig_MGCopyAnswer);
}

makefile:

export ARCHS = armv7 arm64
export TARGET = iphone:clang:latest:8.0

include $(THEOS_MAKE_PATH)/common.mk

TWEAK_NAME = DemoTweak
DemoTweak_FILES = Tweak.xm
DemoTweak_LIBRARIES = flipswitch MobileGestalt
DemoTweak_LDFLAGS += -Wl,-segalign,4000
DemoTweak_CFLAGS = -Wno-c++11-extensions

include $(THEOS_MAKE_PATH)/tweak.mk
include $(THEOS_MAKE_PATH)/aggregate.mk

after-install::
	# install.exec "killall -9 SpringBoard"

any ideas?

Updated by youngzzzzzzz
Posted (edited)

syslog of my iphone6s plus 9.0.2jb before crashed

[0;37mJul 20 17:14:49 iPhone[0;36m MobileSafari[20940][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction[0;37mJul 20 17:14:49 iPhone[0;36m MobileSafari[20940][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction[0;37mJul 20 17:14:49 iPhone[0;36m MobileSafari[20940][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction[0;37mJul 20 17:14:49 iPhone[0;36m com.apple.xpc.launchd[1][m (UIKitApplication:com.apple.mobilesafari[0xaa3f][20940])[m <Notice>: Service exited due to signal: Illegal instruction: 4[0;37mJul 20 17:14:49 iPhone[0;36m diagnosticd[177][2;31m <[0;31mError[2;31m>[0;37m:[m unable to find offset 0x9a7f3a5c in shared cache for arch 'arm64'[m[0;37mJul 20 17:14:49 iPhone[0;36m SpringBoard[783][2;33m <[0;33mWarning[2;33m>[0;37m:[m Application 'UIKitApplication:com.apple.mobilesafari[0xaa3f]' crashed.

and my iphone5s 9.1jb

 

[0;37mJul 20 17:30:42 iPhone[0;36m MobileSafari[969][2;32m <[0;32mNotice[2;32m>[0;37m:[m MS:Notice: Injecting: com.apple.mobilesafari [MobileSafari] (1241.11)[0;37mJul 20 17:30:42 iPhone[0;36m MobileSafari[969][2;32m <[0;32mNotice[2;32m>[0;37m:[m CoreFoundation = 1241.110000[0;37mJul 20 17:30:42 iPhone[0;36m MobileSafari[969][2;32m <[0;32mNotice[2;32m>[0;37m:[m Could not match CoreFoundation = 1241.110000[0;37mJul 20 17:30:42 iPhone[0;36m MobileSafari[969][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction[0;37mJul 20 17:30:42 iPhone[0;36m MobileSafari[969][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction[0;37mJul 20 17:30:42 iPhone[0;36m MobileSafari[969][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction[0;37mJul 20 17:30:42 iPhone[0;36m diagnosticd[191][2;31m <[0;31mError[2;31m>[0;37m:[m error evaluating process info - pid: 969, puniqueid: 969[0;37mJul 20 17:30:42 iPhone[0;36m com.apple.xpc.launchd[1][m (UIKitApplication:com.apple.mobilesafari[0x8cb0][969])[m <Notice>: Service exited due to signal: Illegal instruction: 4[0;37mJul 20 17:30:42 iPhone[0;36m SpringBoard[779][2;33m <[0;33mWarning[2;33m>[0;37m:[m Application 'UIKitApplication:com.apple.mobilesafari[0x8cb0]' crashed.
Tweak.xm:

#import <CoreFoundation/CoreFoundation.h>#import "substrate.h"#import "MobileGestalt.h"CFPropertyListRef (*orig_MGCopyAnswer)(CFStringRef key);//hook MGCopyAnswerCFPropertyListRef replace_MGCopyAnswer(CFStringRef key){    NSLog(@"my hookfunction");    return orig_MGCopyAnswer(key);}__attribute__((constructor)) static void initialize() {    MSHookFunction(MGCopyAnswer,replace_MGCopyAnswer,&orig_MGCopyAnswer);}
makefile:

export ARCHS = armv7 arm64export TARGET = iphone:clang:latest:8.0include $(THEOS_MAKE_PATH)/common.mkTWEAK_NAME = DemoTweakDemoTweak_FILES = Tweak.xmDemoTweak_LIBRARIES = flipswitch MobileGestaltDemoTweak_LDFLAGS += -Wl,-segalign,4000DemoTweak_CFLAGS = -Wno-c++11-extensionsinclude $(THEOS_MAKE_PATH)/tweak.mkinclude $(THEOS_MAKE_PATH)/aggregate.mkafter-install::	# install.exec "killall -9 SpringBoard"
any ideas?
I highlighted the text that described the error and it was exactily what I thought :p My guess is that you'll have to find another way to do this

 

Look:

 

[0;37mJul 20 17:14:49 iPhone[0;36m MobileSafari[20940][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction[0;37mJul 20 17:14:49 iPhone[0;36m MobileSafari[20940][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction[0;37mJul 20 17:14:49 iPhone[0;36m MobileSafari[20940][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction[0;37mJul 20 17:14:49 iPhone[0;36m com.apple.xpc.launchd[1][m (UIKitApplication:com.apple.mobilesafari[0xaa3f][20940])[m <Notice>: Service exited due to signal: Illegal instruction: 4[0;37mJul 20 17:14:49 iPhone[0;36m diagnosticd[177][2;31m <[0;31mError[2;31m>[0;37m:[m unable to find offset 0x9a7f3a5c in shared cache for arch 'arm64'[0;37mJul 20 17:14:49 iPhone[0;36m SpringBoard[783][2;33m <[0;33mWarning[2;33m>[0;37m:[m Application 'UIKitApplication:com.apple.mobilesafari[0xaa3f]' crashed.

 

The best analogy I have to what your problem is is this: imagine you're making an app, and you call a method names "- (void)showAlert". But that method doesn't exist, and when you tap a button that is supposed to call that method, your app will crash. I'm pretty sure it's the same issue here, you are calling something that doesn't exist :)

Updated by Guest

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Our picks

    • TMNT:Shredder’s Revenge Mobile v1.2.15 [+3 Jailed Cheats]
      Modded/Hacked App: TMNT:Shredder’s Revenge Mobile By Playdigious
      Bundle ID: com.playdigious.tmnt
      App Store Link: https://apps.apple.com/us/app/tmnt-shredders-revenge-mobile/id1597084360?uo=4



      🤩 Hack Features

      - Full Version Unlocked
      - Never Die
      - Unlimited Ninja Power
       
      • 3 replies
    • Big Brother - The Game v2.1.5 +3 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Big Brother - The Game By Fusebox Games
      Bundle ID: com.fuseboxgames.bigbrother
      iTunes Store Link:https://apps.apple.com/au/app/big-brother-the-game/id6740625561

       
       

      🤩 Hack Features

      - Unlimited Gems -> Earn or spend some.
      - Unlimited Tickets -> Earn or spend some.
      • 11 replies
    • Big Brother - The Game v2.1.5 +3 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Big Brother - The Game By Fusebox Games
      Bundle ID: com.fuseboxgames.bigbrother
      iTunes Store Link:https://apps.apple.com/au/app/big-brother-the-game/id6740625561

       


      🤩 Hack Features

      - Unlimited Gems -> Earn or spend some.
      - Unlimited Tickets -> Earn or spend some.
      • 25 replies
    • Cluedo - Official Hasbro Game v1.0.3 +1 Jailed Cheat [ Everything Owned ]
      Modded/Hacked App: Cluedo - Official Hasbro Game By Marmalade Game Studio Limited
      Bundle ID: com.marmalade.cluedo2RotW
      iTunes Store Link: https://apps.apple.com/gb/app/cluedo-official-hasbro-game/id6447306697?uo=4

       
       

      🤩 Hack Features

      - Everything Owned
      • 7 replies
    • Cluedo - Official Hasbro Game v1.0.3 +1 Cheat [ Everything Owned ]
      Modded/Hacked App: Cluedo - Official Hasbro Game By Marmalade Game Studio Limited
      Bundle ID: com.marmalade.cluedo2RotW
      iTunes Store Link: https://apps.apple.com/gb/app/cluedo-official-hasbro-game/id6447306697?uo=4

       


      🤩 Hack Features

      - Everything Owned
      • 6 replies
    • Royal Kingdom v19315 +4 Jailed Cheats [ Coins + More ]
      Modded/Hacked App: Royal Kingdom By Dream Games
      Bundle ID: com.dreamgames.royalkingdom
      iTunes Store Link: https://apps.apple.com/ph/app/royal-kingdom/id1606549505
       

      Hack Features:
      - Freeze Coins
      - Freeze Lives
      - Freeze Boosters
      - Freeze Moves


      Jailbreak required hack(s): [Mod Menu Hack] Royal Kingdom v3987 +4 Cheats [ Unlimited Coins ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Like
      • 134 replies
    • Royal Kingdom v19315 +4 Cheats [ Coins + More ]
      Modded/Hacked App: Royal Kingdom By Dream Games
      Bundle ID: com.dreamgames.royalkingdom
      iTunes Store Link: https://apps.apple.com/ph/app/royal-kingdom/id1606549505
       

      Hack Features:
      - Freeze Coins
      - Freeze Lives
      - Freeze Boosters
      - Freeze Moves


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Royal Kingdom v3987 +4 Jailed Cheats [ Unlimited Coins ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 83 replies
    • Racing Kingdom v1.0.5 +2 Jailed Cheats [ Auto Win ]
      Modded/Hacked App: Racing Kingdom By SUPERGEARS OYUN YAZILIM TEKNOLOJI VE PAZARLAMA ANONIM SIRKETI
      Bundle ID: com.supergears.racingkingdom
      iTunes Store Link: https://apps.apple.com/us/app/racing-kingdom/id6468027706?uo=4

       


      🚀 Hack Features

      - Auto Win
      - Freeze Rival


      🍏 Jailbreak iOS hacks: [Mod Menu Hack] Racing Kingdom v0.33.6 +2 Cheats [ Auto Win ] - ViP Cheats - iOSGods
      🤖 Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      • 23 replies
    • Racing Kingdom v1.0.5 +2 Cheats [ Auto Win ]
      Modded/Hacked App: Racing Kingdom By SUPERGEARS OYUN YAZILIM TEKNOLOJI VE PAZARLAMA ANONIM SIRKETI
      Bundle ID: com.supergears.racingkingdom
      iTunes Store Link: https://apps.apple.com/us/app/racing-kingdom/id6468027706?uo=4

       
       

      🚀 Hack Features

      - Auto Win
      - Freeze Rival


      🍏 For Non-Jailbroken & No Jailbreak required hacks: [IPA Mod Menu] Racing Kingdom v0.33.6 +2 Jailed Cheats [ Auto Win ] - ViP Non-Jailbroken Hacks & Cheats - iOSGods
      🤖 Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      • 67 replies
    • Townfall: Zombie Tower Defense v20.2.7 [+4 Cheats]
      Modded/Hacked App: Townfall: Zombie Tower Defense By Sugarscone
      Bundle ID: com.nmg.townfall.ios
      App Store Link: https://apps.apple.com/us/app/townfall-zombie-tower-defense/id6476259669?uo=4



      🤩 Hack Features

      - No Reload
      - Add Gold (Enable inside battle and finish stage)
      - Add Wood (Enable inside battle)
      - Skip Wave (Enable inside wave)
      • 12 replies
    • Townfall: Zombie Tower Defense v20.2.7 [+4 Jailed Cheats]
      Modded/Hacked App: Townfall: Zombie Tower Defense By Sugarscone
      Bundle ID: com.nmg.townfall.ios
      App Store Link: https://apps.apple.com/us/app/townfall-zombie-tower-defense/id6476259669?uo=4



      🤩 Hack Features

      - No Reload
      - Add Gold (Enable inside battle and finish stage)
      - Add Wood (Enable inside battle)
      - Skip Wave (Enable inside wave)
      • 19 replies
    • Idle Army: Trading Weapons v1.13.0 [+5 Jailed Cheats]
      Modded/Hacked App: Idle Army: Trading Weapons By UNIMOB VIET NAM COMPANY LIMITED
      Bundle ID: com.unimob.idle.army
      App Store Link: https://apps.apple.com/us/app/idle-army-trading-weapons/id6670773625?uo=4



      🤩 Hack Features

      - Always Enough Resources (Gem, Skip Ads etc.)
      - Max Gold (Enable inside game)
      - 2x Game Speed (Enable inside game)
      - Kill Monster (Enable inside game)
      - Add All Pet

      • 3 replies
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines