Jump to content

[Tutorial] How to Hack Using GNU-Debugger (GDB)


26 posts in this topic

Recommended Posts

Posted

✻ Requirements

✔ Command-line Tool (Putty for Windows; Terminal for Mac)

✔ Memory Access Tool (iGameGuardian, Gameplayer, Gamegem)

✔ OpenSSH (available on BigBoss)

✔ GNU-Debugger (available on cydia.radare.org)

 

✻ Procedure

Firstly, use your memory access tool to find the address of your target (herein “coins”). If the tool you are using cannot find the address, this guide is not for you. There is another method to GDB hacking called breakpointing for this case, but I don’t know how to do it. If I learn it I will be sure to share it.

 

Once you have your address, load up your command-line tool and SSH to your device. To start GDB, follow the commands:

 

 

gdb
/* Loads up GDB */

att pid
/* This means attach process ID. If you don’t know it, the app binary usually works too.
This command will freeze the app so values do not change */

watch *0xADDRESS
/* Sets a watchpoint to your address, where “ADDRESS” is what you found with Gameplayer */

continue
/* Unfreezes the app */
Now it’s your job to change the value of coins, just like you would if hacking with Gameplayer. Once the value changes, the app should freeze because you set a watchpoint on coins. GDB will give you some tasty information now - in your command prompt, you should see the old value and new value of coins. You’ll also be given the “real” address of coins, which can be plugged into IDA (remember, addresses in your memory access tool are temporary and change every launch. The address GDB gives you is consistent until the app is updated).

 

✻ Other Useful Commands

ps ax
/* Loads all processes and their IDs */
display /i $pc
/* Type this after watchpointing. It tells GDB to automatically show the address’ function when frozen */
info r
/* Gives you the current value held in registers 0-12 */
stepi
/* Shows you the next function */
✻ Troubleshooting

GDB is not attaching when I use the app binary name - why?

Using the binary name doesn’t always work. To get the processor ID, quit GDB by simply typing “quit” and then type “ps ax” (no quotes). That will bring up all running processes on your device. Look for the one in /var/mobile/Applications - the pid is listed on the left.

 

When attaching a process, I get “Segmentation fault:11” and get kicked back to root - why?

The app you are trying to debug has anti-debug security. To get around this you’ll have to disable ptrace in IDA. I will not cover that in this guide, perhaps in another. It isn’t a very common issue at the moment, I’ve only seen Gameloft and TinyCo. use it.

 

GDB didn’t freeze when the value changed - why?

This bugged me all the time, and King Kong was nice enough to help me find a solution. :) It’s quite simple actually, just control+c to make Putty/Terminal give you back the command-line. From there, re-enter the watchpoint command and type continue. The new value and address should now pop up without even needing to change it again in-game.

 

The address GDB gave me isn’t a hackable function - why?

The address GDB spits out isn’t always the function to hack. Load up IDA and have a look around the address - most of the time the function you want to hack is above the address given to you. Remember there are multiple ways to hack a function, it really depends on how well you know ARM.

 

✻ Special Thanks

King Kong - For helping me on ptrace and freezing apps!

  • Like 3
  • Thanks 1
  • Agree 1
Posted

One more useful command : x/20i 0xAdress or anything instead of 20 .. It will show the next 20 data's after the offset u have written :)

Posted (edited)

I figured out what Zahir wrote^^ BTW :o EvillyG00d!!!! :o:D

 

to do the x/20i you need to subtract 4 * 20  or 2 * 20 (for thumb ;) ) from the offset

 

BTW

1. watch -location *0xADDRESS gives you some better info than just watch :D

2. instead of display/i $pc you can do x/i $pc

and it doesnt do what u said it does.... complicated to explain.... like reload for ammo, or not enough coins if u attached a watchpoint to coins, pc will display the function that gives u the alert view saying u can't buy

3. you can use c , cont , or continue :)

Updated by -_-

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

    • Tap Titans 2 - Hero Legends v7.9.1 +9
      Modded/Hacked App: Tap Titans 2 - Hero Legends By Game Hive Corporation
      Bundle ID: com.gamehivecorp.taptitans2
      iTunes Store Link: https://apps.apple.com/us/app/tap-titans-2-hero-legends/id1120294802?uo=4


      Hack Features:
      - Free Level Up
      - Free Skill Upgrades
      - Free Hired Heroes Upgrades
      - Skills Cost 0 Mana To Use
      - No Skill Cooldown
      - Skip Waves - Each Kill acts like the boss so it takes you to next stage instantly no need for waves to move on to next stage
      - Monsters Have Low HP - kill faster
      - Collect Ad Rewards Without Having to Watch Videos


      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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 475 replies
    • Tap Titans 2 v7.9.1 +3 [ iOS 18 Supported ]
      Modded/Hacked App: Tap Titans 2 By Game Hive Corporation
      Bundle ID: com.gamehivecorp.taptitans2
      iTunes Store Link: https://itunes.apple.com/us/app/tap-titans-2/id1120294802

      Hack Features:
      - Freeze Gold -> Gold Won't Subtract
      - Freeze Mana -> Mana Won't Subtract
      - x10 Gold Drop -> Drop More Gold than Usual
      Only works on x64 or ARM64 iDevices: iPhone 5s, 6, 6 Plus, 6s, 6s Plus, 7, 7 Plus, 8, 8 Plus, X, SE, iPod Touch 6G, iPad Air, Air 2, Pro & iPad Mini 2, 3, 4 and later.


      Jailbroken version of this hack: https://iosgods.com/topic/58609-iosgods-vip-tap-titans-2-v210-6-cheats/
      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
      • 1,998 replies
    • Fishing Clash v1.0.358 +3 Cheats
      Modded/Hacked App: Fishing Clash: Fish Game 2019 by Ten Square Games S.A.
      Bundle ID: com.tensquaregames.letsfish2
      iTunes Store Link: https://apps.apple.com/us/app/fishing-clash-fish-game-2019/id1151811380


      Hack Features:
      - Combo Always Active
      - Centered Line -> The line is always in the center zone. I didn't test enough but worked for 20 games. Duels too.
      - Line Never Breaks
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,333 replies
    • Need for Speed No Limits v8.4.01 +2 Jailed Cheats [Unlimited Nitro]
      Modded/Hacked App: Need for Speed No Limits by EA Swiss Sarl
      Bundle ID: com.ea.nfs2014.bv
      iTunes Store Link: https://itunes.apple.com/us/app/need-for-speed-no-limits/id883393043


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Cydia Impactor.
      - A Computer Running Windows/Mac/Linux.


      Hack Features:
      - Dumb Opponents - Will cause all opponents and police to drive into the walls.
      - Unlimited Nitro - Use some nitro to fill the whole nitro bar.
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,163 replies
    • Modded/Hacked App: Tap Titans 2 by Game Hive Corporation
      Bundle ID: com.gamehivecorp.taptitans2
      iTunes Store Link: https://itunes.apple.com/us/app/tap-titans-2/id1120294802


      Hack Features:
      - Custom Gold ( type your custom amount enable do a few taps collect some gold then disable )
      - Custom DPS  ( type your custom amount wait for NAN then disable )
      - Custom mana ( type your custom amount use skill)

      - ALL FEATURES BELOW REQUIRE NOT ENOUGH MANA AND SKILL UNLOCKED 

      TO USE ENABLE THE HACK SET MANA TO 0 WIT CUSTOM MANA THEN TAP SKILL BUTTON WATCH THE VIDEO TO SEE 

      - Use swipe perk for free 

      - Use doom perk for free 

      - Use make it rain perk free

      - Use clan make it rain perk free

      - Use double damage perk free 

       


      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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 3,566 replies
    • Need for Speed No Limits v8.4.01 +8 Cheats [Rewards Hack + More]
      Modded/Hacked App: Need for Speed No Limits by EA Swiss Sarl
      Bundle ID: com.ea.nfs2014.bv
      iTunes Store Link: https://itunes.apple.com/us/app/need-for-speed-no-limits/id883393043


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iFile / Filza / iFunBox / iTools or any other file managers for iOS.
      - Cydia Substrate (from Cydia).
      - PreferenceLoader (from Cydia).


      Hack Features:
      - Godmode - The car will take visual damage.
      - Dumb Opponents - Will cause all opponents and police to drive into the walls.
      - No Traffic - Will disable all traffic cars from spawning in.
      - No Cops - Will disable all cop cars from spawning in.
      - Unlimited Nitro - Use some nitro to fill the whole nitro bar.
      - Huge Rewards - For every drift, air time or closs miss you perform, the score will be multiplied resulting in a huge cash prize.
      - Drive Through Traffic - Will allow you to drive through traffic cars without crashing them.
      - No Camera Shake - Will disable the camera from shaking when crashing.
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 2,174 replies
    • Need for Speed No Limits v8.4.01 +7 Jailed Cheats [Rewards Hack + More]
      Modded/Hacked App: Need for Speed No Limits by EA Swiss Sarl
      Bundle ID: com.ea.nfs2014.bv
      iTunes Store Link: https://itunes.apple.com/us/app/need-for-speed-no-limits/id883393043


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Cydia Impactor.
      - A Computer Running Windows/Mac/Linux.


      Hack Features:
      - Godmode - The car will take visual damage.
      - Dumb Opponents - Will cause all opponents and police to drive into the walls.
      - No Traffic - Will disable all traffic cars from spawning in.
      - No Cops - Will disable all cop cars from spawning in.
      - Unlimited Nitro - Use some nitro to fill the whole nitro bar.
      - Huge Rewards - For every drift, air time or closs miss you perform, the score will be multiplied resulting in a huge cash prize.
      - No Camera Shake - Will disable the camera from shaking when crashing.
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 972 replies
    • Legend of Solgard v2.52.0 - [ x Player Damage & More ]
      Modded/Hacked App: Legend of Solgard By King
      Bundle ID: com.midasplayer.apps.solgard
      iTunes Store Link: https://apps.apple.com/us/app/legend-of-solgard/id1281263906

      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iFile / Filza / iFunBox / iTools or any other file managers for iOS.
      - Cydia Substrate or Substitute.
      - PreferenceLoader (from Cydia).


      Hack Features:
      - x Player Damage - x1 - 30
      - God Mode

      All features are unlinked and only for player, you!
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 585 replies
    • Mighty Party: Heroes Clash v46.1.1 +4 Jailed Cheats [Unlimited Currencies]
      Modded/Hacked App: Mighty Party: Heroes Clash By Satege s.r.o.
      Bundle ID: com.panoramik.forgeofgodsblitz
      iTunes Store Link: https://itunes.apple.com/us/app/mighty-party-heroes-clash/id1163805393


      Mod Requirements:
      - Jailbroken or Non-Jailbroken iPhone/iPad/iPod Touch.
      - Cydia Impactor.
      - A Computer Running Windows/Mac/Linux.


      Hack Features:
      - Unlimited Currencies - Will not decrease.
      - Free Summoning
      - Complete All Quests
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 811 replies
    • Mighty Party: Battle Heroes v46.1.1 +4 Cheats [Unlimited Currencies]
      Modded/Hacked App: Mighty Party: Heroes Clash By Satege s.r.o.
      Bundle ID: com.panoramik.forgeofgodsblitz
      iTunes Store Link: https://itunes.apple.com/us/app/mighty-party-heroes-clash/id1163805393


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iFile / Filza / iFunBox / iTools or any other file managers for iOS.
      - Cydia Substrate (from Cydia).
      - PreferenceLoader (from Cydia).


      Hack Features:
      - Unlimited Currencies - Will not decrease. Reason why I only added this was because there's always a ban wave on this game. I can hack currencies, yes but instant ban.
      - Free Summoning
      - Kill All / Auto Win - Linked. Wait till it's the enemies turn and before they spawn in a troop, enable this feature.
      - Complete All Quests
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,833 replies
    • Legend of Solgard v2.52.0 +3 Cheat [God Mode & Damage]
      Modded/Hacked App: Legend of Solgard By King
      Bundle ID: com.midasplayer.apps.solgard
      iTunes Store Link: https://itunes.apple.com/us/app/legend-of-solgard/id1281263906?mt=8&uo=4&at=1010lce4


      Mod Requirements:
      - Jailbroken or Non-Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly.
      - A Computer Running Windows/Mac/Linux.


      Hack Features:
      - x Player Damage - x1 - 30
      - God Mode / Never Die
      - Auto Kill Enemies

      All features are unlinked and only for player, you!
        • Agree
        • Thanks
        • Like
      • 198 replies
    • Kingdom Towers v0.3.12 [+4 Jailed Cheats]
      Modded/Hacked App: Kingdom Towers By Martin Quinones
      Bundle ID: com.pizia.kingdomtowers
      iTunes Store Link: https://apps.apple.com/us/app/kingdom-towers/id6699736128?uo=4



      🤩 Hack Features

      - Unlimited Currency
      - Never Die
      - One Hit Kill
      - Unlocked All Towers/Relics
        • Thanks
        • Like
      • 10 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