Jump to content

Help with disabling _syscall


Go to solution Solved by Aswag1,

36 posts in this topic

Recommended Posts

  • Solution
Posted

Well after laying dormant for quite awhile, I thought I might add a couple of pointers....

 

It seems that for 64-bit devices, there are certain additional checks in the binary in most GameLoft games. Most notably, the addition of a __sysctl. What this call does is check whether the __syscall flag is checked. If it sees that it has been manipulated in some fashion (such as NOPing the BLX or NOP the MOV) it will immediately give a EXEC_BAD_ADDRESS error.

 

Now here are some of my findings to combat this...

 

I have seen that making any alterations in a binary patch have led to the game crashing once I attach to it in lldb. So, logically I just patch the memory of the game rather than make crude adjustments. It seems to work, though it is a pain in the ass and you have to keep stepping through the memory stack to make sure that all checks are thoroughly disabled. I had all the checks for Brothers In Arms 3 before, I am not sure if I have them still. I would like to help, but I'm not really into iOS hacking anymore so there's that. Hopefully one of the young bloods can help you out and resolve your problem.

Posted

Well after laying dormant for quite awhile, I thought I might add a couple of pointers....

 

It seems that for 64-bit devices, there are certain additional checks in the binary in most GameLoft games. Most notably, the addition of a __sysctl. What this call does is check whether the __syscall flag is checked. If it sees that it has been manipulated in some fashion (such as NOPing the BLX or NOP the MOV) it will immediately give a EXEC_BAD_ADDRESS error.

 

Now here are some of my findings to combat this...

 

I have seen that making any alterations in a binary patch have led to the game crashing once I attach to it in lldb. So, logically I just patch the memory of the game rather than make crude adjustments. It seems to work, though it is a pain in the ass and you have to keep stepping through the memory stack to make sure that all checks are thoroughly disabled. I had all the checks for Brothers In Arms 3 before, I am not sure if I have them still. I would like to help, but I'm not really into iOS hacking anymore so there's that. Hopefully one of the young bloods can help you out and resolve your problem.

 

Thank you for a great explanation. So basically, I cannot use my 5S to make hacks for Gameloft games (except for patching the memory, which would be temporary because the addresses would change every time) because it is 64-bit, but I can use a device that is not 64-bit, for example my old ipod touch 5g. So if I load up the binary from my iPod, I might be able to patch __syscall so that I can attach it to GDB?

Posted

Find the syscal method, and BX LR the first instruction.

That's right. If calls to the functions can easily be disabled, you could simply make the actual syscall function to return and do nothing. Can you post the disassembly for the syscall function?

Posted (edited)

@@Aswag1 yeah, it has been jailbroken four times and freezes regularly... i don't think i can use it, and out of curiosity, is android hacking easier than ios?

 

@@Gh0stByte i feel like if i BX LR the first instruction, it will crash because of what aswag1 said

 

@jx1992 i can post the disassembly here later, just not now, i'm going to a movie in 5 mins :p

Updated by Guest
Posted

@@jx1992 here are the things that i think are the _syscall function.

 

1.

 

__text:0000C5C8   sub_C5C8                                ; CODE XREF: -[sendInfoInterface IGPSendGameInfo:::::]+536p

__text:0000C5C8                 PUSH            {R7,LR}
__text:0000C5CA                 MOV             R7, SP
__text:0000C5CC                 SUB             SP, SP, #0x6C
__text:0000C5CE                 MOVW            R1, #(:lower16:(aLibraryMobiles - 0xC5DE)) ; "/Library/MobileSubstrate/MobileSubstrat"...
__text:0000C5D2                 MOV             R2, SP
__text:0000C5D4                 MOVT.W          R1, #(:upper16:(aLibraryMobiles - 0xC5DE)) ; "/Library/MobileSubstrate/MobileSubstrat"...
__text:0000C5D8                 MOVS            R0, #0xBC ; int
__text:0000C5DA                 ADD             R1, PC  ; "/Library/MobileSubstrate/MobileSubstrat"...
__text:0000C5DC                 BLX.W           _syscall
__text:0000C5E0                 CMP             R0, #0
__text:0000C5E2                 BEQ             loc_C66C
__text:0000C5E4                 MOVW            R1, #(:lower16:(aApplicationsCy - 0xC5F4)) ; "/Applications/Cydia.app"
__text:0000C5E8                 MOV             R2, SP
__text:0000C5EA                 MOVT.W          R1, #(:upper16:(aApplicationsCy - 0xC5F4)) ; "/Applications/Cydia.app"
__text:0000C5EE                 MOVS            R0, #0xBC ; int
__text:0000C5F0                 ADD             R1, PC  ; "/Applications/Cydia.app"
__text:0000C5F2                 BLX.W           _syscall
__text:0000C5F6                 CMP             R0, #0
__text:0000C5F8                 BEQ             loc_C66C
__text:0000C5FA                 MOVW            R1, #(:lower16:(aVarLibApt - 0xC60A)) ; "/var/lib/apt"
__text:0000C5FE                 MOV             R2, SP
__text:0000C600                 MOVT.W          R1, #(:upper16:(aVarLibApt - 0xC60A)) ; "/var/lib/apt"
__text:0000C604                 MOVS            R0, #0xBC ; int
__text:0000C606                 ADD             R1, PC  ; "/var/lib/apt"
__text:0000C608                 BLX.W           _syscall
__text:0000C60C                 CMP             R0, #0
__text:0000C60E                 BEQ             loc_C66C
__text:0000C610                 MOVW            R1, #(:lower16:(aVarLibCydia - 0xC620)) ; "/var/lib/cydia"
__text:0000C614                 MOV             R2, SP
__text:0000C616                 MOVT.W          R1, #(:upper16:(aVarLibCydia - 0xC620)) ; "/var/lib/cydia"
__text:0000C61A                 MOVS            R0, #0xBC ; int
__text:0000C61C                 ADD             R1, PC  ; "/var/lib/cydia"
__text:0000C61E                 BLX.W           _syscall
__text:0000C622                 CMP             R0, #0
__text:0000C624                 BEQ             loc_C66C
__text:0000C626                 MOVW            R1, #(:lower16:(aVarTmpCydia_lo - 0xC636)) ; "/var/tmp/cydia.log"
__text:0000C62A                 MOV             R2, SP
__text:0000C62C                 MOVT.W          R1, #(:upper16:(aVarTmpCydia_lo - 0xC636)) ; "/var/tmp/cydia.log"
__text:0000C630                 MOVS            R0, #0xBC ; int
__text:0000C632                 ADD             R1, PC  ; "/var/tmp/cydia.log"
__text:0000C634                 BLX.W           _syscall
__text:0000C638                 CMP             R0, #0
__text:0000C63A                 BEQ             loc_C66C
__text:0000C63C                 MOVW            R1, #(:lower16:(aEtcApt - 0xC64C)) ; "/etc/apt"
__text:0000C640                 MOV             R2, SP
__text:0000C642                 MOVT.W          R1, #(:upper16:(aEtcApt - 0xC64C)) ; "/etc/apt"
__text:0000C646                 MOVS            R0, #0xBC ; int
__text:0000C648                 ADD             R1, PC  ; "/etc/apt"
__text:0000C64A                 BLX.W           _syscall
__text:0000C64E                 CMP             R0, #0
__text:0000C650                 BEQ             loc_C66C
__text:0000C652                 MOVS            R0, #2  ; int
__text:0000C654                 BLX.W           _syscall
__text:0000C658                 MOV             R1, R0
__text:0000C65A                 MOVS            R0, #0  ; int
__text:0000C65C                 CMP             R1, #0
__text:0000C65E                 BEQ             loc_C672
__text:0000C660                 CMP.W           R1, #0xFFFFFFFF
__text:0000C664                 IT GT
__text:0000C666                 MOVGT           R0, #1
__text:0000C668                 ADD             SP, SP, #0x6C
__text:0000C66A                 POP             {R7,PC}
__text:0000C66C ; ---------------------------------------------------------------------------
__text:0000C66C
__text:0000C66C loc_C66C                                ; CODE XREF: sub_C5C8+1Aj
__text:0000C66C                                         ; sub_C5C8+30j ...
__text:0000C66C                 MOVS            R0, #1
__text:0000C66E                 ADD             SP, SP, #0x6C
__text:0000C670                 POP             {R7,PC}
__text:0000C672 ; ---------------------------------------------------------------------------
__text:0000C672
__text:0000C672 loc_C672                                ; CODE XREF: sub_C5C8+96j
__text:0000C672                 BLX.W           _exit
__text:0000C676                 NOP
__text:0000C676 ; End of function sub_C5C8

 

2.

 

__picsymbolstub4:0095AEE8 _syscall                                ; CODE XREF: sub_C5C8+14p
__picsymbolstub4:0095AEE8                                         ; sub_C5C8+2Ap ...
__picsymbolstub4:0095AEE8                 LDR             R12, =(_syscall_ptr - 0x95AEF4)
__picsymbolstub4:0095AEEC                 ADD             R12, PC, R12 ; _syscall_ptr
__picsymbolstub4:0095AEF0                 LDR             PC, [R12] ; __imp__syscall
__picsymbolstub4:0095AEF0 ; End of function _syscall
 
Again, I'm not used to doing all of this just to debug a game. I was surprised that there where almost no answers from when I first searched this, or no guide on any website. I am also surprised that there are so many people that are willing to help me, it really means alot :)
Posted

@@Shmoo419

 

In the disassembly posted on page 1, the syscall is made to ptrace with the argument "PT_DENY_ATTACH".

In linux, this would be used to deny debuggers from attaching to the current process (in this case, Nova 3).

 

Since the disassembly shows that the program doesn't check for the return value of the ptrace syscall, what you can do is one of these 2.

 

1) Set r1 to -1

 

Because -1 is not a valid ptrace request argument, the ptrace syscall will return with an error and the call will not succeed.

 

2) Nop the branch to syscall

 

This simply stops the function from making a syscall. Simple as that.

 

From what I can infer, I suppose you are trying to attach a debugger to the Nova 3 app. You can try the above 2 methods to see if you can get your debugger to attach.

 

For more details you can reference this site : http://www.coredump.gr/articles/ios-anti-debugging-protections-part-1/

 

Good luck

Posted

@@jx1992 I know that PT_DENY_ATTACH keeps the debugger from attaching, but I never tried -1, but instead anything other than 31 (0x1F) or I NOP'ed it. And I usually stay away from NOP'ing branches because it usually results in a crash (for me at least), but I'll give it a go. That website was really useful, too.

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

    • Galaxy Defense: Fortress TD v0.8.9 [+2 Cheats]
      Modded/Hacked App: Galaxy Defense: Fortress TD By CYBERJOY LIMITED
      Bundle ID: com.cyberjoy.galaxydefense
      App Store Link: https://apps.apple.com/us/app/galaxy-defense-fortress-td/id6740189002?uo=4



      🤩 Hack Features

      - One Hit Kill
      - Activate SVIP
       
        • Agree
        • Winner
        • Like
      • 20 replies
    • Galaxy Defense: Fortress TD v0.8.9 [+2 Jailed Cheats]
      Modded/Hacked App: Galaxy Defense: Fortress TD By CYBERJOY LIMITED
      Bundle ID: com.cyberjoy.galaxydefense
      App Store Link: https://apps.apple.com/us/app/galaxy-defense-fortress-td/id6740189002?uo=4



      🤩 Hack Features

      - One Hit Kill
      - Activate SVIP
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 5 replies
    • Run! Goddess v1.0.17 [+4 Jailed Cheats]
      Modded/Hacked App: Run! Goddess By TOP GAMES INC.
      Bundle ID: com.topgamesinc.rg
      iTunes Store Link: https://apps.apple.com/us/app/run-goddess/id6667111749?uo=4



      🤩 Hack Features

      - No Skill Cooldown
      - Slow Enemy
      - Enemy Can't Attack (Enemy Can't Do Damage)
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 75 replies
    • Run! Goddess v1.0.17 [+4 Cheats]
      Modded/Hacked App: Run! Goddess By TOP GAMES INC.
      Bundle ID: com.topgamesinc.rg
      iTunes Store Link: https://apps.apple.com/us/app/run-goddess/id6667111749?uo=4

       

      🤩 Hack Features

      - No Skill Cooldown
      - Slow Enemy
      - Enemy Can't Attack (Enemy Can't Do Damage)
       
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 68 replies
    • Eternium Cheats v1.37.7 +11
      Modded/Hacked App: Eternium By Making Fun, Inc.
      Bundle ID: com.makingfun.mageandminions
      iTunes Store Link: https://apps.apple.com/us/app/eternium/id579931356?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Sileo, Cydia or Zebra).

       

      🤩 Hack Features

      - 5K Gems When Completed Stage
      - Infinite Gold
      - Infinite Cosmetic
      - Infinite Yellow Stone
      - Multiply Attack (Linked with Enemy)
      - No Skills Cooldown
      - No Consumable Cooldown
      - Multiply Attack Speed
      - Instant Regen Health
      - Always Crit
      - Material Drops (When you killed an Enemy it will drop materials for crafts)



      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/194526-eternium-cheats-v13355-6/
        • Informative
        • Agree
        • Winner
        • Like
      • 75 replies
    • Candy Crush Saga v1.304.1 Jailed Cheats +3
      Modded/Hacked App: Candy Crush Saga By King.com Limited
      Bundle ID: com.midasplayer.apps.candycrushsaga
      iTunes Store Link: https://apps.apple.com/us/app/candy-crush-saga/id553834731?uo=4


      Hack Features:
      - Infinite Life
      - Infinite Booster
      - Infinite Move


      Jailbreak required hack(s): https://iosgods.com/topic/190447-candy-crush-saga-cheats-v12941-3/


      iOS Hack Download IPA Link: https://iosgods.com/topic/190448-candy-crush-saga-v12941-jailed-cheats-3/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 96 replies
    • [ JP / Global/ KR] Puzzle & Dragons Cheats v22.3.0 +3
      Modded/Hacked App: Puzzle & Dragons (English) by GungHo Online Entertainment, INC.
      Bundle ID: jp.gungho.padEN
      iTunes Store Link: https://apps.apple.com/us/app/puzzle-dragons-english/id563474464?uo=4&at=1010lce4


      Hack Features:
      - God Mode
      - OHK
      - Frozen Enemies


      iOS Hack Download Link: https://iosgods.com/topic/133984-puzzle-dragons-jp-english-cheats-all-versions-3/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 454 replies
    • DomiNation Asia By NEXON Company v12.1480.1481 - [ Currencies Freeze & More ]
      Modded/Hacked App: ドミネーションズ -文明創造- (DomiNations) By NEXON Company
      Bundle ID: com.nexon.dominations.asia
      iTunes Store Link: https://itunes.apple.com/jp/app/ドミネーションズ-文明創造-dominations/id1012778321


      Hack Features:
      - Unlimited Crowns/Food/Oil/Gold -> Resources will add instead of subtracting. Works with Crowns. Read note inside the feature for more information! This does not work for speeding up buildings.
      - All Achievements Unlocked 
      - Freeze Crowns/Food/Oil/Gold -> Freezes Resources so they do not decrease when used! This does not work for speeding up buildings.
      - No Citizen Cost 
      - 0 Cost to Speed Up Training Troops
      - 0 Cost to Speed Up Tactics
      - 0 Food Cost to Train Troops
      - 0 Food Cost to Upgrade Troops
      - No Timer to Upgrade Troops
      - 0 Food Cost to Train Spells
      - 0 General Train Cost
      - No General Train CoolDown
      - 0 Food Cost to Build Wonder
      - 0 Food Cost to Research Troops
      - 0 Food Cost to Upgrade Tactics
      - No Timer to Library Research
      - No Timer to Upgrade Spells
      - 0 Cost to Upgrade Buildings
      - 0 Workers Required to Upgrade
      - 0 Crown Cost For Peace

      This hack works on the latest x64 or ARM64 & ARM64e iDevices: iPhone 5s, 6, 6 Plus, 6s, 6s Plus, 7, 7 Plus, 8, 8 Plus, X, Xr, Xs, Xs Max, 11, 11 Pro, 11 Pro Max, 12, 12 Pro, 12 Pro Max, 12 Mini, 13, 13 Pro, 13 Pro Max, 13 Mini, 14, 14 Plus, 14 Pro, 14 Pro Max, SE, iPod Touch 6G, 7G, iPad Air, Air 2, iPad Pro & iPad Mini 2, 3, 4, 5, 6 and later.


      Global hack(s): https://iosgods.com/topic/50401-ultrahack-dominations-v6660661-40-cheats-iosgods-exclusive/?tab=comments#comment-1582742
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,100 replies
    • DomiNations v12.1480.1481 +40++ Cheats [ Exclusive ]
      Modded/Hacked App: DomiNations by NEXON M Inc.
      Bundle ID: com.nexonm.dominations
      iTunes Store Link: https://itunes.apple.com/us/app/dominations/id922558758


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iFile / Filza / iFunBox / iTools or any other file managers for iOS.
      - Cydia Substrate (from Cydia).
      - PreferenceLoader (from Cydia).


      Hack Features:
      - Unlimited Crowns/Food/Oil/Gold -> Resources will add instead of subtracting. Works with Crowns. Read note inside the feature for more information! This does not work for speeding up buildings.
      - All Achievements Unlocked
      - Freeze Crowns/Food/Oil/Gold -> Freezes Resources so they do not decrease when used! This does not work for speeding up buildings.
      - No Citizens Cost
      - Place Multiple of Same Building
      - 0 Cost to Speed Up Training Troops
      - 0 Cost to Speed Up Tactics
      - 0 Food Cost to Train Troops
      - 0 Food Cost to Upgrade Troops
      - No Timer to Upgrade Troops
      - 0 Food Cost to Train Spells
      - 0 General Train Cost
      - No General Train Cooldown
      - 0 Food Cost to Build Wonder
      - 0 Food Cost to Research Troops
      - 0 Food Cost to Upgrade Tactics
      - No Timer to Library Research
      - No Timer to Upgrade Spells
      - 0 Cost to Upgrade Buildings
      - 0 Workers Required to Upgrade
      This hack is an In-Game Mod Menu (iGMM). In order to activate the Mod Menu, tap on the iOSGods button found inside the app.
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 4,984 replies
    • Monster Legends: Collect all Cheats v17.9.5 +8
      Modded/Hacked App: Monster Legends: Merge RPG By Socialpoint
      Bundle ID: es.socialpoint.MonsterCity
      iTunes Store Link: https://apps.apple.com/us/app/monster-legends-merge-rpg/id653508448?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Cydia, Sileo or Zebra).

       

      🤩 Hack Features

      - 1 Hit Kill
      - Skip Enemy Turn
      - Multiply Attack
      - Multiply Defense
      - Insane Score (Always 3 Stars)
      - No Skill Cost
      - Auto Win
      - Auto Play Battle Enabled for All Maps


      🍏 For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/topic/140543-monster-legends-collect-all-v1778-5-cheats-for-jailed-idevices/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/176914-monster-legends-collect-all-cheats-v1779-8/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 339 replies
    • Simply Piano: Learn Piano Fast Modded v9.10.14 +1
      Modded/Hacked App: Simply Piano: Learn Piano Fast By Simply Ltd
      Bundle ID: com.joytunes.asla
      iTunes Store Link: https://apps.apple.com/us/app/simply-piano-learn-piano-fast/id1019442026?uo=4


      Hack Features:
      - PREMIUM
       

      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/68652-simply-piano-v975-jailed-mod-1/


      Hack Download Link: https://iosgods.com/topic/83369-simply-piano-learn-piano-fast-modded-all-versions-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,540 replies
    • [ Chiikawa Pocket JP ] ちいかわぽけっと v1.2.0 Jailed Cheats +3
      Modded/Hacked App: ちいかわぽけっと By Applibot Inc.
      Bundle ID: jp.co.applibot.chiikawapocket
      iTunes Store Link: https://apps.apple.com/jp/app/%E3%81%A1%E3%81%84%E3%81%8B%E3%82%8F%E3%81%BD%E3%81%91%E3%81%A3%E3%81%A8/id6596745408?uo=4

       

      📌 Mod Requirements

      - Non-Jailbroken/Jailed or Jailbroken iPhone or iPad.
      - Sideloadly or alternatives.
      - Computer running Windows/macOS/Linux with iTunes installed.

       

      🤩 Hack Features

      - God Mode
      - Multiply Attack
      - Custom Speed (Customize before Login or Clear stage to get apply)

       

      ⬇️ iOS Hack Download IPA Link: https://iosgods.com/topic/194281-chiikawa-pocket-jp-%E3%81%A1%E3%81%84%E3%81%8B%E3%82%8F%E3%81%BD%E3%81%91%E3%81%A3%E3%81%A8-v1111-jailed-cheats-3/
        • Haha
        • Like
      • 23 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