Jump to content

MSHookFunction on sub_x has odd result. Any clue/experience?


Go to solution Solved by Guest,

10 posts in this topic

Recommended Posts

Posted

Been hacking an iOS app. It's a sub_x app thats been a pain in my ass. I've reached the point where I know enough to start hooking.

 

Problem is, while hooking the function i need, via an address (accounting for ASLR), the app crashes when run.

 

So I debug the app via lldb, and something odd is happening.

 

I load the app, attach lldb, and set a breakpoint for the address which I have hooked. I press the button in app and the breakpoint halts the app.

 

The next line to be run, which SHOULD be a B or BL to branch to the new/replacement function is, intead:

.LONG   0x6B007712 (or some address/value large like that). The comment showing is that it's an invalid lvalue.

 

In addition, all subsequent lines are all wrong - it's like MSHookFunction is putting too much data into the address, which is mangling the line, and throwing all other lines off.

 

I'm used MSHookFunction many times before to hook named functions, and it works, and I'm aware of it's uses. This one is a sub_x however, and I've solved the ASLR issue and I've found the memory address for the function (as proven by the lldb breakpoint stopping at the right spot).

 

Has anyone else seen something like this? I feel like I'm missing something really simple. 

Posted (edited)

As it shows in IDA right now its from 0x33f224 through 0x33f2C6, so it's 0xA2/162 bytes long (in assembly).

 

My next trial tomorrow is going to be to lldb debug a mshookfunction that I know works and see how the function is changed, but I am ASSUMING that the first line/s is/are rewritten to a branch and return, and the old_function returned by mshookfunction is a copy of the original. Obviously setting the line to be: .LONG then some huge out of range memory address is incorrect. Driving me batty.

Updated by infernusdoleo
Posted

I've used MSHookFunction on sub_x before. More than once and it has worked well in all cases for me.

Posted

I'm having a hard time understanding your problem but did you include the +1 that you need for thumb binaries? Or maybe you got the branch hex wrong

  • Solution
Posted
  On 12/30/2015 at 4:45 PM, infernusdoleo said:

+1 for thumb binaries? As in shift the memory address up by 1 so I'm hooking an odd number?

Yeah for thumb you would need a +1 after the offset for some reason

Posted

I'm assuming that if I were hooking a function with a symbol and hooking it by name, it would know that automatically, and maybe my issue is that since I'm hooking by address it doesn't know?

 

I'm gonna give it a shot here shortly, been busy today and haven't had time to break out the hacking tools yet this morning. I'll post my results.

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

    • Heroes Crew: Strategy Defense v1.1.2 [+6 Cheats]
      Modded/Hacked App: Heroes Crew: Strategy Defense By AlohaFactory
      Bundle ID: com.overdogs.heroes
      App Store Link: https://apps.apple.com/us/app/heroes-crew-strategy-defense/id6744350078?uo=4



      🤩 Hack Features

      - Add Currency
      - Unlimited Items
      - Unlimited Property (Heroes, Relic etc)
      - Activate VVip (Use after tutorial and only in main menu)
      - Activate Premium Hunt Pass (Use after tutorial and only in main menu)
      - Unlimited Battle Currency (Always Will Increase)
        • Winner
        • Like
      • 13 replies
    • Heroes Crew: Strategy Defense v1.1.2 [+6 Jailed Cheats]
      Modded/Hacked App: Heroes Crew: Strategy Defense By AlohaFactory
      Bundle ID: com.overdogs.heroes
      App Store Link: https://apps.apple.com/us/app/heroes-crew-strategy-defense/id6744350078?uo=4



      🤩 Hack Features

      - Add Currency
      - Unlimited Items
      - Unlimited Property (Heroes, Relic etc)
      - Activate VVip (Use after tutorial and only in main menu)
      - Activate Premium Hunt Pass (Use after tutorial and only in main menu)
      - Unlimited Battle Currency (Always Will Increase)
        • Winner
        • Like
      • 13 replies
    • Survivor Code: Last Stand v1.0.7 [+3 Cheats]
      Modded/Hacked App: Survivor Code: Last Stand By TUONG PHAT ENVIROMENT AND TECHNOLOGY COMPANY LIMITED
      Bundle ID: com.survivor.hero.laststand
      App Store Link: https://apps.apple.com/us/app/survivor-code-last-stand/id6743934880?uo=4


      🤩 Hack Features

      - Never Die
      - Add Currency
      - Get No Ads
       
        • Like
      • 8 replies
    • Survivor Code: Last Stand v1.0.7 [+3 Jailed Cheats]
      Modded/Hacked App: Survivor Code: Last Stand By TUONG PHAT ENVIROMENT AND TECHNOLOGY COMPANY LIMITED
      Bundle ID: com.survivor.hero.laststand
      App Store Link: https://apps.apple.com/us/app/survivor-code-last-stand/id6743934880?uo=4


      🤩 Hack Features

      - Never Die
      - Add Currency
      - Get No Ads
        • Like
      • 6 replies
    • GEARS: War Machine v1.16 [+4 Jailed Cheats]
      Modded/Hacked App: GEARS: War Machine By MAD PIXEL GAMES LTD
      Bundle ID: gears.of.war.tanks
      App Store Link: https://apps.apple.com/us/app/gears-war-machine/id6748002805?uo=4



      🤩 Hack Features

      - Remove Ads (Not Rewarded)
      - Activate Premium Pass
      - Auto Win (Enable inside battle)
      - Freeze Items (Currency, Items)
      • 0 replies
    • GEARS: War Machine v1.16 [+4 Cheats]
      Modded/Hacked App: GEARS: War Machine By MAD PIXEL GAMES LTD
      Bundle ID: gears.of.war.tanks
      App Store Link: https://apps.apple.com/us/app/gears-war-machine/id6748002805?uo=4



      🤩 Hack Features

      - Remove Ads (Not Rewarded)
      - Activate Premium Pass
      - Auto Win (Enable inside battle)
      - Freeze Items (Currency, Items)
      • 1 reply
    • Dynasty Legends:Warriors Unite v15.6.651 - [ x Player Damage & More ]
      Modded/Hacked App: Dynasty Legends:Warriors Unite By Taihe Interactive
      Bundle ID: com.taiyouxi.jwsus
      iTunes Store Link: https://itunes.apple.com/us/app/dynasty-legends-warriors-unite/id1445990627?mt=8&uo=4&at=1010lce4


      Hack Features:
      - x Player Damage - x1 - 100
      - x Player Defense - x1 - 100
      - Instant - Win
      - Armor Instant Break
      - Dump Enemies
      - Rage Always Active
      - No Skills CoolDown
      - No MP Cost

      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/94310-dynasty-legends:warriors-unite-v73655-armor-instant-break-more/#comments


      Hack Download Link: https://iosgods.com/topic/94284-dynasty-legends%EF%BC%9Awarriors-unite-v92650-x-player-damage-more/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 504 replies
    • [Grandchase KR] 그랜드체이스 Cheats v1.92.4 +3
      Modded/Hacked App: 그랜드체이스 By KOG co., Ltd
      Bundle ID: com.kakaogames.grdchase
      iTunes Store Link: https://apps.apple.com/kr/app/%EA%B7%B8%EB%9E%9C%EB%93%9C%EC%B2%B4%EC%9D%B4%EC%8A%A4/id1312734855?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

      - Multiply Attack
      - Multiply Defense
      - Instant Skills

       

      Non-Jailbroken Hack: https://iosgods.com/topic/106254-grandchase-kr-%EA%B7%B8%EB%9E%9C%EB%93%9C%EC%B2%B4%EC%9D%B4%EC%8A%A4-v1872-weak-enemies-more/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/132809-grandchase-kr-%EA%B7%B8%EB%9E%9C%EB%93%9C%EC%B2%B4%EC%9D%B4%EC%8A%A4-cheats-v1882-3/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 145 replies
    • Dice Dreams Cheats v1.93.1 +2
      Modded/Hacked App: Dice Dreams™ By SuperPlay LTD
      Bundle ID: com.superplaystudios.dicedreams
      iTunes Store Link: https://apps.apple.com/us/app/dice-dreams/id1484468651?uo=4


      Hack Features:
      - Custom Rolls
      - Unlimited Coins - afford regardless of if you have enough


      iOS Hack Download Link: https://iosgods.com/topic/138011-dice-dreams%E2%84%A2-v1692-2-cheats/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 637 replies
    • CarX Drift Racing 2 Cheats v1.38.0 +1
      Modded/Hacked App: CarX Drift Racing 2 by KAR IKS TEKHNOLODZHIS, OOO
      Bundle ID: com.carx-tech.carxdr2
      iTunes Store Link: https://apps.apple.com/us/app/carx-drift-racing-2/id1198510863?uo=4&at=1010lce4


      Hack Features:
      - Free Store

      NOTE: You can purchase and upgrade for FREE even if you don't have enough. BUT once you exit the game will revert back to normal state, that mean for example if you purchased a new car or car slot and you exit the game, when you re-open it still not purchase. So what is the benefit from this cheat?

      1/ Get high end car and complete mission or pvp
      2/ If you purchased a new car and upgrade it max with Free Store, but you exit the game and the car will remain unpurchased. BUT once you have enough cash / money and purchase that car again, the full upgrade is still there


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/131064-arm64-carx-drift-racing-2-v1100-jailed-cheats-1/


      iOS Hack Download Link: https://iosgods.com/topic/132779-arm64-carx-drift-racing-2-cheats-all-versions-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 833 replies
    • Chef & Friends: Cooking Game Cheats v1.33.0 +1
      Modded/Hacked App: Chef & Friends: Cooking Game By MYTONA Ltd.
      Bundle ID: com.mytona.cheftales
      iTunes Store Link: https://apps.apple.com/us/app/chef-friends-cooking-game/id1586951898?uo=4


      Hack Features:
      - Infinite Currencies (Hats, Coins, Gems)

      NOTE: May bug out the game so better try on your throw away account first 


      iOS Hack Download Link: https://iosgods.com/topic/178904-chef-friends-cooking-game-cheats-v141-1/
        • Thanks
        • Winner
        • Like
      • 29 replies
    • Beach Buggy Racing 2 Cheats v2025.06.26 +2
      Modded/Hacked App: Beach Buggy Racing 2 by Vector Unit Inc
      Bundle ID: com.vectorunit.cobalt
      iTunes Store Link: https://itunes.apple.com/us/app/beach-buggy-racing-2/id1399253988?mt=8&uo=4&at=1010lce4



      Hack Features:
      - Infinite PowerUp Parts
      - Infinite Gems (Spend some/ Get some)
      - Infinite Coins (Use Gems to Convert)



      Hack Download Link: https://iosgods.com/topic/86113-arm64-beach-buggy-racing-2-cheats-v101-3/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 441 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