Jump to content

[TUTORIAL] How To Hack Using Mobile Substrate (Method Hooking)


EvillyG00d

179 posts in this topic

Recommended Posts

✻ Requirements
✔ Mobile Substrate
✔ Mobile Terminal
✔ BigBoss Recommended Tools
✔ Theos
✔ iOS SDK

✻ Setup Variants
From my experience, setting up theos is a *****. My 3 iDevices all have different theos/SDK variants because while something may work on one device, it may not work on another. In the future I may write a theos/SDK error list with solutions, but right now I really don’t have the expertise to talk about that, especially considering I have a broken theos now that I can’t seem to fix. :p If you are having similar issues, I recommend following this guide: https://iosgods.com/topic/62343-new-2021-ios-1213-how-to-install-theos-sdk-on-your-idevice/

 

✻ Setting Up a Project
Launch Mobile Terminal and sign in as root. Then type this command:

$THEOS/bin.nic.pl
/* If that results in error, type /var/theos/bin/nic.pl */

This command starts up the New Instance Creator (nic). Next, choose iphone/tweak by typing the number associated with it. Lastly, name your project (herein myhack), bundle ID, and author. The last too are only important if you plan on publishing your tweak to Cydia. If you’re not, feel free to leave them blank.

Note this puts myhack in /var/mobile. If you want it in a different directory, cd it before starting up nic.

In /myhack, there are 3 files of interest. The Makefile, myhack.plist, and Tweak.xm. The Makefile is where you would add frameworks or instructions for the installation process. myhack.plist contains a list of app bundle IDs the hack will target. To fetch a bundle ID, go into /Library/Preferences of your app and copy the com.companyName.appName.plist (exclude the .plist extension). That is the bundle ID. If you’re app doesn’t have that file in /Preferences, go to /appName.app and open up Info.plist. The bundle ID will be in <string>Bundle Identifier</string>. If you want the hack to work on all apps, delete the myhack.plist.

 

✻ Tweak.xm
This is where the code is written. The file already has an example written for you. Since it is commented out, feel free to keep it there for reference - it will not affect your code.

The way MS hook hacks are made is by calling both a header and a method, and altering them. I recommend using Flex to find headers and methods. It’s by far the most convenient program to use, considering you can search all headers at once and you don’t need to crack the app. If you prefer a command-line program, use class dump. If you notice a lack of unique headers/methods, the app is sub_X. MS hooking will not work with this app and you’ll either need to use symbol hooking or code injection.

Here are some examples on how to return each method type:

int, double, and long long

-(int)coins {
return 999999;
}
/* doubles and long longs are returned the same way, just replace (int) with (double) or (long long).
The return value must be an integer - no decimals */

float

-(float)coins {
return 999.9f;
}

bool

-(bool)hasCoins {
return TRUE;
}
/* must be true/false value. Can also be written as yes/no */

id

-(id)coins {
return [NSNumber numberWithInteger:999999];
}
/* id’s can be anything - a number, bool, string, etc. You have to call the correct NSClass to hack it correctly.
These are very rare - I myself have never had to hack one */

void

-(void)showCoins {
}
/* This is a nulled method. Standalone-voids cannot be returned */

void with argument

-(void)setCoins:(int)argument {
argument = 999999;
}
-(void)setHasCoins:(bool)argument {
argument = TRUE;
}
-(void)setCoins:(id)argument {
argument = [NSNumber numberWithInteger:999999];
}
/* “argument” can be named anything. This is similar to returning non-void counterparts,
except you name the argument and remove “return” */

 

✻ Adding UI Popup
This is really handy against leechers. Adding a popup is relatively simple, and requires changes to both the Makefile and Tweak.xm. First, use Flex (or class dump) to find method -(void)applicationDidBecomeActive:(id). It's usually in a header file called AppDelegate. Now add this to your Tweak.xm (remember to edit the header accordingly):

 

%hook AppDelegate
-(void)applicationDidBecomeActive:(id)argument {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"This is the Title" message:@"This is the Message" delegate:nil cancelButtonTitle:@"This is the Button Text" otherButtonTitles:nil];
[alert show];
[alert release];
}
%end
/* Sometimes attaching the popup to this method results in a crash.
You can attach the popup to any void you want,
but attaching it to the launch method is the most convenient for both you and the user */

If you were to compile myhack now, the compiler would not understand what UIAlertView is and would return an error. To fix this, import the UIKit framework in your Makefile. Add this line below the myhack_FILES line:

myhack_FRAMEWORKS = UIKit

You can now compile. :)

 

✻ Compiling
In MobileTerminal, cd to your project folder. Then, type any of these commands:

make
/* Makes the .dylib */
make package
/* Makes a .deb for easy install */
make package install
/* Makes a .deb and installs it for you */

The .dylib will appear in /myhack/obj. The .deb will appear in /myhack and install to /Library/MobileSubstrate/DynamicLibraries.
 
Extra info by @castix (post😞

So because this tutorials is already awesome (big shoutout to evilg00d there) I will just add some notes
 
As he already mentioned in the main topic here, you can't override void but you can NULL them = disable them

- (void)enemiesShoots {    //This is the method that calls your opponents to shoot so if we disable this, they can't anymore
}

if you want to add this in a patcher, you can simply write it like this

- (void)enemyShoots {                              //Easy isn't it ?
   if(GetPrefBool(@"kEnemyShooting")) {
   return; 
   }
   return %orig;
   }

Moving on there are some more value classes, which can be modified

- (long long)Coins {    //This can obviously be treated like int
return 2222;
}
- (double)Coins {     //You can also see here that it can be overwritten really easy
return 2222;
}

Those are just a few more function methods , so if you find something like them in FLEX/Headers/Binaries you know what do do.

 

Step-by-step tutorial on how to make a Preference Bundle (Patcher with on/off settings) here: http://iosgods.com/topic/444-tutorial-how-to-make-a-preference-bundle/

  • Like 13
  • Thanks 2
  • Informative 3
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below. For more information, please read our Posting Guidelines.
Reply to this topic... Posting Guidelines

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Our picks

    • キン肉マン 極・タッグ乱舞 Kinnikuman Extreme v1.0.7 +2 Cheats
      Modded/Hacked App: キン肉マン 極・タッグ乱舞 By COPRO Co., Ltd.
      Bundle ID: jp.kcopro.kin001
      iTunes Store Link: https://apps.apple.com/jp/app/%E3%82%AD%E3%83%B3%E8%82%89%E3%83%9E%E3%83%B3-%E6%A5%B5-%E3%82%BF%E3%83%83%E3%82%B0%E4%B9%B1%E8%88%9E/id1623345808?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - Damage Multiplier
      - Defense Multiplier


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/


      iOS Hack Download Link:

      Hidden Content

      Download Hack








      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above. Use Safari/Google Chrome or other iOS browsers to download.
      STEP 2: Once the file has downloaded, tap on it and then you will be prompted on whether you want to open the deb with iGameGod or copy it to Filza.
      STEP 3: If necessary, tap on the downloaded file, and then, you will need to press 'Install' from the options on your screen.
      STEP 4: Let iGameGod/Filza finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 5: If the hack is a Mod Menu — which is usually the case nowadays — the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 6: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, please post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
      • 1 reply
    • Goddess Of Victory : Nikke Taiwan - 勝利女神:妮姬 v122.8(20) +2 Cheats
      Modded/Hacked App: 勝利女神:妮姬 By Gamamobi HK Co., Limited
      Bundle ID: com.gamamobi.nikke
      iTunes Store Link: https://apps.apple.com/tw/app/%E5%8B%9D%E5%88%A9%E5%A5%B3%E7%A5%9E-%E5%A6%AE%E5%A7%AC/id1630883882?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - Unlimited Ammo
      - Jailbreak Detection Removed


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/


      iOS Hack Download Link:

      Hidden Content
      Download Hack







      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above. Use Safari/Google Chrome or other iOS browsers to download.
      STEP 2: Once the file has downloaded, tap on it and then you will be prompted on whether you want to open the deb with iGameGod or copy it to Filza.
      STEP 3: If necessary, tap on the downloaded file, and then, you will need to press 'Install' from the options on your screen.
      STEP 4: Let iGameGod/Filza finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 5: If the hack is a Mod Menu — which is usually the case nowadays — the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 6: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, please post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 152 replies
    • My Heroes Dungeon China - 我的勇者 v2.20.8 +3 Cheats
      Modded/Hacked App: 我的勇者 By Shenzhen Moli Shuyu Network Technology Co., Ltd.
      Bundle ID: com.rsg.MyheroApp
      iTunes Store Link: https://apps.apple.com/cn/app/%E6%88%91%E7%9A%84%E5%8B%87%E8%80%85/id1458703401?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing / or any other file managers for iOS.
      - Cydia Substrate, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - x dmg
      - x def


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/


      iOS Hack Download Link:

      Hidden Content
      Download Hack







      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above. Use Safari/Google Chrome or other iOS browsers to download.
      STEP 2: Once the file has downloaded, tap on it and then you will be prompted on whether you want to open the deb with iGameGod or copy it to Filza.
      STEP 3: If necessary, tap on the downloaded file, and then, you will need to press 'Install' from the options on your screen.
      STEP 4: Let iGameGod/Filza finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 5: If the hack is a Mod Menu — which is usually the case nowadays — the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 6: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, please post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 297 replies
    • Raising Poseidon Cheats v1.2.94 +1
      Modded/Hacked App: 포세이돈키우기 By kim myungjun
      Bundle ID: com.mouseduck.seawar
      iTunes Store Link: https://apps.apple.com/kr/app/%ED%8F%AC%EC%84%B8%EC%9D%B4%EB%8F%88%ED%82%A4%EC%9A%B0%EA%B8%B0/id1614789798?uo=4


      Hack Features:
      - Infinite Currencies


      iOS Hack Download Link: https://iosgods.com/topic/169377-raising-poseidon-%ED%8F%AC%EC%84%B8%EC%9D%B4%EB%8F%88%ED%82%A4%EC%9A%B0%EA%B8%B0-cheats-v1200-1/
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 131 replies
    • Demon Hunter Idle Cheats v1.0.4 +3
      Modded/Hacked App: Demon Hunter Idle By MOBIRIX
      Bundle ID: com.mobirix.mbpdh
      iTunes Store Link: https://apps.apple.com/us/app/demon-hunter-idle/id6472879858?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - Freeze Currencies*

      *NOTE: Do not abuse or buy ViP for just this cheat


      iOS Hack Download Link: https://iosgods.com/topic/183710-demon-hunter-idle-cheats-v102-3/
        • Winner
      • 36 replies
    • [ ReDive TW ] 超異域公主連結!Re:Dive Cheats v4.6.0 +3
      Modded/Hacked App: 超異域公主連結!Re:Dive by So-net Entertainment Taiwan Limited
      Bundle ID: tw.sonet.princessconnect
      iTunes Store Link: https://apps.apple.com/tw/app/%E8%B6%85%E7%95%B0%E5%9F%9F%E5%85%AC%E4%B8%BB%E9%80%A3%E7%B5%90-re-dive/id1390473317?uo=4&at=1010lce4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - Instant Skill


      iOS Hack Download Link: https://iosgods.com/topic/134431-%E8%B6%85%E7%95%B0%E5%9F%9F%E5%85%AC%E4%B8%BB%E9%80%A3%E7%B5%90%EF%BC%81redive-cheats-v220-3/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 241 replies
    • Otherworld Three Kingdoms Cheats v1.0.4 +3
      Modded/Hacked App: Otherworld Three Kingdoms By SuperPlanet corp.
      Bundle ID: com.superplanet.samworld
      iTunes Store Link: https://apps.apple.com/us/app/otherworld-three-kingdoms/id6496345383?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - Instant Skills


      iOS Hack Download Link: https://iosgods.com/topic/183743-otherworld-three-kingdoms-cheats-v103-3/
        • Thanks
        • Winner
        • Like
      • 30 replies
    • Monster Legends: Collect all Cheats v17.2.5 +8
      Modded/Hacked App: Monster Legends: Breeding RPG By Socialpoint
      Bundle ID: es.socialpoint.MonsterCity
      iTunes Store Link: https://apps.apple.com/us/app/monster-legends-breeding-rpg/id653508448?uo=4


      Hack Features:
      - 1 Hit Kill
      - Skip Enemy Turn
      - Insane Score (Always 3 Stars)
      - No Skill Cost
      - Auto Win


      iOS Hack Download Link: https://iosgods.com/topic/176914-monster-legends-collect-all-v1632-5-cheats/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 175 replies
    • GODDESS OF VICTORY: NIKKE v122.8(20) +5 Cheats
      Modded/Hacked App: GODDESS OF VICTORY: NIKKE By PROXIMA BETA PTE.LIMITED
      Bundle ID: com.proximabeta.nikke
      iTunes Store Link: https://apps.apple.com/us/app/goddess-of-victory-nikke/id1585915174?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - God Mode
      - Unlimited Ammo
      - JB Check Removed


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/


      iOS Hack Download Link:

      Hidden Content
      Download Hack







      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above. Use Safari/Google Chrome or other iOS browsers to download.
      STEP 2: Once the file has downloaded, tap on it and then you will be prompted on whether you want to open the deb with iGameGod or copy it to Filza.
      STEP 3: If necessary, tap on the downloaded file, and then, you will need to press 'Install' from the options on your screen.
      STEP 4: Let iGameGod/Filza finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 5: If the hack is a Mod Menu — which is usually the case nowadays — the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 6: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, please post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 303 replies
    • Demigod Idle: Rise of a legend v3.3.6 +7 Cheats
      Modded/Hacked App: Demigod Idle: Rise of a legend By SuperPlanet corp.
      Bundle ID: com.superplanet.demigod
      iTunes Store Link: https://apps.apple.com/us/app/demigod-idle-rise-of-a-legend/id6449823385?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - Damage Multiplier
      - Defense Multiplier
      - Unlimited Mana
      - Jailbreak Detection Removed


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/


      iOS Hack Download Link:

      Hidden Content
      Download Hack







      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above. Use Safari/Google Chrome or other iOS browsers to download.
      STEP 2: Once the file has downloaded, tap on it and then you will be prompted on whether you want to open the deb with iGameGod or copy it to Filza.
      STEP 3: If necessary, tap on the downloaded file, and then, you will need to press 'Install' from the options on your screen.
      STEP 4: Let iGameGod/Filza finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 5: If the hack is a Mod Menu — which is usually the case nowadays — the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 6: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, please post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 272 replies
    • Monster Hunter Puzzles v2.01.02 +5 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Monster Hunter Puzzles By CAPCOM Co., Ltd
      Bundle ID: jp.co.capcom.mhpuzzle
      iTunes Store Link: https://apps.apple.com/us/app/monster-hunter-puzzles/id1591864714?uo=4


      Hack Features:
      - Unlimited Acorns -> Earn or spend some.
      - Unlimited Gems -> Earn or spend some.
      - Unlimited Tickets -> Earn or spend some.
      - Unlimited Lives -> Will not decrease.
      - Unlimited Boosters -> Will not decrease.


      Jailbreak required hack(s): [Mod Menu Hack] Monster Hunter Puzzles v2.01.02 +7 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/
      • 4 replies
    • Monster Hunter Puzzles v2.01.02 +7 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Monster Hunter Puzzles By CAPCOM Co., Ltd
      Bundle ID: jp.co.capcom.mhpuzzle
      iTunes Store Link: https://apps.apple.com/us/app/monster-hunter-puzzles/id1591864714?uo=4


      Hack Features:
      - Unlimited Acorns -> Earn or spend some.
      - Unlimited Gems -> Earn or spend some.
      - Unlimited Tickets -> Earn or spend some.
      - Unlimited Lives -> Will not decrease.
      - Unlimited Boosters -> Will not decrease.
      - Unlimited Moves -> Will not decrease.
      - Auto Win


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Monster Hunter Puzzles v2.01.02 +5 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/
        • Like
      • 2 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