Jump to content

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


EvillyG00d

26 posts in this topic

Recommended Posts

✻ 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
Link to comment
Share on other sites

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 -_-
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

    • Cooking Wonder v1.53.0 +1++ Jailed Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Cooking Wonder By WonderLegend Games
      Bundle ID: com.wonderlegend.cookingwonder
      iTunes Store Link: https://apps.apple.com/us/app/cooking-wonder/id1638005392
       

      Hack Features:
      - Unlimited Currencies -> Use some.


      Jailbreak required hack(s): https://iosgods.com/topic/169330-cooking-wonder-v120-1-cheat-unlimited-currencies/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 48 replies
    • Cooking Wonder ( All Versions ) +1++ Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Cooking Wonder By WonderLegend Games
      Bundle ID: com.wonderlegend.cookingwonder
      iTunes Store Link: https://apps.apple.com/us/app/cooking-wonder/id1638005392
       

      Hack Features:
      - Unlimited Currencies -> Use some.


      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/
      • 29 replies
    • Disney Emoji Blitz Game v62.0.2 +1++ Jailed Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Disney Emoji Blitz Game By Jam City, Inc.
      Bundle ID: com.disney.emojimatch
      iTunes Store Link: https://apps.apple.com/us/app/disney-emoji-blitz-game/id1017551780
       

      Hack Features:
      - Unlimited Currencies -> Earn some.


      Jailbreak required hack(s): https://iosgods.com/topic/168886-disney-emoji-blitz-game-all-versions-1-cheats-unlimited-currencies/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 86 replies
    • Disney Emoji Blitz Game ( All Versions ) +1++ Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Disney Emoji Blitz Game By Jam City, Inc.
      Bundle ID: com.disney.emojimatch
      iTunes Store Link: https://apps.apple.com/us/app/disney-emoji-blitz-game/id1017551780
       

      Hack Features:
      - Unlimited Currencies -> Earn some.


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/168888-disney-emoji-blitz-game-v5320-1-jailed-cheat-unlimited-currencies/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 29 replies
    • Family Guy Freakin Mobile Game v2.62.4 +1++ Jailed Cheat [ Unlimited Coins ]
      Modded/Hacked App: Family Guy Freakin Mobile Game By Jam City, Inc.
      Bundle ID: com.sgn.familyguy
      iTunes Store Link: https://apps.apple.com/us/app/family-guy-freakin-mobile-game/id1139342866
       

      Hack Features:
      - Unlimited Coins -> Use some.
      -- Unlimited Uranium > Use the modded coins. 
      -- Unlimited Lives -> Use the modded coins.
      -- Unlimited Moves -> Use the modded coins.


      Jailbreak required hack(s): [Mod Menu Hack] Family Guy Freakin Mobile Game v2.47.8 +1++ Cheat [ Unlimited Coins ] - 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/
      • 46 replies
    • Harekat 2 : Online v0.4.6 +3 Jailed Cheats [ God Mode ]
      Modded/Hacked App: Harekat 2 : Online By DEVLAPS YAZILIM TEKNOLOJI TICARET VE PAZARLAMA LIMITED SIRKETI
      Bundle ID: com.devlaps.harekat2
      iTunes Store Link: https://apps.apple.com/us/app/harekat-2-online/id6477324341?uo=4


      Hack Features:
      - God Mode
      - Unlimited Ammo -> Will not decrease.
      - Unlimited Stamina -> Will decrease but can still use.


      Jailbreak required hack(s): [Mod Menu Hack] Harekat 2 : Online v0.4.2 +3 Cheats [ Defence ] - 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/
      • 14 replies
    • Harekat 2 : Online v0.4.6 +3 Cheats [ God Mode ]
      Modded/Hacked App: Harekat 2 : Online By DEVLAPS YAZILIM TEKNOLOJI TICARET VE PAZARLAMA LIMITED SIRKETI
      Bundle ID: com.devlaps.harekat2
      iTunes Store Link: https://apps.apple.com/us/app/harekat-2-online/id6477324341?uo=4


      Hack Features:
      - God Mode
      - Unlimited Ammo -> Will not decrease.
      - Unlimited Stamina -> Will decrease but can still use.


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Harekat 2 : Online v0.4.2 +3 Jailed Cheats [ God Mode ] - 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/
      • 35 replies
    • Star Merge: Merging Match Game v1.493 +1++ Jailed Cheat [ Unlimited Everything ]
      Modded/Hacked App: Star Merge: Merging Match Game By PLUMMY GAMES OU
      Bundle ID: com.miramerge
      iTunes Store Link: https://apps.apple.com/us/app/star-merge-merging-match-game/id1580697094?uo=4


      Hack Features:
      - Unlimited Everything


      Jailbreak required hack(s): [Mod Menu Hack] Star Merge: Merging Match Game v1.43 +1++ Cheat [ Unlimited Everything ] - 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/
      • 6 replies
    • Star Merge: Merging Match Game v1.493 +1++ Cheat [ Unlimited Everything ]
      Modded/Hacked App: Star Merge: Merging Match Game By PLUMMY GAMES OU
      Bundle ID: com.miramerge
      iTunes Store Link: https://apps.apple.com/us/app/star-merge-merging-match-game/id1580697094?uo=4


      Hack Features:
      - Unlimited Everything


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Star Merge: Merging Match Game v1.43 +1++ Jailed Cheat [ Unlimited Everything ] - 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/
      • 11 replies
    • Family Guy Freakin Mobile Game ( All Versions ) +1++ Cheat [ Unlimited Coins ]
      Modded/Hacked App: Family Guy Freakin Mobile Game By Jam City, Inc.
      Bundle ID: com.sgn.familyguy
      iTunes Store Link: https://apps.apple.com/us/app/family-guy-freakin-mobile-game/id1139342866


      Hack Features:
      - Unlimited Coins -> Use some. This feature will auto update itself once a new version of the app is released!
      -- Unlimited Uranium > Use the modded coins. 
      -- Unlimited Lives -> Use the modded coins.
      -- Unlimited Moves -> Use the modded coins.


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Family Guy Freakin Mobile Game v2.47.8 +1++ Cheat [ Unlimited Coins ] - 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/
      • 25 replies
    • Airport Simulator: Plane City v1.03.0004 +1++ Jailed Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Airport Simulator: Plane City By Playrion SARL
      Bundle ID: com.playrion.airportmanager
      iTunes Store Link: https://apps.apple.com/us/app/airport-simulator-plane-city/id1572244031?uo=4


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Unlimited Currencies -> Earn or spend some. Use Sky Coins to buy Cash.


      Jailbreak required hack(s): [Mod Menu Hack] Airport Simulator: First Class v1.01.0202 +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/
      • 253 replies
    • Airport Simulator: Plane City v1.03.0004 +1++ Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Airport Simulator: Plane City By Playrion SARL
      Bundle ID: com.playrion.airportmanager
      iTunes Store Link: https://apps.apple.com/us/app/airport-simulator-plane-city/id1572244031?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 Currencies -> Earn or spend some. Use Sky Coins to buy Cash.


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Airport Simulator: First Class v1.01.0202 +1++ 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/
      • 202 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