Jump to content

Debug iOS8.2 or iOS9.3.2 AppStore app using lldb.


babbunatale

18 posts in this topic

Recommended Posts

Hi everyone,

 

first of all I wish you an happy hacking year !  (y)

I'm very new in reverse engineering / debugging / iOS so excuse me for my newbie's questions. 

 

 

Context:
[everything was tried on iOS 9.3.2 AND iOS 8.2]

I need to understand how an application generates its tokens passed through http headers. So, I disassembled it using Hopper I dumped all .header files and I then logged a lot of informations during runtime by hooking some functions to understand the process of 'how an authenticated http request is generated'. Now I almost know which function exactly generates which token, I need to go ahead and understand the way of a particular token is generated to be able to reproduce it. It seems that using lldb to set breakpoints and then dump the register's value at some step of the runtime could be the best way to achieve my goals, right ? 

The steps I followed in order to use lldb are : 

- decrypt the app using Clutch2 and download it on my desktop
- install debug server and all stuff
- thin the binary
- set the thinned binary as lldb target
- install the decrypted binary.ipa in the iPhone (I tried both with a decrypted version and the normal app store version)
- set breakpoint: fail

 

My problem:

After having followed a lot of tutorials on it, I still don't get it to work.
It's impossible to set breakpoint using a method name like: 

(lldb): b -[ClassName methodCalled:]
// found on this tuts : http://highaltitudehacks.com/2015/05/17/ios-application-security-part-43-fat-binaries-and-lldb-usage-continued/
// does not work for me

lldb says that the breakpoint can't be set, exactly as I've not "targeted" the binary.
Plus, I don't really understand how to set a breakpoint using the memory address. Removing ASLR, finding memory addresses offset are just notions that brainf**ked me!

Could someone help me by sending me a precise routine and more informations about ASLR, memory offset or other useful stuff? 

PS: I read a lot of article on the web and also on this forum and some of them are just impossible to understand for a beginner like me... Please try to be "clear" :) 

Thank you a lot guys ! :)

 

Link to comment
Share on other sites

attach process?

that and have you set permissions? (chmod 777)

 

Thank you for your answer. I'm note sure about the meaning of your question but I'll try to answer: 

- of course I attach the process on iPhone side when I run debug server and then I do the following commands: 

// iphone side
debugserver *:6666 -a <processNameOrId>


// desktop side
$ lldb
(lldb) platform select remote-ios
(lldb) target create --arch arm /path/to/my/decrypted/bin
(lldb) process connect connect://myIp:port

--> everything is going fine here : debug server starts etc...

 

Could you precise your idea about "permissions" ? 

- debug server has the good permissions

- my local decrypted binaries has read permissions 

 

Any idea ? 

Link to comment
Share on other sites

Binary needs read write and execute on all 3. Thats why we use chmod 777 to give it those permissions.

 

Usually if its saying that it cant choose binary i think it must be some problem with attach process but cant say for sure

Thank you for your answer. I'm note sure about the meaning of your question but I'll try to answer:

- of course I attach the process on iPhone side when I run debug server and then I do the following commands:

 

// iphone sidedebugserver *:6666 -a <processNameOrId>// desktop side$ lldb(lldb) platform select remote-ios(lldb) target create --arch arm /path/to/my/decrypted/bin(lldb) process connect connect://myIp:port
--> everything is going fine here : debug server starts etc...

Could you precise your idea about "permissions" ?

- debug server has the good permissions

- my local decrypted binaries has read permissions

Any idea ?

Did you attack the process id of the GAME on your computer?

Use this tutorial https://iosgods.com/topic/5380-working-on-ios-9-how-to-get-lldb-working-on-windows/

Link to comment
Share on other sites

Usually if its saying that it cant choose binary i think it must be some problem with attach process but cant say for sure

Did you attack the process id of the GAME on your computer?

Use this tutorial https://iosgods.com/topic/5380-working-on-ios-9-how-to-get-lldb-working-on-windows/

 

Ok, I'll give a shot with the rwx permissions as you said above. I'll let your know :)

About the tutorial, I do exactly the same thing and it works. But the problem happens when I try to set a breakpoint.

Link to comment
Share on other sites

Kay. Also when you start it, the game is running right?

Ok, I'll give a shot with the rwx permissions as you said above. I'll let your know :)

About the tutorial, I do exactly the same thing and it works. But the problem happens when I try to set a breakpoint.

Link to comment
Share on other sites

Have you done this

 

Step 4: Open PuTTY or iFunBox and type in this command:

debugserver 127.0.0.1:23 --attach=PID or BINARYNAME
PID is the Process ID of the app and Binary Name is the Binary Name of the app. You can get PID & Binary Name from iGameGuardian or Binary Name from iFile/Filza.

 

Sorry tag error the step 4 in the other one. IF the app has attached (i know that debug server did, but im asking regarding app not the server itself)

Link to comment
Share on other sites

Have you done this

 

Step 4: Open PuTTY or iFunBox and type in this command:

debugserver 127.0.0.1:23 --attach=PID or BINARYNAME
PID is the Process ID of the app and Binary Name is the Binary Name of the app. You can get PID & Binary Name from iGameGuardian or Binary Name from iFile/Filza.

 

Sorry tag error the step 4 in the other one. IF the app has attached (i know that debug server did, but im asking regarding app not the server itself)

 

 

 

OK so, here are the steps I followed : 

 

 

 

Desktop side

 

//1: thin the decypted with Clutch2 binary and set permissions :

 

MacBook-Pro:Desktop $ lipo -thin armv7 -output snapchat-armv7 Snapchat
MacBook-Pro:Desktop $ chmod 777 snapchat-armv7 && ls -l snapchat-armv7
-rwxrwxrwx  1 kevinpiacentini  staff  49819344  3 jan 19:03 snapchat-armv7

 

 

 

// 2: start lldb

(lldb) process connect connect://192.168.0.28:23
Process 564 stopped
* thread #1: tid = 0x0c9e, 0x38034474 libsystem_kernel.dylib`mach_msg_trap + 20, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    frame #0: 0x38034474 libsystem_kernel.dylib`mach_msg_trap + 20
libsystem_kernel.dylib`mach_msg_trap:
->  0x38034474 <+20>: pop    {r4, r5, r6, r8}
    0x38034478 <+24>: bx     lr

libsystem_kernel.dylib`mach_msg_overwrite_trap:
    0x3803447c <+0>:  mov    r12, sp
    0x38034480 <+4>:  push   {r4, r5, r6, r8}
(lldb) platform select remote-ios
  Platform: remote-ios
 Connected: no
  SDK Path: "/Users/kevinpiacentini/Library/Developer/Xcode/iOS DeviceSupport/10.1.1 (14B100)"
 SDK Roots: [ 0] "/Users/kevinpiacentini/Library/Developer/Xcode/iOS DeviceSupport/10.1.1 (14B100)"
 SDK Roots: [ 1] "/Users/kevinpiacentini/Library/Developer/Xcode/iOS DeviceSupport/8.2 (12D508)"
 SDK Roots: [ 2] "/Users/kevinpiacentini/Library/Developer/Xcode/iOS DeviceSupport/9.1 (13B143)"
 SDK Roots: [ 3] "/Users/kevinpiacentini/Library/Developer/Xcode/iOS DeviceSupport/9.3.1 (13E238)"
 SDK Roots: [ 4] "/Users/kevinpiacentini/Library/Developer/Xcode/iOS DeviceSupport/9.3.2 (13F69)"
 SDK Roots: [ 5] "/Users/kevinpiacentini/Library/Developer/Xcode/iOS DeviceSupport/9.3.5 (13G36)"



(lldb) target create --arch arm ~/Desktop/snapchat-armv7
Current executable set to '~/Desktop/snapchat-armv7' (armv7).

(lldb) b -[LoginV2ViewController viewDidLoad]
Breakpoint 1: no locations (pending).
WARNING:  Unable to resolve breakpoint to any actual locations.

 

iPhone Side

 

iPhone:~ root# 
./debugserver *:23 --attach=Snapchat
debugserver-@(#)PROGRAM:debugserver  PROJECT:debugserver-320.2.89
 for armv7.
Attaching to process Snapchat...
Listening to port 23 for a connection from *...
Waiting for debugger instructions for process 0.

Here you can see all my steps... Maybe I misunderstood something ?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Our picks

    • Soul Light: Idle RPG War v63 +4 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Soul Light: Idle RPG War By ACTIONFIT Ltd.
      Bundle ID: com.idle.afk.soul.light.rpg
      iTunes Store Link: https://apps.apple.com/us/app/soul-light-idle-rpg-war/id6469476819?uo=4


      Hack Features:
      - God Mode
      - Unlimited Gold -> Will increase instead of decrease.
      - Unlimited Emerald -> Will increase instead of decrease.
      - Unlimited Dungeon Keys


      Jailbreak required hack(s): [Mod Menu Hack] Soul Light: Idle RPG War v1.6.2 +4 Cheats [ 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/
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 42 replies
    • Soul Light: Idle RPG War v63 +4 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Soul Light: Idle RPG War By ACTIONFIT Ltd.
      Bundle ID: com.idle.afk.soul.light.rpg
      iTunes Store Link: https://apps.apple.com/us/app/soul-light-idle-rpg-war/id6469476819?uo=4


      Hack Features:
      - God Mode
      - Unlimited Gold -> Will increase instead of decrease.
      - Unlimited Emerald -> Will increase instead of decrease.
      - Unlimited Dungeon Keys


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Soul Light: Idle RPG War v1.6.2 +4 Jailed Cheats [ 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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Like
      • 39 replies
    • Hole.io v2.10.1 +1++ Jailed Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Hole.io By Voodoo
      Bundle ID: com.nguyenvh.holeio
      iTunes Store Link: https://apps.apple.com/us/app/hole-io/id1389111413
       

      Hack Features:
      - Unlimited Currencies -> Earn or spend some.
      - Free In-App Purchases -> Toggle inside iGMenu.


      Jailbreak required hack(s): https://iosgods.com/topic/172055-holeio-all-vesions-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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 48 replies
    • Idle Miner Tycoon: Money Games v4.65.0 +100++ Jailed Cheats [ Game Breaking ]
      Modded/Hacked App: Idle Miner Tycoon: Money Games By Kolibri Games GmbH
      Bundle ID: com.fluffyfairygames.idleminertycoon
      iTunes Store Link: https://apps.apple.com/us/app/idle-miner-tycoon-money-games/id1116645064
       

      Hack Features:
      - Debug Menu -> Head over to Settings and toggle the Sound button.


      Jailbreak required hack(s): [Mod Menu Hack] Idle Miner Tycoon: Money Games v4.4.0 +1++ Cheats [ Game Breaking ] - 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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 354 replies
    • Idle Miner Tycoon: Money Games v4.65.0 +100++ Cheats [ Game Breaking ]
      Modded/Hacked App: Idle Miner Tycoon: Money Games By Kolibri Games GmbH
      Bundle ID: com.fluffyfairygames.idleminertycoon
      iTunes Store Link: https://apps.apple.com/us/app/idle-miner-tycoon-money-games/id1116645064
       

      Hack Features:
      - Debug Menu -> Head over to Settings and toggle the Sound button.


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Idle Miner Tycoon: Money Games v4.4.0 +1++ Cheats [ Game Breaking ] - 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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 209 replies
    • Autogun Heroes: Run and Gun v1.8.0 +4 Jailed Cheats [ God Mode ]
      Modded/Hacked App: Autogun Heroes: Run and Gun By Nitro Games Oyj
      Bundle ID: com.nitrogames.autoblaster
      iTunes Store Link: https://apps.apple.com/us/app/autogun-heroes-run-and-gun/id6443807581
       

      Hack Features:
      - God Mode
      - Unlimited Ammo
      - Increased Bullet Speed
      - 65k Coin Bonus -> Gain an extra 65k coins after a game.


      Jailbreak required hack(s): [Mod Menu Hack] Autogun Heroes: Run and Gun v1.1.1 +8 Cheats [ Damage & Defence ] - 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/
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 36 replies
    • Autogun Heroes: Run and Gun v1.8.0 +8 Cheats [ Damage & Defence ]
      Modded/Hacked App: Autogun Heroes: Run and Gun By Nitro Games Oyj
      Bundle ID: com.nitrogames.autoblaster
      iTunes Store Link: https://apps.apple.com/us/app/autogun-heroes-run-and-gun/id6443807581
       

      Hack Features:
      - Damage Multiplier
      - Defence Multiplier
      - Custom Move Speed
      - Custom Fire Rate
      - Unlimited Ammo
      - Increased Bullet Speed
      - 65k Coin Bonus -> Gain an extra 65k coins after a game.
      - 65k XP Bonus -> Gain an extra 65k XP after a game.


      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
      • 103 replies
    • Hole.io v2.10.1 +1++ Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Hole.io By Voodoo
      Bundle ID: com.nguyenvh.holeio
      iTunes Store Link: https://apps.apple.com/us/app/hole-io/id1389111413
       

      Hack Features:
      - Unlimited Currencies -> Earn or spend some.
      - Free In-App Purchases


      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
      • 28 replies
    • Slots Era - Slot Machines 777 v2.38.0 +100++ Jailed Cheats [ ULTIMATE HACK ]
      Modded/Hacked App: Slots Era - Slot Machines 777 By Murka Games Limited
      Bundle ID: com.murka.slotsera
      iTunes Store Link: https://apps.apple.com/us/app/slots-era-slot-machines-777/id1133138987
       

      Hack Features:
      - SRDebugger -> Head over to Settings and toggle the Privacy Policy button.


      Jailbreak required hack(s): https://iosgods.com/topic/172023-slots-era-slot-machines-777-v2200-100-cheat-srdebugger/
      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
      • 87 replies
    • Slots Era - Slot Machines 777 v2.38.0 +100++ Cheats [ ULTIMATE HACK ]
      Modded/Hacked App: Slots Era - Slot Machines 777 By Murka Games Limited
      Bundle ID: com.murka.slotsera
      iTunes Store Link: https://apps.apple.com/us/app/slots-era-slot-machines-777/id1133138987
       

      Hack Features:
      - SRDebugger -> Head over to Settings and toggle the Privacy Policy button.


      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
      • 201 replies
    • DIY Projects - Art Puzzle Game v1.9.4 +1 Jailed Cheat [ Unlimited Coins ]
      Modded/Hacked App: DIY Projects - Art Puzzle Game By Playgendary Limited
      Bundle ID: com.playgendary.dip
      iTunes Store Link: https://apps.apple.com/us/app/diy-projects-art-puzzle-game/id1614255010?uo=4


      Hack Features:
      - Unlimited Coins


      Jailbreak required hack(s): [Mod Menu Hack] DIY Projects - Art Puzzle Game v1.8.5 +6 Cheats [ 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/
        • Agree
        • Thanks
        • Like
      • 9 replies
    • DIY Projects - Art Puzzle Game v1.9.4 +6 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: DIY Projects - Art Puzzle Game By Playgendary Limited
      Bundle ID: com.playgendary.dip
      iTunes Store Link: https://apps.apple.com/us/app/diy-projects-art-puzzle-game/id1614255010?uo=4


      Hack Features:
      - Unlimited Coins
      - Unlimited Stars
      - Unlimited Lives
      - Unlimited Boosters
      - Unlimited In-Game Boosters
      - Unlimited Moves -> Will not decrease.


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] DIY Projects - Art Puzzle Game v1.8.5 +6 Jailed Cheats [ 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/
        • Haha
        • Like
      • 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