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

    • Archer Hunter: Roguelike Game v0.29.458 [ +4 Jailed ] Currency Max
      Modded/Hacked App: Archer Hunter: Roguelike Game By Suga Pte. Ltd.
      Bundle ID: co.imba.archero
      iTunes Store Link: https://apps.apple.com/us/app/archer-hunter-roguelike-game/id1543119725?uo=4


      🤩 Hack Features

      - Gems [ Revive To Get Disable After Hack ]
      - Coins [ Weapon Up To Get Disable After Hack ]
      - HP [ Check Status ]
      - ATK [ Check Status ]


      🍏 Jailbreak iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      🤖 Modded Android APKs: https://iosgods.com/forum/68-android-section/
      • 20 replies
    • Archer Hunter: Roguelike Game v0.29.458 [ +4 Cheats ] Currency Max
      Modded/Hacked App: Archer Hunter: Roguelike Game By Suga Pte. Ltd.
      Bundle ID: co.imba.archero
      iTunes Store Link: https://apps.apple.com/us/app/archer-hunter-roguelike-game/id1543119725?uo=4



      🤩 Hack Features

      - Gems [ Revive To Get Disable After Hack ]
      - Coins [ Weapon Up To Get Disable After Hack ]
      - HP [ Check Status ]
      - ATK [ Check Status ] 


      🍏 For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/forum/79-no-jailbreak-section/
      🤖 Modded Android APKs: https://iosgods.com/forum/68-android-section/

       

      ⬇️ iOS Hack Download Link


      Hidden Content

      Download Hack
      • 16 replies
    • Tales of Brave doomsday battle v2.1.18 [ +9 Jailed ] ADS NO
      Modded/Hacked App: Tales of Brave doomsday battle By Hakan Aksar
      Bundle ID: com.tianyou.tob
      iTunes Store Link: https://apps.apple.com/us/app/tales-of-brave-doomsday-battle/id6587553322?uo=4
       

      🤩 Hack Features

      - ADS NO [ Rewards Free ]

      - Never Die

      - ONE HiT KiLL

      - Enemy Movement Speed

      - ATK Speed

      - Bullet Max 20

      - Bullet Size Big

      - Enemy Freeze

      - Wall No Hit Enemy


      ⬇️ iOS Hack Download IPA Link


      Hidden Content

      Download via the iOSGods App
      • 17 replies
    • Tales of Brave doomsday battle v2.1.18 [ +9 Cheats ] ADS NO
      Modded/Hacked App: Tales of Brave doomsday battle By Hakan Aksar
      Bundle ID: com.tianyou.tob
      iTunes Store Link: https://apps.apple.com/us/app/tales-of-brave-doomsday-battle/id6587553322?uo=4
       

      🤩 Hack Features

      - ADS NO [ Rewards Free ]

      - Never Die

      - ONE HiT KiLL

      - Enemy Movement Speed

      - ATK Speed

      - Bullet Max 20

      - Bullet Size Big

      - Enemy Freeze

      - Wall No Hit Enemy

       

      ⬇️ iOS Hack Download Link


      Hidden Content

      Download Hack
      • 12 replies
    • Dragon Wings: RPG Shoot em up v1.3.0 [ +5 Cheats ] Currency Max
      Modded/Hacked App: Dragon Wings: RPG Shoot 'em up By Spirit Bomb Company Limited
      Bundle ID: rpg.arcade.space.shooter.dragon.wings
      App Store Link: https://apps.apple.com/us/app/dragon-wings-rpg-shoot-em-up/id6741735947?uo=4

       

      🤩 Hack Features

      - Super Card Active

      - Gems

      - Gold

      - Never Die

      - ATK 
      • 6 replies
    • Dragon Wings: RPG Shoot em up v1.3.0 [ +5 Jailed ] Currency Max
      Modded/Hacked App: Dragon Wings: RPG Shoot 'em up By Spirit Bomb Company Limited
      Bundle ID: rpg.arcade.space.shooter.dragon.wings
      App Store Link: https://apps.apple.com/us/app/dragon-wings-rpg-shoot-em-up/id6741735947?uo=4
       

      🤩 Hack Features

      - Super Card Active

      - Gems

      - Gold

      - Never Die

      - ATK 
      • 4 replies
    • Cat & Farm: Cute Cat game v0.8.0 [ +1 Cheats ] Currency Max
      Modded/Hacked App: Cat & Farm: Cute Cat game By CSCMOBI VIET NAM TECHNOLOGY JOINT STOCK COMPANY
      Bundle ID: com.cscmobi.catfarm
      App Store Link: https://apps.apple.com/us/app/cat-farm-cute-cat-game/id6723863960?uo=4

        

      🤩 Hack Features

      - Currency Max [ Use Only Currency Disable After Hack ] Because Linked With Exp & Resources


      • 2 replies
    • Cat & Farm: Cute Cat game v0.8.0 [ +1 Jailed ] Currency Max
      Modded/Hacked App: Cat & Farm: Cute Cat game By CSCMOBI VIET NAM TECHNOLOGY JOINT STOCK COMPANY
      Bundle ID: com.cscmobi.catfarm
      App Store Link: https://apps.apple.com/us/app/cat-farm-cute-cat-game/id6723863960?uo=4

       
      🤩 Hack Features

      - Currency Max [ Use Only Currency Disable After Hack ] Because Linked With Exp & Resources


      • 3 replies
    • Capy Gears v1.00.006 [ +7 Cheats ] Battle Coin
      Modded/Hacked App: Capy Gears By HARVEST STAR INTERACTIVE LIMITED
      Bundle ID: com.qxgame.gear
      App Store Link: https://apps.apple.com/us/app/capy-gears/id6744058532?uo=4
       

      🤩 Hack Features

      - Battle Coin

      - Enemy ATK No

      - Enemy Delay [ Sometime Issue ]

      - Base HP

      - Moving Speed

      - Capy Hero ATK

      - Capy Hero HP
      • 2 replies
    • Capy Gears v1.00.006 [ +7 Jailed ] Battle Coin
      Modded/Hacked App: Capy Gears By HARVEST STAR INTERACTIVE LIMITED
      Bundle ID: com.qxgame.gear
      App Store Link: https://apps.apple.com/us/app/capy-gears/id6744058532?uo=4
       

      🤩 Hack Features

      - Battle Coin

      - Enemy ATK No

      - Enemy Delay [ Sometime Issue ]

      - Base HP

      - Moving Speed

      - Capy Hero ATK

      - Capy Hero HP
      • 1 reply
    • Heroes vs. Hordes: Survivor v3.8.0 [ +11 Cheats ] Currency Max
      Modded/Hacked App: Heroes vs. Hordes: Survivor By Swift Games GmbH
      Bundle ID: com.swiftgames.roguelikesurvival
      iTunes Store Link: https://apps.apple.com/us/app/heroes-vs-hordes-survivor/id1608898173?uo=4

       
      Hack Features

      - Currency

      - Resource

      - Gold Unlimited [ Bonus Wave ]

      - Ch Unlocked [ Play All Off ]

      - Always Last Wave

      - Talents Cost 0

      - Hero DMG Only

      - HP & DMG [ Just Equip & Unequip ]

      - Enemy Freeze

      - Enemy ATK NO

       
      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/
      • 58 replies
    • Heroes vs. Hordes: Survivor v3.8.0 [ +11 Jailed ] Currency Max
      Modded/Hacked App: Heroes vs. Hordes: Survivor By Swift Games GmbH
      Bundle ID: com.swiftgames.roguelikesurvival
      iTunes Store Link: https://apps.apple.com/us/app/heroes-vs-hordes-survivor/id1608898173?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

      - Currency

      - Resource

      - Gold Unlimited [ Bonus Wave ]

      - Ch Unlocked [ Play All Off ]

      - Always Last Wave

      - Talents Cost 0

      - Hero DMG Only

      - HP & DMG [ Just Equip & Unequip ]

      - Enemy Freeze

      - Enemy ATK NO


      Jailbreak required iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      Modded Android APKs: https://iosgods.com/forum/68-android-section/

       

      iOS Hack Download IPA Link


      Hidden Content

      Download via the iOSGods App
      • 71 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