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

+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

    • Loot Heroes v1.6.9 +10 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Loot Heroes: Fantasy RPG Games By BoomBit, Inc.
      Bundle ID: com.bbp.lootheroes
      iTunes Store Link: https://apps.apple.com/us/app/loot-heroes-fantasy-rpg-games/id6642699678?uo=4


      Hack Features:
      - Freeze Currencies
      - God Mode -> Traps still cause damage.
      - One-Hit Kill
      - All Heroes Unlocked
      - All Skins Unlocked
      - No Skill Cooldown
      - No Ads

      VIP
      - Unlimited Currencies -> Earn some.
      - Auto Win
      - Battle Pass Unlocked
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 114 replies
    • Loot Heroes v1.6.9 +10 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Loot Heroes By BoomBit, Inc.
      Bundle ID: com.bbp.lootheroes
      iTunes Store Link: https://apps.apple.com/us/app/loot-heroes/id6642699678?uo=4


      Hack Features:
      - Freeze Currencies
      - God Mode -> Traps still cause damage.
      - One-Hit Kill
      - All Heroes Unlocked
      - All Skins Unlocked
      - No Skill Cooldown
      - No Ads

      VIP
      - Unlimited Currencies -> Earn some.
      - Auto Win
      - Battle Pass Unlocked
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 256 replies
    • Nightfall: Kingdom Frontier TD v1.0.404 +8 Jailed Cheats [ Currencies ]
      Modded/Hacked App: Nightfall: Kingdom Frontier TD By Fansipan Limited
      Bundle ID: com.fansipan.nightfall.tower.simulation.strategy.td.game
      iTunes Store Link: https://apps.apple.com/us/app/nightfall-kingdom-frontier-td/id6621272416?uo=4


      Hack Features:
      - God Mode
      - Unlimited In-Game Coins -> Will increase instead of decrease.
      - Unlimited Currencies -> Will increase instead of decrease.
      - No Ads
      - Add 1K Currency -> Head over to Settings and toggle the Discord button. [ VIP ]
      - Unlock All Features -> Head over to Settings and toggle the Discord button. [ VIP ]
      - Unlock All / Everything ->  Head over to Settings and toggle the Discord button. [ VIP ]
      - Complete Tutorial -> Head over to Settings and toggle the Discord button. [ VIP ]


      Jailbreak required hack(s): [Mod Menu Hack] Nightfall: Kingdom Frontier TD v1.0.41 +8 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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 95 replies
    • Dawn of Ages: Medieval Games v2.0.5 +5 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Dawn of Ages: total war battle By BoomBit, Inc.
      Bundle ID: com.stratospheregames.dawnofages
      App Store Link: https://apps.apple.com/us/app/dawn-of-ages-total-war-battle/id6477473268?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Dumb Enemy
      - Premium Enabled
        • Agree
        • Like
      • 54 replies
    • Dawn of Ages: Medieval Games v2.0.5 +5 Cheats [ Damage & Defence ]
      Modded/Hacked App: Dawn of Ages: total war battle By BoomBit, Inc.
      Bundle ID: com.stratospheregames.dawnofages
      App Store Link: https://apps.apple.com/us/app/dawn-of-ages-total-war-battle/id6477473268?uo=4

       
       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Dumb Enemy
      - Premium Enabled
        • Thanks
        • Winner
        • Like
      • 32 replies
    • Goblins Wood: Tycoon Idle Sim v2.49.1 +1++ Jailed Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Goblins Wood: Tycoon Idle Sim By ProGamesLab LTD
      Bundle ID: idle.goblins.wood.tycoon
      iTunes Store Link: https://apps.apple.com/us/app/goblins-wood-tycoon-idle-sim/id6446766326?uo=4


      Hack Features:
      - Unlimited Currencies -> Will increase instead of decrease.


      Jailbreak required hack(s): [Mod Menu Hack] Goblins Wood: Tycoon Idle Sim v2.42.0 +1++ Cheat [ 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/
        • Agree
        • Thanks
        • Winner
        • Like
      • 26 replies
    • Goblins Wood: Tycoon Idle Sim v2.49.1 +1++ Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Goblins Wood: Tycoon Idle Sim By ProGamesLab LTD
      Bundle ID: idle.goblins.wood.tycoon
      iTunes Store Link: https://apps.apple.com/us/app/goblins-wood-tycoon-idle-sim/id6446766326?uo=4


      Hack Features:
      - Unlimited Currencies -> Will increase instead of decrease.


      Non-Jailbroken & No Jailbreak required hack(s): [IPA Mod Menu] Goblins Wood: Tycoon Idle Sim v2.42.0 +1++ Jailed Cheat [ 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/
        • Agree
        • Winner
        • Like
      • 33 replies
    • Nightfall: Kingdom Frontier TD v1.0.404 +8 Cheats [ Currencies ]
      Modded/Hacked App: Nightfall: Kingdom Frontier TD By Fansipan Limited
      Bundle ID: com.fansipan.nightfall.tower.simulation.strategy.td.game
      iTunes Store Link: https://apps.apple.com/us/app/nightfall-kingdom-frontier-td/id6621272416?uo=4


      Hack Features:
      - God Mode
      - Unlimited In-Game Coins -> Will increase instead of decrease.
      - Unlimited Currencies -> Will increase instead of decrease.
      - No Ads
      - Add 1K Currency -> Head over to Settings and toggle the Discord button. [ VIP ]
      - Unlock All Features -> Head over to Settings and toggle the Discord button. [ VIP ]
      - Unlock All / Everything ->  Head over to Settings and toggle the Discord button. [ VIP ]
      - Complete Tutorial -> Head over to Settings and toggle the Discord button. [ VIP ]


      Non-Jailbroken & No Jailbreak required hack(s): [IPA Mod Menu] Nightfall: Kingdom Frontier TD v1.0.41 +8 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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 106 replies
    • Hitman: Blood Money — Reprisal v1.3 +5++ Jailed Cheats [ Cheats Menu ]
      Modded/Hacked App: Hitman: Blood Money — Reprisal By Feral Interactive Ltd
      Bundle ID: com.feralinteractive.hitmanbloodmoney-ios
      App Store Link: https://apps.apple.com/us/app/hitman-blood-money-reprisal/id1631331207?uo=4

       


      🤩 Hack Features

      - Freeze Ammo
      - Freeze Reserve Ammo
      - Insane Fire Rate
      - Unlimited Cash -> Earn or spend some.
      - Cheats Menu -> Pause in-game and scroll to the bottom. See picture below for more!

      Full Game unlock isn't possible. I've tried, trust me. Either pay or not, it's up to you.
        • Like
      • 0 replies
    • Hitman: Blood Money — Reprisal v1.3 +5++ Cheats [ Cheats Menu ]
      Modded/Hacked App: Hitman: Blood Money — Reprisal By Feral Interactive Ltd
      Bundle ID: com.feralinteractive.hitmanbloodmoney-ios
      App Store Link: https://apps.apple.com/us/app/hitman-blood-money-reprisal/id1631331207?uo=4

       
       

      🤩 Hack Features

      - Freeze Ammo
      - Freeze Reserve Ammo
      - Insane Fire Rate
      - Unlimited Cash -> Earn or spend some.
      - Cheats Menu -> Pause in-game and scroll to the bottom. See picture below for more!

      Full Game unlock isn't possible. I've tried, trust me. Either pay or not, it's up to you.
        • Like
      • 0 replies
    • Final Outpost v2.3.18 [+3 Jailed Cheats]
      Modded/Hacked App: Final Outpost By Exabyte Games Ltd
      Bundle ID: com.samclothier.DEADfense
      iTunes Store Link: https://apps.apple.com/us/app/final-outpost/id1425444801?uo=4



      🤩 Hack Features

      -  Always Enough Resources
      -  Always Attain Skill
      -  No Food Consume
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 18 replies
    • Final Outpost v2.3.18 [+3 Cheats]
      Modded/Hacked App: Final Outpost By Exabyte Games Ltd
      Bundle ID: com.samclothier.DEADfense
      iTunes Store Link: https://apps.apple.com/us/app/final-outpost/id1425444801?uo=4

       

      🤩 Hack Features

      -  Always Enough Resources
      -  Always Attain Skill
      -  No Food Consume
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 14 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