Jump to content

Debugging apps on iOS 13 with LLDB (watchpoints supported)


64 posts in this topic

Recommended Posts

Updated (edited)

Hi, I looked at the tutorials section here and saw that the only tutorial about debugging was a tutorial by Ted22 without support for watchpoints. This does support wp and is you don't need to download stuff from unofficial sources. But I do recommend reading his tutorial as it covers other stuff.

For this you need Xcode & Homebrew. (on macOS). Probably works on GNU/Linux if you get debugserver and the right iOS SDK some other way, or you could run macOS in a VM.

Run this to get ldid:

brew install ldid

Then you need to get the right debugserver. Run 

cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/ (iPadOS if you're using an iPad, I guess)

Then do an ls to list all available versions. In my case "13.3" since I run iOS 13.3.1 on an iPhone X.

Run this to mount the DeveloperDiskImage of your version. 13.3 in my case.

open ./13.3/DeveloperDiskImage.dmg

Then open your mounted disk image and go to DeveloperDiskImage/usr/bin. There you'll find debugserver. Copy that to your computer somewhere. I used ~/Documents/debugserver

To thin your binary, run 

lipo -thin arm64 ./debugserver -output ./debugserverthin (if using arm64)
lipo -thin arm64e ./debugserver -output ./debugserverthin (if using arm64e, iPhone XS and above, haven't tried though, maybe arm64 will work fine aswell)

Next, sign debugserver with this xml file (save as ent.xml):

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>com.apple.springboard.debugapplications</key>
        <true/>
        <key>get-task-allow</key>
        <true/>
        <key>task_for_pid-allow</key>
        <true/>
        <key>run-unsigned-code</key>
        <true/>
</dict>
</plist>

Using ldid as such: 

ldid -Sent.xml ./debugserverthin

Copy it to your phone using sftp.

sftp root@yourphoneip

then 

put debugserverthin

now SSH into your phone and run

mv ./debugserverthin /usr/bin/debugserver (/usr/local/bin is more standard but /usr/bin just worked for me so I'll go with that, doesn't really matter).

 

Run this to find all running processes.  I'll use Hill Climb Racing as an example:

ps -A

Example output: 51523 ??         0:34.60 /var/containers/Bundle/Application/72FDFED4-16FB-47FE-999D-1CD53CF16B8C/Hill Climb Racing.app/Hill Climb Racing

Run debugserver to start the debugging server. To specify which process to attach on, do it like this:

debugserver 0.0.0.0:1234 -a "Hill Climb Racing"

To attach LLDB from your Mac, run this (ON MAC, not phone).

lldb
(lldb) platform select remote-ios
(lldb) process connect connect://yourphoneip:1234

To set watchpoints (got addr from iGG, gold value):

(lldb) process interrupt
Process 51523 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    frame #0: 0x00000001b7044634 libsystem_kernel.dylib`mach_msg_trap + 8
libsystem_kernel.dylib`mach_msg_trap:
->  0x1b7044634 <+8>: ret

libsystem_kernel.dylib`mach_msg_overwrite_trap:
    0x1b7044638 <+0>: mov    x16, #-0x20
    0x1b704463c <+4>: svc    #0x80
    0x1b7044640 <+8>: ret
Target 0: (Hill Climb Racing) stopped.
(lldb) w s e -s 4 -- 0x106128024
Watchpoint created: Watchpoint 1: addr = 0x106128024 size = 4 state = enabled type = w
    new value: 148742069
(lldb) c
Process 51523 resuming

When your watchpoints gets triggered you'll see disassembled code that ran some instruction on your data. Example (when buying from store):

Watchpoint 1 hit:
old value: 148742069
new value: 148642069
Process 51523 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = watchpoint 1
    frame #0: 0x0000000104a38a74 Hill Climb Racing`___lldb_unnamed_symbol5830$$Hill Climb Racing + 276
Hill Climb Racing`___lldb_unnamed_symbol5830$$Hill Climb Racing:
->  0x104a38a74 <+276>: mov    x0, x19
    0x104a38a78 <+280>: mov    x1, x20
    0x104a38a7c <+284>: bl     0x104a38d94               ; ___lldb_unnamed_symbol5832$$Hill Climb Racing
    0x104a38a80 <+288>: add    x8, sp, #0x30             ; =0x30
Target 0: (Hill Climb Racing) stopped.

I have literally no idea how to write ARM assembly but I'd guess that you could replace the instructions at 0x104a38a74 with NOP's to get free-buy, or write a jmp to your own function for mid-function hooks. I suggest watching other tutorials for that, I'm only good at Windows hacking but I may learn some iOS soon :D.

 

For moderators who review: can I wrap everything in hide-tags without messing up everything? I don't really care but a few more likes is cool 😛

I'll make a follow-up some day when I actually create a fully featured cheat with this, iGG, Theos and a disassembler like Ghidra or Binary Ninja.

Secret:

Hidden Content

React or reply to this topic to see the hidden content & download link. 👀

Updated by Affe2626
  • Like 115
  • Winner 15
  • Thanks 7
  • Haha 4
  • Agree 2
  • Informative 8
Posted

Thank you for sharing this with us!

I think adding hide here will ruin the topic. :)

  • Like 1
Posted

Good tutorial, I'm sure this will help a lot of people.

  • Like 1
Posted
1 hour ago, Rook said:

Thank you for sharing this with us!

I think adding hide here will ruin the topic. :)

Yep, that's fine, I attached a hidden meme instead. I may do a video next time when I make a cheat with this. Let's see how that goes

Posted

So this has to done on a mac?..

Posted
On 4/16/2020 at 6:08 AM, K_K said:

So this has to done on a mac?..

I haven't tried anything else. If you get LLDB to run with an iOS SDK on another OS then probably. The remote-ios platform maybe only exists on the macOS version of LLDB (but you can always try). Search for how to set SDK path. It does that automatically if you have Xcode installed for macOS. 

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

    • Little Kitty, Big City +1 Jailed Cheat [ Full Game Unlocked ]
      Modded/Hacked App: Little Kitty, Big City By Double Dagger Studio, LTD
      Bundle ID: com.doubledaggerstudio.littlekittybigcity
      App Store Link: https://apps.apple.com/us/app/little-kitty-big-city/id6760796215?uo=4

       


      🤩 Hack Features

      -- Full Game Unlocked
      • 0 replies
    • MAke Drama : MAD +3 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: MAke Drama : MAD By Wemade Connect Co., Ltd.
      Bundle ID: com.wemadeconnect.ios.makedrama
      App Store Link: https://apps.apple.com/us/app/make-drama-mad/id6757506278?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
        • Winner
        • Like
      • 9 replies
    • ANOTHER EDEN Global +7 Cheats
      Mod APK Game Name: ANOTHER EDEN By WFS, Inc.
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/search?q=ANOTHER EDEN

       

      🤩 Hack Features

      - Damage Multiplier
      - Never Die
      - Unlimited MP
      - Battle EXP Multiplier
      - Currency Multiplier
      - Pick Up Items Multiplier
      - Fishing Rod Fast Level

       

      ⬇️ Android Mod APK Download Link


      Hidden Content

      DDownload via the iOSGods App for Android







       

      📖 Android Installation Instructions

      STEP 1: Download the modded APK file from the link above using your preferred Android browser or download manager.
      STEP 2: Once the download is complete, open your file manager and locate the downloaded .apk file (usually in the Downloads folder).
      STEP 3: Tap the APK file, then select Install. If prompted, enable Install from Unknown Sources in your device settings.
      STEP 3A: If the mod includes an OBB file, extract it if it’s inside an archive. Then move the folder to: /Android/obb/
      STEP 3B: If the mod includes a DATA file, extract it if it’s archived. Then move the folder to: /Android/data/
      STEP 4: Once installed, open the game and toggle your desired cheats & features through the APK mod menu. Enjoy!

       

      NOTE: If you have any questions or issues, read our Frequently Asked Questions topic. If you still need help, post your issue below and we’ll assist you as soon as possible. If the mod works for you, please share your feedback to help other members!

       

      🙌 Credits

      - AlyssaX64

       

      📷 Cheat Video/Screenshots

      N/A

       

       iOS & iPadOS App Hacks
      If you’re looking for Non-Jailbroken & No Jailbreak required iOS IPA hacks, visit the iOS Game Cheats & Hacks or the iOSGods App for a variety of modded games and apps for non-jailbroken iOS devices.
        • Agree
        • Winner
      • 2 replies
    • Neo Monsters +6 Cheats
      Mod APK Game Name: Neo Monsters By ZigZaGame Inc.
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.pockettrend.neomonsters

       

      🤩 Hack Features

      - Damage Multiplier
      - Defense Multiplier
      - Capture 100%
      - Unlimited Team Cost
      - Trainig To Max Level
      - Run = Win + Auto Capture

       

      ⬇️ Android Mod APK Download Link


      Hidden Content

      Download via the iOSGods App for Android







       

      📖 Android Installation Instructions

      STEP 1: Download the modded APK file from the link above using your preferred Android browser or download manager.
      STEP 2: Once the download is complete, open your file manager and locate the downloaded .apk file (usually in the Downloads folder).
      STEP 3: Tap the APK file, then select Install. If prompted, enable Install from Unknown Sources in your device settings.
      STEP 3A: If the mod includes an OBB file, extract it if it’s inside an archive. Then move the folder to: /Android/obb/
      STEP 3B: If the mod includes a DATA file, extract it if it’s archived. Then move the folder to: /Android/data/
      STEP 4: Once installed, open the game and toggle your desired cheats & features through the APK mod menu. Enjoy!

       

      NOTE: If you have any questions or issues, read our Frequently Asked Questions topic. If you still need help, post your issue below and we’ll assist you as soon as possible. If the mod works for you, please share your feedback to help other members!

       

      🙌 Credits

      - AlyssaX64

       

      📷 Cheat Video/Screenshots

      N/A

       

       iOS & iPadOS App Hacks
      If you’re looking for Non-Jailbroken & No Jailbreak required iOS IPA hacks, visit the iOS Game Cheats & Hacks or the iOSGods App for a variety of modded games and apps for non-jailbroken iOS devices.
        • Winner
        • Like
      • 1 reply
    • On Raft v1.0.0 [ +3 Cheats ] Currency Multiplier
      Modded/Hacked App: On Raft By 24 HIT Riga SIA
      Bundle ID: com.on.raft
      App Store Link: https://apps.apple.com/us/app/on-raft/id6760892302?uo=4

      🤩 Hack Features

      - ADS NO / Rewards Free
      - Currency Multiplier
      - Resources Multiplier
      - Debug Menu
        • Winner
      • 3 replies
    • On Raft v1.0.0 [ +3 Jailed ] Currency Multiplier
      Modded/Hacked App: On Raft By 24 HIT Riga SIA
      Bundle ID: com.on.raft
      App Store Link: https://apps.apple.com/us/app/on-raft/id6760892302?uo=4

      🤩 Hack Features

      - ADS NO / Rewards Free
      - Currency Multiplier
      - Resources Multiplier
      - Debug Menu
        • Winner
        • Like
      • 2 replies
    • Artillery: Fight For America v1.4.1 [ +3 Cheats ] Currency ADD
      Modded/Hacked App: Artillery: Fight For America By Dats Games LTD
      Bundle ID: dats.games.artillerymasterffa
      App Store Link: https://apps.apple.com/us/app/artillery-fight-for-america/id6503918235?uo=4

      🤩 Hack Features

      - ADS NO
      - Currency ADD
      - Currency Multiplier
      • 0 replies
    • Artillery: Fight For America v1.4.1 [ +3 Jailed ] Currency ADD
      Modded/Hacked App: Artillery: Fight For America By Dats Games LTD
      Bundle ID: dats.games.artillerymasterffa
      App Store Link: https://apps.apple.com/us/app/artillery-fight-for-america/id6503918235?uo=4

      🤩 Hack Features

      - ADS NO
      - Currency ADD
      - Currency Multiplier
      • 0 replies
    • Evolve and Win v0.3.2 [ +10 Cheats ] Debug Menu
      Modded/Hacked App: Evolve and Win By Sidra Sadeed
      Bundle ID: com.ss.apes.evolve.win
      App Store Link: https://apps.apple.com/us/app/evolve-and-win/id6772149297?uo=4

      🤩 Hack Features

      - Debug Menu
      • 0 replies
    • Evolve and Win v0.3.2 [ +10 Jailed ] Debug Menu
      Modded/Hacked App: Evolve and Win By Sidra Sadeed
      Bundle ID: com.ss.apes.evolve.win
      App Store Link: https://apps.apple.com/us/app/evolve-and-win/id6772149297?uo=4

      🤩 Hack Features

      - Debug Menu
        • Like
      • 0 replies
    • Last Combat: Z Shooter v1.0.2 [ +7 Jailed ] Auto Win
      Modded/Hacked App: Last Combat: Z Shooter By PIXEL KING PTE. LTD.
      Bundle ID: com.sg.lastaura.army.zombie.shooter
      App Store Link: https://apps.apple.com/us/app/last-combat-z-shooter/id6812733413?uo=4

      🤩 Hack Features

      - Auto Win
      - Unlimited Gems
      - Unlimited Coins
      - ADD Gems
      - ADD Coins
      - Higher Damage
      - Damage Multiplier
        • Like
      • 2 replies
    • Last Combat: Z Shooter v1.0.2 [ +7 Cheats ] Auto Win
      Modded/Hacked App: Last Combat: Z Shooter By PIXEL KING PTE. LTD.
      Bundle ID: com.sg.lastaura.army.zombie.shooter
      App Store Link: https://apps.apple.com/us/app/last-combat-z-shooter/id6812733413?uo=4

      🤩 Hack Features

      - Auto Win
      - Unlimited Gems
      - Unlimited Coins
      - ADD Gems
      - ADD Coins
      - Higher Damage
      - Damage Multiplier
      • 0 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