Jump to content

[iOS 12 UPDATED!!] [NIC TEMPLATE] Mod Menu Theos Template! Easily Create Your Own iGMMs!


1,155 posts in this topic

Recommended Posts

Posted
//**************************************************//
//**This Header File is used in combination********//
//**with a dynamic Library and must be rewritten**//
//**if you want to use it for another purpose****//
//**********************************************//

//******************************************//
//**Credits: HackJack & Razzile(Kamizoom)**//
//****************************************//

//********************************************//
//**Usage: writeData(0xOFFSET, 0xDATA)*******//
//******************************************//

//importing and including files

#include <substrate.h>
#include <mach-o/dyld.h>
#include <mach/mach.h>
#include <dlfcn.h>

typedef void (*mshookmemory_ptr_t)(void *target, const void *data, size_t size);

/*
This Function checks if the Application has ASLR enabled.
It gets the mach_header of the Image at Index 0.
It then checks for the MH_PIE flag. If it is there, it returns TRUE.
Parameters: nil
Return: Wether it has ASLR or not
*/

bool hasASLR()
{

    const struct mach_header *mach;

    mach = _dyld_get_image_header(0);

    if (mach->flags & MH_PIE)
    {

        //has aslr enabled
        return true;
    }
    else
    {

        //has aslr disabled
        return false;
    }
}

/*
This Function gets the vmaddr slide of the Image at Index 0.
Parameters: nil
Return: the vmaddr slide
*/

uintptr_t get_slide()
{
    return _dyld_get_image_vmaddr_slide(0);
}

/*
This Function calculates the Address if ASLR is enabled or returns the normal offset.
Parameters: The Original Offset
Return: Either the Offset or the New calculated Offset if ASLR is enabled
*/

uintptr_t calculateAddress(uintptr_t offset)
{

    if (hasASLR())
    {

        uintptr_t slide = get_slide();

        return (slide + offset);
    }
    else
    {

        return offset;
    }
}
/*
This function calculates the size of the data passed as an argument. 
It returns 1 if 4 bytes and 0 if 2 bytes
Parameters: data to be written
Return: True = 4 bytes/higher or False = 2 bytes
*/

bool getType(unsigned int data)
{
    int a = data & 0xffff8000;
    int b = a + 0x00008000;

    int c = b & 0xffff7fff;
    return c;
}

/*
writeData(offset, data) writes the bytes of data to offset
this version is crafted to take use of MSHookMemory as 
mach_vm functions are causing problems with codesigning on iOS 12.
Hopefully this workaround is just temporary.
*/

bool writeData(uintptr_t offset, unsigned int data)
{
    mshookmemory_ptr_t MSHookMemory_ = (mshookmemory_ptr_t)MSFindSymbol(NULL, "_MSHookMemory");

    // MSHookMemory is supported, use that instead of vm_write
    if (MSHookMemory_)
    {
        if (getType(data))
        {
            data = CFSwapInt32(data);
            MSHookMemory_((void *)calculateAddress(offset), &data, 4);
        }
        else
        {
            data = CFSwapInt16(data);
            MSHookMemory_((void *)calculateAddress(offset), &data, 2);
        }
        return true;
    }
    else
    {
        kern_return_t err = KERN_SUCCESS;
        mach_port_t port = mach_task_self();
        vm_address_t address = calculateAddress(offset);

        //set memory protections to allow us writing code there

        err = vm_protect(port, (vm_address_t)address, sizeof(data), false, VM_PROT_READ | VM_PROT_WRITE | VM_PROT_COPY);

        //check if the protection fails

        if (err != KERN_SUCCESS)
        {
            return false;
        }

        //write code to memory

        if (getType(data))
        {
            data = CFSwapInt32(data);
            err = vm_write(port, address, (vm_address_t)&data, sizeof(data));
        }
        else
        {
            data = (unsigned short)data;
            data = CFSwapInt16(data);
            err = vm_write(port, address, (vm_address_t)&data, sizeof(data));
        }
        if (err != KERN_SUCCESS)
        {
            return FALSE;
        }
        //set the protections back to normal so the app can access this address as usual

        err = vm_protect(port, (vm_address_t)address, sizeof(data), false, VM_PROT_READ | VM_PROT_EXECUTE);

        return TRUE;
    }
}

bool writeData(uintptr_t offset, void* data, size_t size) 
{
    mshookmemory_ptr_t MSHookMemory_ = (mshookmemory_ptr_t)MSFindSymbol(NULL, "_MSHookMemory");

    // MSHookMemory is supported, use that instead of vm_write
    if (MSHookMemory_)
    {
        MSHookMemory_((void *)calculateAddress(offset)), data, size);
        return true;
    }
    else 
    {
        kern_return_t err = KERN_SUCCESS;
        mach_port_t port = mach_task_self();
        vm_address_t address = calculateAddress(offset);

        //set memory protections to allow us writing code there

        err = vm_protect(port, (vm_address_t)address, size, false, VM_PROT_READ | VM_PROT_WRITE | VM_PROT_COPY);

        //check if the protection fails

        if (err != KERN_SUCCESS)
        {
            return false;
        }

        err = vm_write(port, address, (vm_address_t)data, size);

        if (err != KERN_SUCCESS)
        {
            return false;
        }

        err = vm_protect(port, (vm_address_t)address, size, false, VM_PROT_READ | VM_PROT_EXECUTE);

        return true;
    }
}
Guest
This topic is now closed to further replies.
  • Our picks

    • Wukong's Arsenal:Rogue RPG v1.8.1 [+3 Cheats]
      Modded/Hacked App: Wukong's Arsenal:Rogue RPG By HangZhou Mai Di Wen Network Technology Co., Ltd
      Bundle ID: com.medivhgame.wukongfIght.ios
      App Store Link: https://apps.apple.com/us/app/wukongs-arsenal-rogue-rpg/id6733239805?uo=4

       

      🤩 Hack Features

      - Never Die
      - Unlimited Currency
      - Remove Ads
      • 6 replies
    • Wukong's Arsenal:Rogue RPG v1.8.1 [+3 Jailed Cheats]
      Modded/Hacked App: Wukong's Arsenal:Rogue RPG By HangZhou Mai Di Wen Network Technology Co., Ltd
      Bundle ID: com.medivhgame.wukongfIght.ios
      App Store Link: https://apps.apple.com/us/app/wukongs-arsenal-rogue-rpg/id6733239805?uo=4



      🤩 Hack Features

      - Never Die
      - Unlimited Currency
      - Remove Ads
      • 2 replies
    • Townfall: Zombie Tower Defense v20.1.5 [+4 Cheats]
      Modded/Hacked App: Townfall: Zombie Tower Defense By Sugarscone
      Bundle ID: com.nmg.townfall.ios
      App Store Link: https://apps.apple.com/us/app/townfall-zombie-tower-defense/id6476259669?uo=4



      🤩 Hack Features

      - No Reload
      - Add Gold (Enable inside battle and finish stage)
      - Add Wood (Enable inside battle)
      - Skip Wave (Enable inside wave)
      • 7 replies
    • Townfall: Zombie Tower Defense v20.1.5 [+4 Jailed Cheats]
      Modded/Hacked App: Townfall: Zombie Tower Defense By Sugarscone
      Bundle ID: com.nmg.townfall.ios
      App Store Link: https://apps.apple.com/us/app/townfall-zombie-tower-defense/id6476259669?uo=4



      🤩 Hack Features

      - No Reload
      - Add Gold (Enable inside battle and finish stage)
      - Add Wood (Enable inside battle)
      - Skip Wave (Enable inside wave)
      • 8 replies
    • Kingdom Survivors v1.0730 [+4 Cheats]
      Modded/Hacked App: Kingdom Survivors By a plant standing on a chair Game Studio HB
      Bundle ID: com.DefaultCompany.MonsJacobSurvivorGame
      iTunes Store Link: https://apps.apple.com/us/app/kingdom-survivors/id1662497248?uo=4



      🚀 Hack Features

      - Never Die
      - Gain Exp (Toggle On gives you exp in battle)
      - Unlock All Characters
      - Add Currency
      • 18 replies
    • Kingdom Survivors v1.0730 [+4 Jailed Cheats]
      Modded/Hacked App: Kingdom Survivors By a plant standing on a chair Game Studio HB
      Bundle ID: com.DefaultCompany.MonsJacobSurvivorGame
      iTunes Store Link: https://apps.apple.com/us/app/kingdom-survivors/id1662497248?uo=4



      Hack Features:

      - Never Die
      - Gain Exp (Toggle On gives you exp in battle)
      - Unlock All Characters
      - Add Currency

      • 14 replies
    • Bounce Defense v1.2.5 [+5 Jailed Cheats]
      Modded/Hacked App: Bounce Defense By Voodoo
      Bundle ID: com.minigamelab.bouncedefense
      App Store Link: https://apps.apple.com/us/app/bounce-defense/id6740627201?uo=4



      🤩 Hack Features

      - Add Currency
      - Add Battle Currency (Enable inside battle)
      - Never Die
      - Unlock All Towers
      - Unlimited Tower Cards
      • 5 replies
    • Bounce Defense v1.2.5 [+5 Cheats]
      Modded/Hacked App: Bounce Defense By Voodoo
      Bundle ID: com.minigamelab.bouncedefense
      App Store Link: https://apps.apple.com/us/app/bounce-defense/id6740627201?uo=4



      🤩 Hack Features

      - Add Currency
      - Add Battle Currency (Enable inside battle)
      - Never Die
      - Unlock All Towers
      - Unlimited Tower Cards
      • 3 replies
    • Hex Warriors v2.0.5 Cheat Menu [+10 Jailed Cheats]
      Modded/Hacked App: Hex Warriors By Voodoo
      Bundle ID: com.dong.hexwarriors
      App Store Link: https://apps.apple.com/us/app/hex-warriors/id6736930021?uo=4


       

      🤩 Hack Features

      Cheat Menu (Currency, Auto Win, Cards and more)
      • 3 replies
    • Hex Warriors v2.0.5 Cheat Menu [+10 Cheats]
      Modded/Hacked App: Hex Warriors By Voodoo
      Bundle ID: com.dong.hexwarriors
      App Store Link: https://apps.apple.com/us/app/hex-warriors/id6736930021?uo=4



      🤩 Hack Features

      - Cheat Menu (Currency, Auto Win, Cards and more)
      • 3 replies
    • Subway Surfers v3.46.0 +22 Jailed Cheats [ Currencies + More ]
      Modded/Hacked App: Subway Surfers By Sybo Games ApS
      Bundle ID: com.kiloo.subwaysurfers
      iTunes Store Link: https://apps.apple.com/us/app/subway-surfers/id512939461?uo=4


      Hack Features:
      - Unlimited Currencies
      - Freeze Currencies
      - Free In-App Purchases
      - All Characters Unlocked
      - All Boards Unlocked
      - God Mode
      - No Stumble
      - Score Multiplier
      - Speed Multiplier
      - Gravity Multiplier
      - Jump Height Multiplier
      - Air Jump Height Multiplier
      - Unlimited Jumps
      - Unlimited Powers
      - Instant Lane Change
      - Freeze Trains
      - No Clip
      - Disable All Pickup
      - No Revive Cost
      - Unlimited Jetpack Time
      - Camera Stops
      - Camera Follows


      Jailbreak required hack(s): [Mod Menu Hack] Subway Surfers v3.40.0 +20 Cheats [ Currencies + More ] - ViP 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/
      • 39 replies
    • Subway Surfers v3.46.0 +22 Cheats [ Currencies + More ]
      Modded/Hacked App: Subway Surfers By Sybo Games ApS
      Bundle ID: com.kiloo.subwaysurfers
      iTunes Store Link: https://apps.apple.com/us/app/subway-surfers/id512939461?uo=4


      Hack Features:
      - Unlimited Currencies
      - Freeze Currencies
      - Free In-App Purchases
      - All Characters Unlocked
      - All Boards Unlocked
      - God Mode
      - No Stumble
      - Score Multiplier
      - Speed Multiplier
      - Gravity Multiplier
      - Jump Height Multiplier
      - Air Jump Height Multiplier
      - Unlimited Jumps
      - Unlimited Powers
      - Instant Lane Change
      - Freeze Trains
      - No Clip
      - Disable All Pickup
      - No Revive Cost
      - Unlimited Jetpack Time
      - Camera Stops
      - Camera Follows


      Non-Jailbroken & No Jailbreak required hack(s): [IPA Mod Menu] Subway Surfers v3.40.0 +20 Jailed Cheats [ Currencies + More ] - ViP Non-Jailbroken Hacks & 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/
      • 45 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