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

Nice tutorial EG!

Thanks for posting this! :)

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

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

    • Modern Ops: Online Shooter FPS v9.53 +6 Jailed Cheats [ No Recoil + More ]
      Modded/Hacked App: Modern Ops: Online Shooter FPS By Edkon Games GmbH
      Bundle ID: com.edkongames.mobs
      App Store Link: https://apps.apple.com/us/app/modern-ops-online-shooter-fps/id1415791453?uo=4

       


      🤩 Hack Features

      - No Recoil
      - No Spread
      - No Flashbang Effect
      - No Smoke Effect
      - Red Crosshair
      - Field of View Modifier
      • 0 replies
    • FIFA Rivals - Mobile Football v1.0.2 +2 Jailed Cheats [ Auto Win ]
      Modded/Hacked App: FIFA Rivals - Mobile Football By Mythical Games
      Bundle ID: com.mythical.fifarivals
      iTunes Store Link:https://apps.apple.com/us/app/fifa-rivals-mobile-football/id6746578704

       
       

      🤩 Hack Features

      - Auto Win -> Linked to yourself & opponent. Every goal scored will result in a win.
      - Season Pass Unlocked -> Will let you claim all rewards from all passes.
      • 9 replies
    • FIFA Rivals - Mobile Football v1.0.2 +2 Cheats [ Auto Win ]
      Modded/Hacked App: FIFA Rivals - Mobile Football By Mythical Games
      Bundle ID: com.mythical.fifarivals
      iTunes Store Link:https://apps.apple.com/us/app/fifa-rivals-mobile-football/id6746578704

       
       

      🤩 Hack Features

      - Auto Win -> Linked to yourself & opponent. Every goal scored will result in a win.
      - Season Pass Unlocked -> Will let you claim all rewards from all passes.
      • 19 replies
    • Modern Ops: Online Shooter FPS v9.53 +6 Cheats [ No Recoil + More ]
      Modded/Hacked App: Modern Ops: Online Shooter FPS By Edkon Games GmbH
      Bundle ID: com.edkongames.mobs
      App Store Link: https://apps.apple.com/us/app/modern-ops-online-shooter-fps/id1415791453?uo=4

       
       

      🤩 Hack Features

      - No Recoil
      - No Spread
      - No Flashbang Effect
      - No Smoke Effect
      - Red Crosshairs
      - Field of View Modifier
      • 1 reply
    • Hanuman & Fighters Versus Evil v1.1 [+3 Jailed Cheats]
      Modded/Hacked App: Hanuman & Fighters Versus Evil By VOJOY GAMES PRIVATE LIMITED
      Bundle ID: com.vojoygames.hanumangame.ios
      App Store Link: https://apps.apple.com/us/app/hanuman-fighters-versus-evil/id6737682082?uo=4

       

      🤩 Hack Features

      - Enemy Can't Attack
      - Unlimited Gold
      - Unlock All Levels
      • 1 reply
    • Hanuman & Fighters Versus Evil v1.1 [+3 Cheats]
      Modded/Hacked App: Hanuman & Fighters Versus Evil By VOJOY GAMES PRIVATE LIMITED
      Bundle ID: com.vojoygames.hanumangame.ios
      App Store Link: https://apps.apple.com/us/app/hanuman-fighters-versus-evil/id6737682082?uo=4



      🤩 Hack Features

      - Enemy Can't Attack
      - Unlimited Gold
      - Unlock All Levels
       
      • 1 reply
    • Idle Army: Trading Weapons v1.12.2 [+5 Jailed Cheats]
      Modded/Hacked App: Idle Army: Trading Weapons By UNIMOB VIET NAM COMPANY LIMITED
      Bundle ID: com.unimob.idle.army
      App Store Link: https://apps.apple.com/us/app/idle-army-trading-weapons/id6670773625?uo=4



      🤩 Hack Features

      - Always Enough Resources (Gem, Skip Ads etc.)
      - Max Gold (Enable inside game)
      - 2x Game Speed (Enable inside game)
      - Kill Monster (Enable inside game)
      - Add All Pet

      • 1 reply
    • Idle Army: Trading Weapons v1.12.2 [+5 Cheats]
      Modded/Hacked App: Idle Army: Trading Weapons By UNIMOB VIET NAM COMPANY LIMITED
      Bundle ID: com.unimob.idle.army
      App Store Link: https://apps.apple.com/us/app/idle-army-trading-weapons/id6670773625?uo=4

       

      🤩 Hack Features

      - Always Enough Resources (Gem, Skip Ads etc.)
      - Max Gold (Enable inside game)
      - 2x Game Speed (Enable inside game)
      - Kill Monster (Enable inside game)
      - Add All Pet

      • 2 replies
    • Margonem Adventures v1.16.2 [+3 Jailed Cheats]
      Modded/Hacked App: Margonem Adventures By GARMORY sp. z o.o. sp. k.
      Bundle ID: pl.Garmory.MargonemAdventures
      iTunes Store Link: https://apps.apple.com/us/app/margonem-adventures/id6444410609?uo=4

       

      🤩 Hack Features

      - Enemy Can't Move
      - Enemy Can't Attack
      - Unlimited Mana
      • 18 replies
    • Margonem Adventures v1.16.2 [+3 Cheats]
      Modded/Hacked App: Margonem Adventures By GARMORY sp. z o.o. sp. k.
      Bundle ID: pl.Garmory.MargonemAdventures
      iTunes Store Link: https://apps.apple.com/us/app/margonem-adventures/id6444410609?uo=4



      🤩 Hack Features

      - Enemy Can't Move
      - Enemy Can't Attack
      - Unlimited Mana
      • 11 replies
    • XP Hero v9.0.0 [+3 Cheats]
      Modded/Hacked App: XP Hero By Supercent Inc.
      Bundle ID: io.supercent.weaponrpg
      iTunes Store Link: https://apps.apple.com/us/app/xp-hero/id6740618570?uo=4



      🤩 Hack Features

      - Add Currency (Enable and You'll Recieve All Currency)
      - Add Xp
      - Enemy Can't Attack
       
      • 7 replies
    • XP Hero v9.0.0 [+3 Jailed Cheats]
      Modded/Hacked App: XP Hero By Supercent Inc.
      Bundle ID: io.supercent.weaponrpg
      iTunes Store Link: https://apps.apple.com/us/app/xp-hero/id6740618570?uo=4



      🤩 Hack Features

      - Add Currency (Enable and You'll Recieve All Currency)
      - Add Xp
      - Enemy Can't Attack
      • 6 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