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

    • Bully: Anniversary Edition Cheats v1.4.1 +1 [ Dev Menu ]
      Modded/Hacked App: Bully: Anniversary Edition by Rockstar Games, Inc.
      Bundle ID: com.rockstargames.bully
      iTunes Store Link: https://apps.apple.com/us/app/bully-anniversary-edition/id1148321705?uo=4&at=1010lce4


      Hack Features:
      Jump to (will lose current progress)
      - Ability to jump to any Mission in-game. From Chapter 1 to Chapter 6.
      - Ability to jump to any Classes in-game. Art, Biology, Gym, Geography, Math, English, Chemistry, Music, Photography, Shop.
      - Ability to play any Minigames such as Arcade, Mowing House 1/2/3, Mowing Part 1/2/3, Paper Route Intro, Paper Route, Keep Ups, Penalty Shots, Bike Store & Tattoos.
      - Teleport to any location in-game. Asylum (Ouside), Blue Skies Industrial Part (Trailer Part), Bullworth Town (Outside), Carnival (Outside), New Coventry (Outside), Old Bullworth Gardens (Park), Old Bullworth Vale (Town), High Striker (Carnival Games), etc, etc. 
       
      Interrupt time-space continuum
      - Ability to Change Time.
      - Ability to Change Season. Summer, Fall, Winter, Spring.
      - Cycle Weather.
       
      Cheats
      - Toggle FPS (Display and Frames Per Second counter at the bottom of your screen).
      - Heal (Heal yourself).
      - Give Money (Give yourself unlimited money. The more you tap on this option the more money you will get).
      - Disable Crime
      - Give Bike
      - Invulnerability a.k.a God Mode / Never Die
      - Unlimited Sprint
      - Unlimited Ammo
      - Max Ammo
      - One Shot Kills
      - All Pranks
      - All Weapons
      - All Moves
      - All Grapples
      - All Clothing
      - Pass mission (Pass your current mission with success).
      - Fail mission (Fail your current mission).
       

      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/135424-bully-anniversary-edition-v11-jailed-cheats-1-debug-menu/


      iOS Hack Download Link: https://iosgods.com/topic/113583-bully-anniversary-edition-cheats-v11-1-dev-menu/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,321 replies
    • SimCity BuildIt Cheats v1.66.1 +1 [ Freeze Currencies ]
      Modded/Hacked App: SimCity BuildIt By EA Swiss Sarl
      Bundle ID: com.ea.simcitymobile.bv
      iTunes Store Link: https://apps.apple.com/us/app/simcity-buildit/id913292932?uo=4


      Hack Features:
      - Infinite Currencies


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/124792-arm64-simcity-buildit-v1412-jailed-cheats-1/


      iOS Hack Download Link: https://iosgods.com/topic/157687-simcity-buildit-cheats-v1415-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 669 replies
    • Aqua Match Cheats v0.230.1 +5
      Modded/Hacked App: Aqua Match By PLR Worldwide Sales Limited
      Bundle ID: com.playrix.aquamatch
      App Store Link: https://apps.apple.com/us/app/aqua-match/id6502511364?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

      - Freeze Moves
      - Freeze Life
      - Freeze Boosters
      - Freeze Coins
      - Freeze Gems



      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/196699-aqua-match-cheats-v02301-5/
        • Like
      • 2 replies
    • Star Wars™: Galaxy of Heroes Cheats v0.36.8 +8
      Modded/Hacked App: Star Wars™: Galaxy of Heroes By Electronic Arts
      Bundle ID: com.ea.starwarscapital.bv
      iTunes Link: https://itunes.apple.com/us/app/star-wars-galaxy-of-heroes/id921022358?mt=8&uo=4&at=1010lce4


      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
      - No Skill Cooldown time / Skill Always Available. Linked with enemy. Enable when it's your turn, disable when it's enemies turn. Timing is key.
      - One Hit Kill / Very High Damage. This is linked with you and the enemy, use with Skip Enemy Turn feature or enable disable when you attack via the In-Game Mod Menu! Do not kill the last enemy with OHK otherwise the game will crash. This feature is only for x64 or ARM64 iDevices: iPhone 5s, 6, 6 Plus, 6s, 6s Plus, 7, 7 Plus, iPod Touch 6G, iPad Air, Air 2, Pro & iPad Mini 2, 3, 4 and later.
      - Always Your Turn / Skip Enemy Turn. It's always your turn, you're always attacking.
      - Auto Win. You must use this with One Hit Kill in order for it to work. Kill 1 Enemy and you will auto win the battle.
      - Only 1 Encounter on All Missions.
      -- God Mode / Never Die thanks to the features above.

      This hack is now an In-Game Mod Menu. This means you can toggle switches on/off while in a fight. Since God Mode is linked, turn it off when you're attacking and turn it on when the enemy is attacking to do damage but not receive damage. Same goes for the other features.
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 3,130 replies
    • Homematch - Home Design Games v2.17.2 +2 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Homematch - Home Design Games By TAPBLAZE, LLC
      Bundle ID: com.tapblaze.homecraft
      iTunes Store Link: https://apps.apple.com/us/app/homematch-home-design-games/id1438898374?uo=4


      Hack Features:
      - Unlimited Coins
      - Unlimited Gems


      Jailbreak required hack(s): [Mod Menu Hack] Homematch - Home Design Games v1.92.3 +2 Cheats [ Unlimited Currencies ] - 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
      • 13 replies
    • Homematch - Home Design Games v2.17.2 +2 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Homematch - Home Design Games By TAPBLAZE, LLC
      Bundle ID: com.tapblaze.homecraft
      iTunes Store Link: https://apps.apple.com/us/app/homematch-home-design-games/id1438898374?uo=4


      Hack Features:
      - Unlimited Coins
      - Unlimited Gems


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Homematch - Home Design Games v1.92.3 +2 Jailed Cheats [ Unlimited Currencies ] - 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/
      • 7 replies
    • Hero's Adventure v1.2.117 +6 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Hero's Adventure By X.D. Network Inc.
      Bundle ID: com.xd.dxlzz.global
      iTunes Store Link: https://apps.apple.com/us/app/heros-adventure/id6711347049?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - Give All Items -> Head into Settings > Other and toggle the User Agreement button.
      - Unlock All Achievements -> Head into Settings > Other and toggle the Privacy Policy button.
      -- All DLC Purchased
      -- Guest Login Enabled
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 140 replies
    • Hero's Adventure v1.2.117 +6 Cheats [ Damage & Defence ]
      Modded/Hacked App: Hero's Adventure By X.D. Network Inc.
      Bundle ID: com.xd.dxlzz.global
      iTunes Store Link: https://apps.apple.com/us/app/heros-adventure/id6711347049?uo=4

       
       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - Give All Items -> Head into Settings > Other and toggle the User Agreement button.
      - Unlock All Achievements -> Head into Settings > Other and toggle the Privacy Policy button.
      -- All DLC Purchased
      -- Guest Login Enabled
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 31 replies
    • Pal Go: Tower Defense TD v0.3.86 [+7 Cheats]
      Modded/Hacked App: Pal Go: Tower Defense TD By Playwind Ltd
      Bundle ID: com.playwindgames.freedefender
      iTunes Store Link: https://apps.apple.com/us/app/pal-go-tower-defense-td/id6479316663?uo=4


       

      🚀 Hack Features

      - [VIP] Freeze Currency (Currency will not decrease when used)

      - [VIP] Currency Always Enough (Buy even when you don't have enough currency)

      - [Free] Higher Recruit Energy (Gives 500 Recruit Energy Every Wave)

      - [Free] Always Can Drag Hero

      - [Free] Skip Ads

      - [Free] No Attack Cooldown

      - [Free] Global Speed Multiplier (Enable Inside Battle)

       

      Warning


      Do not use on main account. There is a chance of ban. Not responsible for any bans.

       


      🍏 For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/forum/79-no-jailbreak-section/
      🤖 Modded Android APK(s): https://iosgods.com/forum/68-android-section/
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 54 replies
    • Pal Go: Tower Defense TD v0.3.86 [+7 Jailed Cheats]
      Modded/Hacked App: Pal Go: Tower Defense TD By Playwind Ltd
      Bundle ID: com.playwindgames.freedefender
      iTunes Store Link: https://apps.apple.com/us/app/pal-go-tower-defense-td/id6479316663?uo=4


       

      Hack Features

      - [VIP] Freeze Currency (Currency will not decrease when used)

      - [VIP] Currency Always Enough (Buy even when you don't have enough currency)

      - [Free] Higher Recruit Energy (Gives 500 Recruit Energy Every Wave)

      - [Free] Always Can Drag Hero

      - [Free] Skip Ads

      - [Free] No Attack Cooldown

      - [Free] Global Speed Multiplier (Enable Inside Battle)

       

      Warning


      Do not use on main account. There is a chance of ban. Not responsible for any bans.

       

      Jailbreak required iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      Modded Android APKs: https://iosgods.com/forum/68-android-section/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 79 replies
    • Exfil: Loot & Extract v6.1.1 Debug Menu [+10 Cheats]
      Modded/Hacked App: Exfil: Loot & Extract By Kwalee Ltd
      Bundle ID: com.eightsec.roguehero
      iTunes Store Link: https://apps.apple.com/us/app/exfil-loot-extract/id6448720577?uo=4


       

      🤩 Hack Features

      - Debug Menu (Enable and debug menu will appear)
       
        • Agree
        • Thanks
        • Winner
        • Like
      • 18 replies
    • Exfil: Loot & Extract v6.1.1 Debug Menu [+10 Jailed Cheats]
      Modded/Hacked App: Exfil: Loot & Extract By Kwalee Ltd
      Bundle ID: com.eightsec.roguehero
      iTunes Store Link: https://apps.apple.com/us/app/exfil-loot-extract/id6448720577?uo=4

       

      🤩 Hack Features

      - Debug Menu (Enable and debug menu will appear)
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 18 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